Annotation Interface DefaultValue


@Retention(RUNTIME) @Target(FIELD) public @interface DefaultValue
Annotation for attributes of entities, which indicates default values during SQL generation. Attention: This annotation is not evaluated by JPA - neither the JPA provider nor the database will use these values during runtime.
Author:
Tobias Liefke
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The value to use during export.
  • Element Details

    • value

      String value
      The value to use during export. Depending on the type of the field:
      a plain string which will be escaped during export
      for fields of type String, Character and char
      the name of an enum constant
      for fields of type Enum
      A number
      for all numeric fields
      CURRENT_TIMESTAMP, CURRENT_DATE or a ISO 8601 compliant timestamp (yyyy-mm-ddThh:mm:ss.SX)
      for temporal fields like date or timestamp
      an SQL expression which is used "as is" during export
      for all other fields
      Returns:
      the default value