Annotation Interface DateCreated


@Retention(RUNTIME) @Target({METHOD,FIELD}) @Documented @AutoPopulated(updatable=false) public @interface DateCreated
Can be applied to date type to indicate the property should be populated when it is first inserted.
Since:
1.0
Author:
graemerocher
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The annotation name.
    static final String
    The metadata key for skipIfPresent().
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    When true, an existing non-null value will be preserved and not overwritten during auto-population on insert.
    Allows to truncate the auto set date value.
  • Field Details

  • Element Details

    • skipIfPresent

      boolean skipIfPresent
      When true, an existing non-null value will be preserved and not overwritten during auto-population on insert. Default false preserves existing behavior of always setting the value on insert.
      Returns:
      true if an existing non-null value should be preserved, false otherwise
      Since:
      5.0
      Default:
      false
    • truncatedTo

      ChronoUnit truncatedTo
      Allows to truncate the auto set date value.
      Returns:
      the truncated to constant
      Since:
      3.4.2
      Default:
      FOREVER