Class GeneratedUpdateLong
- java.lang.Object
-
- io.ebeaninternal.server.deploy.generatedproperty.GeneratedUpdateLong
-
- All Implemented Interfaces:
GeneratedProperty
public class GeneratedUpdateLong extends Object implements GeneratedProperty
Generate a (Long) Timestamp whenever the bean is inserted or updated.
-
-
Constructor Summary
Constructors Constructor Description GeneratedUpdateLong()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getInsertValue(BeanProperty prop, EntityBean bean, long now)
Return now as a Timestamp.Object
getUpdateValue(BeanProperty prop, EntityBean bean, long now)
Return now as a Timestamp.boolean
includeInAllUpdates()
Return true if the property should be included in an update even if it is not loaded (ie.boolean
includeInInsert()
Include this in every insert.boolean
includeInUpdate()
For dynamic table updates make sure this is included.boolean
isDDLNotNullable()
Return true if the GeneratedProperty implies the DDL to create the DB column should have a not null constraint.
-
-
-
Constructor Detail
-
GeneratedUpdateLong
public GeneratedUpdateLong()
-
-
Method Detail
-
getInsertValue
public Object getInsertValue(BeanProperty prop, EntityBean bean, long now)
Return now as a Timestamp.- Specified by:
getInsertValue
in interfaceGeneratedProperty
-
getUpdateValue
public Object getUpdateValue(BeanProperty prop, EntityBean bean, long now)
Return now as a Timestamp.- Specified by:
getUpdateValue
in interfaceGeneratedProperty
-
includeInUpdate
public boolean includeInUpdate()
For dynamic table updates make sure this is included.- Specified by:
includeInUpdate
in interfaceGeneratedProperty
-
includeInAllUpdates
public boolean includeInAllUpdates()
Description copied from interface:GeneratedProperty
Return true if the property should be included in an update even if it is not loaded (ie. Last Updated Timestamp).- Specified by:
includeInAllUpdates
in interfaceGeneratedProperty
-
includeInInsert
public boolean includeInInsert()
Include this in every insert.- Specified by:
includeInInsert
in interfaceGeneratedProperty
-
isDDLNotNullable
public boolean isDDLNotNullable()
Description copied from interface:GeneratedProperty
Return true if the GeneratedProperty implies the DDL to create the DB column should have a not null constraint.- Specified by:
isDDLNotNullable
in interfaceGeneratedProperty
-
-