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
FieldsModifier and TypeFieldDescriptionstatic final StringThe annotation name.static final StringThe metadata key forskipIfPresent(). -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhen 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
-
NAME
The annotation name. -
SKIP_IF_PRESENT
-
-
Element Details
-
skipIfPresent
boolean skipIfPresentWhen 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:
trueif an existing non-null value should be preserved,falseotherwise- Since:
- 5.0
- Default:
false
-
truncatedTo
ChronoUnit truncatedToAllows to truncate the auto set date value.- Returns:
- the truncated to constant
- Since:
- 3.4.2
- Default:
FOREVER
-