Annotation Type DefaultIfNull
-
@Target(FIELD) @Retention(RUNTIME) public @interface DefaultIfNullThis annotation tells Java2DB to use the database-default for a column if the corresponding Java field marked with this annotation isnull.- Author:
- Collin Alpert
-
-
Element Detail
-
onCreate
boolean onCreate
Configures, if the database-default should be used in a create statement when the field isnull. Per default, this is enabled.- Returns:
True, if the database-default should be used in create statements,falseifnullshould be written into the database when the field is alsonull.
- Default:
- true
-
-
-
onUpdate
boolean onUpdate
Configures, if the database-default should be used in an update statement when the field isnull. Per default, this is not enabled.- Returns:
True, if the database-default should be used in update statements,falseifnullshould be written into the database when the field is alsonull.
- Default:
- false
-
-