org.springframework.data.relational.core.mapping

## 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

Constructors
Constructor and Description
`BasicRelationalPersistentProperty(Property property, PersistentEntity<?,RelationalPersistentProperty> owner, SimpleTypeHolder simpleTypeHolder, NamingStrategy namingStrategy)` Creates a new `BasicRelationalPersistentProperty`.
`BasicRelationalPersistentProperty(Property property, PersistentEntity<?,RelationalPersistentProperty> owner, SimpleTypeHolder simpleTypeHolder, RelationalMappingContext context)` Deprecated.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected Association<RelationalPersistentProperty>` `createAssociation()`
`SqlIdentifier` `getColumnName()` Returns the name of the column backing this property.
`String` `getEmbeddedPrefix()`
`SqlIdentifier` `getKeyColumn()`
`RelationalPersistentEntity<?>` `getOwner()`
`Class<?>` `getQualifierColumnType()`
`SqlIdentifier` `getReverseColumnName(PersistentPropertyPathExtension path)`
`boolean` `isEmbedded()`
`boolean` `isEntity()`
`boolean` `isForceQuote()`
`boolean` `isOrdered()` Returns whether this property is an ordered property.
`boolean` `isQualified()` 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` `isReference()`
`void` `setForceQuote(boolean forceQuote)`
`boolean` `shouldCreateEmptyEmbedded()` 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, getAssociationTargetType, getSpelExpression, isAnnotationPresent, isAssociation, isIdProperty, isTransient, isVersionProperty, isWritable, toString, usePropertyAccess`

### Methods inherited from class org.springframework.data.mapping.model.AbstractPersistentProperty

`equals, getActualType, getAssociation, getComponentType, getField, getGetter, getMapValueType, getName, getPersistentEntityTypes, 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, getComponentType, getField, getGetter, getMapValueType, getName, getPersistentEntityTypes, 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 Detail

#### BasicRelationalPersistentProperty

    @Deprecated
    public BasicRelationalPersistentProperty(Property property,
                                                         PersistentEntity<?,RelationalPersistentProperty> owner,
                                                         SimpleTypeHolder simpleTypeHolder,
                                                         RelationalMappingContext context)

Deprecated.
Creates a new `BasicRelationalPersistentProperty`.

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 new `BasicRelationalPersistentProperty`.

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 Detail

#### createAssociation

    protected Association<RelationalPersistentProperty> createAssociation()

Specified by:
  `createAssociation` in class `AbstractPersistentProperty<RelationalPersistentProperty>`

#### isForceQuote

    public boolean isForceQuote()

#### setForceQuote

    public void setForceQuote(boolean forceQuote)

#### isEntity

    public boolean isEntity()

Specified by:
  `isEntity` in interface `PersistentProperty<RelationalPersistentProperty>`
Overrides:
  `isEntity` in class `AbstractPersistentProperty<RelationalPersistentProperty>`

#### isReference

    public boolean isReference()

Specified by:
  `isReference` in interface `RelationalPersistentProperty`

#### getColumnName

    public SqlIdentifier getColumnName()

Description copied from interface: `RelationalPersistentProperty`
Returns the name of the column backing this property.

Specified by:
  `getColumnName` in interface `RelationalPersistentProperty`
Returns:
  the name of the column backing this property.

#### getOwner

    public RelationalPersistentEntity<?> getOwner()

Specified by:
  `getOwner` in interface `PersistentProperty<RelationalPersistentProperty>`
Specified by:
  `getOwner` in interface `RelationalPersistentProperty`
Overrides:
  `getOwner` in class `AbstractPersistentProperty<RelationalPersistentProperty>`

#### getReverseColumnName

    public SqlIdentifier getReverseColumnName(PersistentPropertyPathExtension path)

Specified by:
  `getReverseColumnName` in interface `RelationalPersistentProperty`

#### getKeyColumn

    public SqlIdentifier getKeyColumn()

Specified by:
  `getKeyColumn` in interface `RelationalPersistentProperty`

#### 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 interface `RelationalPersistentProperty`

#### getQualifierColumnType

    public Class<?> getQualifierColumnType()

Specified by:
  `getQualifierColumnType` in interface `RelationalPersistentProperty`

#### isOrdered

    public boolean isOrdered()

Description copied from interface: `RelationalPersistentProperty`
Returns whether this property is an ordered property.

Specified by:
  `isOrdered` in interface `RelationalPersistentProperty`

#### isEmbedded

    public boolean isEmbedded()

Specified by:
  `isEmbedded` in interface `RelationalPersistentProperty`
Returns:
  true, if the Property is an embedded value object, otherwise false.

#### getEmbeddedPrefix

    public String getEmbeddedPrefix()

Specified by:
  `getEmbeddedPrefix` in interface `RelationalPersistentProperty`
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 interface `RelationalPersistentProperty`
Returns: