org.ujorm.orm.annot
Annotation Type Db


@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface Db

Use the annotation to mark a UjoProperty static field like XML Attribute.


Required Element Summary
 java.lang.Class<? extends SqlDialect> dialect
          SQL dialect by a DB Vendor.
 
Optional Element Summary
 java.lang.String jdbcDriver
          JDBC Driver
 java.lang.String jdbcUrl
          JDBC Url
 java.lang.String[] jndi
          The JNDI (java naming and directory interface) connection string.
 Orm2ddlPolicy Orm2ddlPolicy
          Parameter to controll how the DLL (Data Definition Language) statmenets will be used to a defining data structure modification.
 java.lang.String password
          Connection password
 boolean readOnly
          Default read-only state for all database tables.
 java.lang.Class sequencer
          The sequencer class for tables of the current database.
 java.lang.String schema
          Default name of table schema is copied into table models if thay are empty.
 java.lang.String user
          Connection User
 

Element Detail

dialect

public abstract java.lang.Class<? extends SqlDialect> dialect
SQL dialect by a DB Vendor.

schema

public abstract java.lang.String schema
Default name of table schema is copied into table models if thay are empty.

See Also:
Table.schema()
Default:
""

jndi

public abstract java.lang.String[] jndi
The JNDI (java naming and directory interface) connection string.
A typical use on the Tomcat can be:
jndi = {"java:comp/env/jdbc/TestDB"}
See the link or link for more information about JNDI on the Tomcat.

Default:
{}

jdbcUrl

public abstract java.lang.String jdbcUrl
JDBC Url

Default:
""

jdbcDriver

public abstract java.lang.String jdbcDriver
JDBC Driver

Default:
""

user

public abstract java.lang.String user
Connection User

Default:
""

password

public abstract java.lang.String password
Connection password

Default:
""

sequencer

public abstract java.lang.Class sequencer
The sequencer class for tables of the current database. A value can be a subtype of 'org.ujorm.orm.UjoSequencer' with one-parameter constructor type of MetaTable. If the NULL value is specified the then a default sequencer 'UjoSequencer' will be used.

Default:
org.ujorm.orm.UjoSequencer.class

readOnly

public abstract boolean readOnly
Default read-only state for all database tables. The parameter value is evaluated in the execution SQL commands type of INSERT, UPDATE, and DELETE.
Note, that only the default value FALSE can be overwritten by a table annotation or by a XML config.

See Also:
Table.readOnly()
Default:
false

Orm2ddlPolicy

public abstract Orm2ddlPolicy Orm2ddlPolicy
Parameter to controll how the DLL (Data Definition Language) statmenets will be used to a defining data structure modification. The value can be defined a parent, so the hiearchy from the parrent to a child is: In case the root Meta Parameters is undefined, then the parameter CREATE_OR_UPDATE_DDL will be used.

See Also:
Orm2ddlPolicy.CREATE_OR_UPDATE_DDL
Default:
org.ujorm.orm.ao.Orm2ddlPolicy.INHERITED


Copyright © 2007-2012 PPonec