Package org.fastnate.generator.context
Class VersionProperty<E,T>
java.lang.Object
org.fastnate.generator.context.Property<E,T>
org.fastnate.generator.context.SingularProperty<E,T>
org.fastnate.generator.context.PrimitiveProperty<E,T>
org.fastnate.generator.context.VersionProperty<E,T>
- Type Parameters:
E- The type of the container classT- The type of the property
Represents a property marked with
Version.- Author:
- Tobias Liefke
-
Constructor Summary
ConstructorsConstructorDescriptionVersionProperty(GeneratorContext context, GeneratorTable table, AttributeAccessor attribute, jakarta.persistence.Column column) Creates a new instance ofVersionProperty. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetDefaultValue(AttributeAccessor attribute) Finds the default value from the given attribute.Methods inherited from class org.fastnate.generator.context.PrimitiveProperty
addInsertExpression, getColumn, getContext, getConverter, getDefaultValue, getDialect, getExpression, getPredicate, getTable, isRequiredMethods inherited from class org.fastnate.generator.context.SingularProperty
isTableColumnMethods inherited from class org.fastnate.generator.context.Property
createPostInsertStatements, createPreInsertStatements, failIfRequired, findReferencedEntities, generatePendingStatements, getAttribute, getName, getType, getValue, isComposition, setValue, toString
-
Constructor Details
-
VersionProperty
public VersionProperty(GeneratorContext context, GeneratorTable table, AttributeAccessor attribute, jakarta.persistence.Column column) Creates a new instance ofVersionProperty.- Parameters:
context- the current contexttable- the table that the column belongs toattribute- the accessor of the version attributecolumn- the column annotation
-
-
Method Details
-
getDefaultValue
Description copied from class:PrimitivePropertyFinds the default value from the given attribute.- Overrides:
getDefaultValuein classPrimitiveProperty<E,T> - Parameters:
attribute- the current attribute of the property- Returns:
- the default value or
nullif none is set - See Also:
-