public class PersistentPropertyPathExtension extends Object
PersistentPropertyPath
for making common operations
available used in SQL generation and conversionConstructor and Description |
---|
PersistentPropertyPathExtension(MappingContext<RelationalPersistentEntity<?>,RelationalPersistentProperty> context,
PersistentPropertyPath<RelationalPersistentProperty> path)
Creates a non-empty path.
|
PersistentPropertyPathExtension(MappingContext<RelationalPersistentEntity<?>,RelationalPersistentProperty> context,
RelationalPersistentEntity<?> entity)
Creates the empty path referencing the root itself.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
PersistentPropertyPathExtension |
extendBy(RelationalPersistentProperty property)
Creates a new path by extending the current path by the property passed as an argument.
|
Class<?> |
getActualType()
For empty paths this is the type of the entity.
|
SqlIdentifier |
getColumnAlias()
The alias for the column used to represent this property in the database.
|
SqlIdentifier |
getColumnName()
The name of the column used to represent this property in the database.
|
SqlIdentifier |
getEffectiveIdColumnName()
If the table owning ancestor has an id the column name of that id property is returned.
|
SqlIdentifier |
getIdColumnName()
The column name of the id column of the ancestor path that represents an actual table.
|
PersistentPropertyPathExtension |
getIdDefiningParentPath()
Returns the longest ancestor path that has an
Id property. |
RelationalPersistentEntity<?> |
getLeafEntity()
The
RelationalPersistentEntity associated with the leaf of this path. |
int |
getLength()
The length of the path.
|
PersistentPropertyPathExtension |
getParentPath()
Returns the path that has the same beginning but is one segment shorter than this path.
|
SqlIdentifier |
getQualifierColumn()
The column name used for the list index or map key of the leaf property of this path.
|
Class<?> |
getQualifierColumnType()
The type of the qualifier column of the leaf property of this path or null if this is not applicable.
|
RelationalPersistentProperty |
getRequiredIdProperty()
The id property of the final element of the path.
|
PersistentPropertyPath<RelationalPersistentProperty> |
getRequiredPersistentPropertyPath()
Converts this path to a non-null
PersistentPropertyPath . |
SqlIdentifier |
getReverseColumnName()
The name of the column used to reference the id in the parent table.
|
SqlIdentifier |
getReverseColumnNameAlias()
The alias used in select for the column used to reference the id in the parent table.
|
SqlIdentifier |
getTableAlias()
The alias used for the table on which this path is based.
|
SqlIdentifier |
getTableName()
The name of the table this path is tied to or of the longest ancestor path that is actually tied to a table.
|
int |
hashCode() |
boolean |
hasIdProperty() |
boolean |
isCollectionLike() |
boolean |
isEmbedded()
Returns true exactly when the path is non empty and the leaf property an embedded one.
|
boolean |
isEntity() |
boolean |
isMap() |
boolean |
isMultiValued()
Returns true if there are multiple values for this path, i.e. if the path contains at least one element
that is a collection and array or a map.
|
boolean |
isOrdered() |
boolean |
isQualified() |
boolean |
matches(PersistentPropertyPath<RelationalPersistentProperty> path)
Tests if
this and the argument represent the same path. |
String |
toString() |
public PersistentPropertyPathExtension(MappingContext<RelationalPersistentEntity<?>,RelationalPersistentProperty> context, RelationalPersistentEntity<?> entity)
context
- Must not be null.entity
- Root entity of the path. Must not be null.public PersistentPropertyPathExtension(MappingContext<RelationalPersistentEntity<?>,RelationalPersistentProperty> context, PersistentPropertyPath<RelationalPersistentProperty> path)
context
- must not be null.path
- must not be null.public boolean isEmbedded()
public PersistentPropertyPathExtension getParentPath()
IllegalStateException
- when called on an empty path.public boolean isMultiValued()
@Nullable public RelationalPersistentEntity<?> getLeafEntity()
RelationalPersistentEntity
associated with the leaf of this path.public boolean isEntity()
public boolean isCollectionLike()
Collection
or an array.public SqlIdentifier getReverseColumnName()
IllegalStateException
- when called on an empty path.public SqlIdentifier getReverseColumnNameAlias()
IllegalStateException
- when called on an empty path.public SqlIdentifier getColumnName()
IllegalStateException
- when called on an empty path.public SqlIdentifier getColumnAlias()
IllegalStateException
- when called on an empty path.public boolean hasIdProperty()
public PersistentPropertyPathExtension getIdDefiningParentPath()
Id
property.public SqlIdentifier getTableName()
@Nullable public SqlIdentifier getTableAlias()
public SqlIdentifier getIdColumnName()
public SqlIdentifier getEffectiveIdColumnName()
public int getLength()
public boolean matches(PersistentPropertyPath<RelationalPersistentProperty> path)
this
and the argument represent the same path.path
- to which this path gets compared. May be null.public RelationalPersistentProperty getRequiredIdProperty()
IllegalStateException
- if no such property exists.@Nullable public SqlIdentifier getQualifierColumn()
@Nullable public Class<?> getQualifierColumnType()
public PersistentPropertyPathExtension extendBy(RelationalPersistentProperty property)
property
- must not be null.public Class<?> getActualType()
PersistentProperty.getActualType()
public boolean isOrdered()
RelationalPersistentProperty.isOrdered()
public boolean isMap()
Map
.PersistentProperty.isMap()
public PersistentPropertyPath<RelationalPersistentProperty> getRequiredPersistentPropertyPath()
PersistentPropertyPath
.IllegalStateException
- if this path is empty.protected boolean canEqual(Object other)
Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.