Note: This ORM/SQL annotation is silently ignored by ObjectDB

297 words

javax.jdo.annotations.Column - JDO annotation

javax.jdo.annotations
Annotation Column

Target:
Fields (including property get methods)
Annotation for a column in the database. Corresponds to the xml element "column".
Since:
JDO 2.1
String allowsNull
Whether the column allows null values to be inserted.
Whether the column allows null values to be inserted.
Returns:
whether the column allows null values to be inserted
Default value:
""
Since:
JDO 2.1
Default value for this column.
Default value for this column.
Returns:
the default value for this column
Default value:
""
Since:
JDO 2.1
Vendor extensions.
Vendor extensions.
Returns:
the vendor extensions
Default value:
{}
Since:
JDO 2.1
Value to be inserted when this is an "unmapped" column
Value to be inserted when this is an "unmapped" column
Returns:
the value to be inserted when this is an "unmapped" column
Default value:
""
Since:
JDO 2.1
String jdbcType
JDBC Type for this column.
JDBC Type for this column.
Returns:
JDBC type for this column
Default value:
""
Since:
JDO 2.1
int length
Maximum length of data stored in this column.
Maximum length of data stored in this column.
Returns:
the maximum length of data stored in this column
Default value:
-1
Since:
JDO 2.1
String name
Name of the column.
Name of the column.
Returns:
the name of the column
Default value:
""
Since:
JDO 2.1
int scale
Scale for the column when handling floating point values.
Scale for the column when handling floating point values.
Returns:
the scale for the column when handling floating point values
Default value:
-1
Since:
JDO 2.1
String sqlType
SQL Type for this column.
SQL Type for this column.
Returns:
SQL type for this column
Default value:
""
Since:
JDO 2.1
String target
Target column for this column in the other table when part of a foreign key relation.
Target column for this column in the other table when part of a foreign key relation.
Returns:
the target column in the other table for this column when part of a foreign key relation.
Default value:
""
Since:
JDO 2.1
Target member in the other class or interface for this column when part of a bidirectional relation.
Target member in the other class or interface for this column when part of a bidirectional relation.
Returns:
the target member for this column when part of a bidirectional relation.
Default value:
""
Since:
JDO 2.1

This documentation page is derived (with some adjustments) from the JDO 2.2 API
and is available under the terms of the Apache License, v. 2.0.