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
SQL-specific
PersistentProperty implementation.- Author:
- Jens Schauder, Greg Turnquist, Florian Lüdiger, Bastian Wilhelm, Kurt Niemi, Sergey Korotaev, Mark Paluch
-
Constructor Summary
ConstructorsConstructorDescriptionBasicRelationalPersistentProperty(Property property, PersistentEntity<?, RelationalPersistentProperty> owner, SimpleTypeHolder simpleTypeHolder, NamingStrategy namingStrategy) Creates a newBasicRelationalPersistentProperty. -
Method Summary
Modifier and TypeMethodDescriptionprotected Association<RelationalPersistentProperty>Returns the name of the column backing this property.@Nullable SqlIdentifiergetOwner()Class<?>@Nullable SqlIdentifierbooleanReturns whether the property uses an annotated field name throughColumn.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, isMap, isReadableMethods 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, isReadable, isTransient, isVersionProperty, isWritable, usePropertyAccessMethods inherited from interface org.springframework.data.relational.core.mapping.RelationalPersistentProperty
hasSequence
-
Constructor Details
-
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.
-
hasExplicitColumnName
public boolean hasExplicitColumnName()Description copied from interface:RelationalPersistentPropertyReturns whether the property uses an annotated field name throughColumn.- Specified by:
hasExplicitColumnNamein interfaceRelationalPersistentProperty- Returns:
-
getOwner
- Specified by:
getOwnerin interfacePersistentProperty<RelationalPersistentProperty>- Specified by:
getOwnerin interfaceRelationalPersistentProperty- Overrides:
getOwnerin classAbstractPersistentProperty<RelationalPersistentProperty>
-
getReverseColumnName
- Specified by:
getReverseColumnNamein interfaceRelationalPersistentProperty- Parameters:
owner- the owning entity.- Returns:
- the column name to represent the owning side.
-
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 empty.
-
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
-
getSequence
- Specified by:
getSequencein interfaceRelationalPersistentProperty- Returns:
- the target sequence that should be used for value generation.
-