Class GeneratedCounterInteger
- java.lang.Object
-
- io.ebeaninternal.server.deploy.generatedproperty.GeneratedCounterInteger
-
- All Implemented Interfaces:
GeneratedProperty
public class GeneratedCounterInteger extends Object implements GeneratedProperty
Used to create a counter version column for Integer.
-
-
Constructor Summary
Constructors Constructor Description GeneratedCounterInteger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getInsertValue(BeanProperty prop, EntityBean bean, long now)
Always returns a 1.Object
getUpdateValue(BeanProperty prop, EntityBean bean, long now)
Increments the current value by one.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 setting initial counter value to 1.boolean
includeInUpdate()
Include this in every update.boolean
isDDLNotNullable()
Return true if the GeneratedProperty implies the DDL to create the DB column should have a not null constraint.
-
-
-
Constructor Detail
-
GeneratedCounterInteger
public GeneratedCounterInteger()
-
-
Method Detail
-
getInsertValue
public Object getInsertValue(BeanProperty prop, EntityBean bean, long now)
Always returns a 1.- Specified by:
getInsertValue
in interfaceGeneratedProperty
-
getUpdateValue
public Object getUpdateValue(BeanProperty prop, EntityBean bean, long now)
Increments the current value by one.- Specified by:
getUpdateValue
in interfaceGeneratedProperty
-
includeInUpdate
public boolean includeInUpdate()
Include this in every update.- 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 setting initial counter value to 1.- 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
-
-