current_timestamp function or the JVM
current instant.
Underlies the CurrentTimestamp, CreationTimestamp, and
UpdateTimestamp annotations.
CurrentTimestamp, CreationTimestamp, UpdateTimestamp
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static interface | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final CurrentTimestampGeneration. | |
| private final EnumSet | |
| private static final Map | |
| private static final Map |
| Access | Constructor and Description |
|---|---|
| public | CurrentTimestampGeneration(CurrentTimestamp annotation, Member member, GeneratorCreationContext context)
|
| public | CurrentTimestampGeneration(CreationTimestamp annotation, Member member, GeneratorCreationContext context)
|
| public | CurrentTimestampGeneration(UpdateTimestamp annotation, Member member, GeneratorCreationContext context)
|
| Modifier and Type | Method and Description |
|---|---|
| public Object | generate(SharedSessionContractImplementor
The session from which the request originates. session, Object The instance of the object owning the attribute for which we are generating a value. owner, Object The current value assigned to the property, or currentValue, EventType nullThe type of event that has triggered generation of a new value eventType)Implements org. |
| public boolean | generatedOnExecution()
Overrides default org. |
| public EnumSet | getEventTypes()
Implements org. |
| private static CurrentTimestampGeneration. | |
| pack-priv static CurrentTimestampGeneration. | |
| public String[] | getReferencedColumnValues(Dialect
The SQL dialect, allowing generation of an expression
in dialect-specific SQL. dialect)Implements org. |
| public boolean | referenceColumnsInSql(Dialect dialect)
Implements org. insert or update statement.
|
| public boolean | writePropertyValue()
Implements org. ?
|
| delegate | back to summary |
|---|---|
| private final CurrentTimestampGeneration. | |
| eventTypes | back to summary |
|---|---|
| private final EnumSet<EventType> eventTypes | |
| GENERATOR_DELEGATES | back to summary |
|---|---|
| private static final Map<CurrentTimestampGeneration. | |
| GENERATOR_PRODUCERS | back to summary |
|---|---|
| private static final Map<Class<?>, IntFunction<CurrentTimestampGeneration. | |
| CurrentTimestampGeneration | back to summary |
|---|---|
| public CurrentTimestampGeneration(CurrentTimestamp annotation, Member member, GeneratorCreationContext context) | |
| CurrentTimestampGeneration | back to summary |
|---|---|
| public CurrentTimestampGeneration(CreationTimestamp annotation, Member member, GeneratorCreationContext context) | |
| CurrentTimestampGeneration | back to summary |
|---|---|
| public CurrentTimestampGeneration(UpdateTimestamp annotation, Member member, GeneratorCreationContext context) | |
| generate | back to summary |
|---|---|
| public Object generate(SharedSessionContractImplementor session, Object owner, Object currentValue, EventType eventType) Implements org. Doc from org. Generate a value.
| |
| generatedOnExecution | back to summary |
|---|---|
| public boolean generatedOnExecution() Overrides default org. Doc from org. Determines if the property value is generated when a row is written to the database, or in Java code that executes before the row is written.
| |
| getEventTypes | back to summary |
|---|---|
| public EnumSet Implements org. Doc from org. The event types for which this generator should be called to produce a new value.
Identifier generators must return | |
| getGeneratorDelegate | back to summary |
|---|---|
| private static CurrentTimestampGeneration. | |
| getGeneratorDelegate | back to summary |
|---|---|
| pack-priv static CurrentTimestampGeneration. | |
| getReferencedColumnValues | back to summary |
|---|---|
| public String[] getReferencedColumnValues(Dialect dialect) Implements org. Doc from org. A SQL expression indicating how to calculate the generated values when the mapped columns are included in the SQL statement. The SQL expressions might be:
| |
| referenceColumnsInSql | back to summary |
|---|---|
| public boolean referenceColumnsInSql(Dialect dialect) Implements org. Doc from org. Determines if the columns whose values are generated are included in the column list
of the SQL
| |
| writePropertyValue | back to summary |
|---|---|
| public boolean writePropertyValue() Implements org. Doc from org. Determines if the property values are written to JDBC as the argument of a JDBC
| |
| generate | back to summary |
|---|---|
| public Object generate() | |
| Modifier and Type | Field and Description |
|---|---|
| private final Class | |
| private final int |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public int |
| clazz | back to summary |
|---|---|
| private final Class<?> clazz | |
| precision | back to summary |
|---|---|
| private final int precision | |
| Key | back to summary |
|---|---|
| public Key(Class<?> clazz, int precision) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |