Class BasicRelationalPersistentProperty
java.lang.Object
org.springframework.data.mapping.model.AbstractPersistentProperty<P>
org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<RelationalPersistentProperty>
org.springframework.data.relational.core.mapping.BasicRelationalPersistentProperty
- All Implemented Interfaces:
PersistentProperty<RelationalPersistentProperty>
,RelationalPersistentProperty
- Direct Known Subclasses:
BasicJdbcPersistentProperty
public class BasicRelationalPersistentProperty
extends AnnotationBasedPersistentProperty<RelationalPersistentProperty>
implements RelationalPersistentProperty
Meta data about a property to be used by repository implementations.
- Author:
- Jens Schauder, Greg Turnquist, Florian Lüdiger, Bastian Wilhelm
-
Constructor Summary
ConstructorsConstructorDescriptionBasicRelationalPersistentProperty
(Property property, PersistentEntity<?, RelationalPersistentProperty> owner, SimpleTypeHolder simpleTypeHolder, NamingStrategy namingStrategy) Creates a newBasicRelationalPersistentProperty
.BasicRelationalPersistentProperty
(Property property, PersistentEntity<?, RelationalPersistentProperty> owner, SimpleTypeHolder simpleTypeHolder, RelationalMappingContext context) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected Association<RelationalPersistentProperty>
Returns the name of the column backing this property.getOwner()
Class<?>
boolean
boolean
isEntity()
boolean
boolean
Returns whether this property is an ordered property.boolean
Returns if this property is a qualified property, i.e. a property referencing multiple elements that can get picked by a key or an index.boolean
void
setForceQuote
(boolean forceQuote) boolean
Returns whether an empty embedded object is supposed to be created for this property.Methods inherited from class org.springframework.data.mapping.model.AnnotationBasedPersistentProperty
findAnnotation, findPropertyOrOwnerAnnotation, getAssociationTargetTypeInformation, getSpelExpression, isAnnotationPresent, isAssociation, isIdProperty, isTransient, isVersionProperty, isWritable, toString, usePropertyAccess
Methods inherited from class org.springframework.data.mapping.model.AbstractPersistentProperty
equals, getActualType, getActualTypeInformation, getAssociation, getAssociationTargetType, getComponentType, getField, getGetter, getMapValueType, getName, getPersistentEntityTypeInformation, getProperty, getRawType, getSetter, getType, getTypeInformation, getWither, hashCode, isArray, isCollectionLike, isImmutable, isMap
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.data.mapping.PersistentProperty
findAnnotation, findPropertyOrOwnerAnnotation, getAccessorForOwner, getActualType, getAssociation, getAssociationTargetType, getAssociationTargetTypeInformation, getComponentType, getField, getGetter, getMapValueType, getName, getPersistentEntityTypeInformation, getRawType, getRequiredAnnotation, getRequiredAssociation, getRequiredField, getRequiredGetter, getRequiredSetter, getRequiredWither, getSetter, getSpelExpression, getType, getTypeInformation, getWither, hasActualTypeAnnotation, isAnnotationPresent, isArray, isAssociation, isCollectionLike, isIdProperty, isImmutable, isMap, isTransient, isVersionProperty, isWritable, usePropertyAccess
-
Constructor Details
-
BasicRelationalPersistentProperty
@Deprecated public BasicRelationalPersistentProperty(Property property, PersistentEntity<?, RelationalPersistentProperty> owner, SimpleTypeHolder simpleTypeHolder, RelationalMappingContext context) Deprecated.Creates a newBasicRelationalPersistentProperty
.- Parameters:
property
- must not be null.owner
- must not be null.simpleTypeHolder
- must not be null.context
- must not be null- Since:
- 2.0, use
BasicRelationalPersistentProperty(Property, PersistentEntity, SimpleTypeHolder, NamingStrategy)
.
-
BasicRelationalPersistentProperty
public BasicRelationalPersistentProperty(Property property, PersistentEntity<?, RelationalPersistentProperty> owner, SimpleTypeHolder simpleTypeHolder, NamingStrategy namingStrategy) Creates a newBasicRelationalPersistentProperty
.- Parameters:
property
- must not be null.owner
- must not be null.simpleTypeHolder
- must not be null.namingStrategy
- must not be null- Since:
- 2.0
-
-
Method Details
-
createAssociation
- Specified by:
createAssociation
in classAbstractPersistentProperty<RelationalPersistentProperty>
-
isForceQuote
public boolean isForceQuote() -
setForceQuote
public void setForceQuote(boolean forceQuote) -
isEntity
public boolean isEntity()- Specified by:
isEntity
in interfacePersistentProperty<RelationalPersistentProperty>
- Overrides:
isEntity
in classAbstractPersistentProperty<RelationalPersistentProperty>
-
isReference
public boolean isReference()- Specified by:
isReference
in interfaceRelationalPersistentProperty
- Returns:
-
getColumnName
Description copied from interface:RelationalPersistentProperty
Returns the name of the column backing this property.- Specified by:
getColumnName
in interfaceRelationalPersistentProperty
- Returns:
- the name of the column backing this property.
-
getOwner
- Specified by:
getOwner
in interfacePersistentProperty<RelationalPersistentProperty>
- Specified by:
getOwner
in interfaceRelationalPersistentProperty
- Overrides:
getOwner
in classAbstractPersistentProperty<RelationalPersistentProperty>
-
getReverseColumnName
- Specified by:
getReverseColumnName
in interfaceRelationalPersistentProperty
-
getKeyColumn
- Specified by:
getKeyColumn
in interfaceRelationalPersistentProperty
-
isQualified
public boolean isQualified()Description copied from interface:RelationalPersistentProperty
Returns if this property is a qualified property, i.e. a property referencing multiple elements that can get picked by a key or an index.- Specified by:
isQualified
in interfaceRelationalPersistentProperty
-
getQualifierColumnType
- Specified by:
getQualifierColumnType
in interfaceRelationalPersistentProperty
-
isOrdered
public boolean isOrdered()Description copied from interface:RelationalPersistentProperty
Returns whether this property is an ordered property.- Specified by:
isOrdered
in interfaceRelationalPersistentProperty
-
isEmbedded
public boolean isEmbedded()- Specified by:
isEmbedded
in interfaceRelationalPersistentProperty
- Returns:
- true, if the Property is an embedded value object, otherwise false.
-
getEmbeddedPrefix
- Specified by:
getEmbeddedPrefix
in interfaceRelationalPersistentProperty
- Returns:
- Prefix for embedded columns. If the column is not embedded the return value is null.
-
shouldCreateEmptyEmbedded
public boolean shouldCreateEmptyEmbedded()Description copied from interface:RelationalPersistentProperty
Returns whether an empty embedded object is supposed to be created for this property.- Specified by:
shouldCreateEmptyEmbedded
in interfaceRelationalPersistentProperty
- Returns:
-