org.ujorm.orm.annot
Annotation Type Db


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

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


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

Element Detail

dialect

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

schema

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

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

jndi

public abstract 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 String jdbcUrl
JDBC Url

Default:
""

jdbcDriver

public abstract String jdbcDriver
JDBC Driver

Default:
""

user

public abstract String user
Connection User

Default:
""

password

public abstract String password
Connection password

Default:
""

sequencer

public abstract Class<? extends UjoSequencer> 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 control how the DLL (Data Definition Language) statements will be used to a defining data structure modification. The value can be defined a parent, so the hierarchy from the parent 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 2013, Pavel Ponec