Interface Property<T>
- Type Parameters:
T- the property value type
- All Superinterfaces:
Attribute<T>
An
Attribute which is neither a Column nor a ForeignKey: a value the entity holds
which its table does not.
A property is defined as one of three kinds:
Property.PropertyDefiner.property(), a value the entity carries along, never selected nor written, seePropertyDefinitionProperty.PropertyDefiner.derived(), a value derived from other attributes of the entity, seeDerivedPropertyDefinitionProperty.PropertyDefiner.denormalized(), a value taken from a referenced entity
Note that property names are case-sensitive and properties are equal if their names and entity types are equal, the value type not factoring into equality. A property is never equal to a column or a foreign key.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceProvidesAttributeDefinition.Builderinstances for a property.Nested classes/interfaces inherited from interface Attribute
Attribute.DataType<T> -
Method Summary
Modifier and TypeMethodDescriptionas()as(PropertyTemplate<T> template) Returns anAttributeDefinition.Builderfor this property, configured by the given template.static <T> Property<T> property(EntityType entityType, String name, Class<T> type) Creates a newProperty, associated with the given entityType.Methods inherited from interface Attribute
entityType, name, type
-
Method Details
-
as
Property.PropertyDefiner<T> as()- Returns:
- a
Property.PropertyDefinerfor this property
-
as
Returns anAttributeDefinition.Builderfor this property, configured by the given template.The template is applied first, any subsequent configuration overriding it.
- Parameters:
template- the property template- Returns:
- a
AttributeDefinition.Builderconfigured by the given template
-
property
Creates a newProperty, associated with the given entityType.Used by
EntityType, applications useEntityType.property(String, Class).- Type Parameters:
T- the property type- Parameters:
entityType- the entityType owning this propertyname- the property nametype- the class representing the property value type- Returns:
- a new
Property
-