org.ujorm.orm.annot
Annotation Type Column


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface Column

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


Optional Element Summary
 String constraintName
          A name of the constraint for the case a foreign key
 Class<? extends ITypeService> converter
          Convert, save and read an application data to/from the ResultSet.
 String[] index
          A name of the non-unique database index for the column, where the same index can contain more columns.
 int length
          Database column maximal length
 boolean mandatory
          Not null value
 String name
          A named parameter for the database column name.
 boolean pk
          The primary key
 int precision
          Database column precision
 DbType type
          Database column type
 String[] uniqueIndex
          A name of the unique database index for the column, where the same index can contain more columns.
 String value
          A shortcut for the attribute "name" of Column.
 

name

public abstract String name
A named parameter for the database column name. If an appropriate Key is a relation to another ORM object with more primary keys, then the several names can be separated by a space or comma character.

Default:
""

value

public abstract String value
A shortcut for the attribute "name" of Column.

See Also:
name()
Default:
""

pk

public abstract boolean pk
The primary key

Default:
false

type

public abstract DbType type
Database column type

Default:
org.ujorm.orm.DbType.Automatic

length

public abstract int length
Database column maximal length

Default:
-1

precision

public abstract int precision
Database column precision

Default:
-1

mandatory

public abstract boolean mandatory
Not null value

Default:
false

index

public abstract String[] index
A name of the non-unique database index for the column, where the same index can contain more columns. If a single column of the index is marked as non-unique, than the entire index will be non-unique.

Default:
""

uniqueIndex

public abstract String[] uniqueIndex
A name of the unique database index for the column, where the same index can contain more columns. If a single column of the index is marked as non-unique, than the entire index will be non-unique.

Default:
""

constraintName

public abstract String constraintName
A name of the constraint for the case a foreign key

Default:
""

converter

public abstract Class<? extends ITypeService> converter
Convert, save and read an application data to/from the ResultSet. If the key have got a default value, so the instance for the real converter will be defined along the parameter orm.metaModel.MetaParams.MetaParams.

See Also:
ITypeService
Default:
org.ujorm.orm.ITypeService.class


Copyright 2013, Pavel Ponec