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
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<?>booleanbooleanisEntity()booleanbooleanReturns whether this property is only to be used during inserts and read.booleanReturns whether this property is an ordered property.booleanReturns if this property is a qualified property, i.e. a property referencing multiple elements that can get picked by a key or an index.voidsetForceQuote(boolean forceQuote) booleanReturns 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, usePropertyAccessMethods 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, isMapMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
createAssociationin classAbstractPersistentProperty<RelationalPersistentProperty>
-
isForceQuote
public boolean isForceQuote() -
setForceQuote
public void setForceQuote(boolean forceQuote) -
isEntity
public boolean isEntity()- Specified by:
isEntityin interfacePersistentProperty<RelationalPersistentProperty>- Overrides:
isEntityin classAbstractPersistentProperty<RelationalPersistentProperty>
-
getColumnName
Description copied from interface:RelationalPersistentPropertyReturns the name of the column backing this property.- Specified by:
getColumnNamein interfaceRelationalPersistentProperty- Returns:
- the name of the column backing this property.
-
getOwner
- Specified by:
getOwnerin interfacePersistentProperty<RelationalPersistentProperty>- Specified by:
getOwnerin interfaceRelationalPersistentProperty- Overrides:
getOwnerin classAbstractPersistentProperty<RelationalPersistentProperty>
-
getReverseColumnName
- Specified by:
getReverseColumnNamein interfaceRelationalPersistentProperty
-
getKeyColumn
- Specified by:
getKeyColumnin interfaceRelationalPersistentProperty
-
isQualified
public boolean isQualified()Description copied from interface:RelationalPersistentPropertyReturns 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:
isQualifiedin interfaceRelationalPersistentProperty
-
getQualifierColumnType
- Specified by:
getQualifierColumnTypein interfaceRelationalPersistentProperty
-
isOrdered
public boolean isOrdered()Description copied from interface:RelationalPersistentPropertyReturns whether this property is an ordered property.- Specified by:
isOrderedin interfaceRelationalPersistentProperty
-
isEmbedded
public boolean isEmbedded()- Specified by:
isEmbeddedin interfaceRelationalPersistentProperty- Returns:
- true, if the Property is an embedded value object, otherwise false.
-
getEmbeddedPrefix
- Specified by:
getEmbeddedPrefixin 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:RelationalPersistentPropertyReturns whether an empty embedded object is supposed to be created for this property.- Specified by:
shouldCreateEmptyEmbeddedin interfaceRelationalPersistentProperty
-
isInsertOnly
public boolean isInsertOnly()Description copied from interface:RelationalPersistentPropertyReturns whether this property is only to be used during inserts and read.- Specified by:
isInsertOnlyin interfaceRelationalPersistentProperty
-