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
-
Constructor Summary
ConstructorDescriptionBasicRelationalPersistentProperty
(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
Returns whether the property uses an annotated field name throughColumn
.boolean
boolean
isEntity()
boolean
boolean
Returns whether this property is only to be used during inserts and read.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.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, isReadable
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, isReadable, 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>
-
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.
-
hasExplicitColumnName
public boolean hasExplicitColumnName()Description copied from interface:RelationalPersistentProperty
Returns whether the property uses an annotated field name throughColumn
.- Specified by:
hasExplicitColumnName
in interfaceRelationalPersistentProperty
- Returns:
-
getOwner
- Specified by:
getOwner
in interfacePersistentProperty<RelationalPersistentProperty>
- Specified by:
getOwner
in interfaceRelationalPersistentProperty
- Overrides:
getOwner
in classAbstractPersistentProperty<RelationalPersistentProperty>
-
getReverseColumnName
- Specified by:
getReverseColumnName
in interfaceRelationalPersistentProperty
-
getReverseColumnName
- Specified by:
getReverseColumnName
in interfaceRelationalPersistentProperty
- Parameters:
owner
- the owning entity.- Returns:
- the column name to represent the owning side.
-
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
-
isInsertOnly
public boolean isInsertOnly()Description copied from interface:RelationalPersistentProperty
Returns whether this property is only to be used during inserts and read.- Specified by:
isInsertOnly
in interfaceRelationalPersistentProperty
-