Class PersistentPropertyPathExtension
java.lang.Object
org.springframework.data.relational.core.mapping.PersistentPropertyPathExtension
@Deprecated(since="3.2",
forRemoval=true)
public class PersistentPropertyPathExtension
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
A wrapper around a
PersistentPropertyPath
for making common operations
available used in SQL generation and conversion- Since:
- 1.1
- Author:
- Jens Schauder, Daniil Razorenov, Kurt Niemi
-
Constructor Summary
ConstructorDescriptionPersistentPropertyPathExtension
(MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> context, PersistentPropertyPath<? extends RelationalPersistentProperty> path) Deprecated, for removal: This API element is subject to removal in a future version.Creates a non-empty path.PersistentPropertyPathExtension
(MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> context, RelationalPersistentEntity<?> entity) Deprecated, for removal: This API element is subject to removal in a future version.Creates the empty path referencing the root itself. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated, for removal: This API element is subject to removal in a future version.extendBy
(RelationalPersistentProperty property) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new path by extending the current path by the property passed as an argument.Class<?>
Deprecated, for removal: This API element is subject to removal in a future version.For empty paths this is the type of the entity.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.The alias for the column used to represent this property in the database.Deprecated, for removal: This API element is subject to removal in a future version.The name of the column used to represent this property in the database.Deprecated, for removal: This API element is subject to removal in a future version.If the table owning ancestor has an id the column name of that id property is returned.Deprecated, for removal: This API element is subject to removal in a future version.The column name of the id column of the ancestor path that represents an actual table.Deprecated, for removal: This API element is subject to removal in a future version.Returns the longest ancestor path that has anId
property.Deprecated, for removal: This API element is subject to removal in a future version.TheRelationalPersistentEntity
associated with the leaf of this path.int
Deprecated, for removal: This API element is subject to removal in a future version.The length of the path.Deprecated, for removal: This API element is subject to removal in a future version.Returns the path that has the same beginning but is one segment shorter than this path.Deprecated, for removal: This API element is subject to removal in a future version.The fully qualified name of the table this path is tied to or of the longest ancestor path that is actually tied to a table.Deprecated, for removal: This API element is subject to removal in a future version.The column name used for the list index or map key of the leaf property of this path.Class<?>
Deprecated, for removal: This API element is subject to removal in a future version.The type of the qualifier column of the leaf property of this path or null if this is not applicable.Deprecated, for removal: This API element is subject to removal in a future version.The id property of the final element of the path.Deprecated, for removal: This API element is subject to removal in a future version.TheRelationalPersistentEntity
associated with the leaf of this path or throwIllegalStateException
if the leaf cannot be resolved.Deprecated, for removal: This API element is subject to removal in a future version.Converts this path to a non-nullPersistentPropertyPath
.Deprecated, for removal: This API element is subject to removal in a future version.The name of the column used to reference the id in the parent table.Deprecated, for removal: This API element is subject to removal in a future version.The alias used in select for the column used to reference the id in the parent table.Deprecated, for removal: This API element is subject to removal in a future version.The alias used for the table on which this path is based.Deprecated, for removal: This API element is subject to removal in a future version.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()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Returns true exactly when the path is non-empty and the leaf property an embedded one.boolean
isEntity()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isMap()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.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
Deprecated, for removal: This API element is subject to removal in a future version.static boolean
isWritable
(PersistentPropertyPath<? extends RelationalPersistentProperty> path) Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Tests ifthis
and the argument represent the same path.toString()
Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
PersistentPropertyPathExtension
public PersistentPropertyPathExtension(MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> context, RelationalPersistentEntity<?> entity) Deprecated, for removal: This API element is subject to removal in a future version.Creates the empty path referencing the root itself.- Parameters:
context
- Must not be null.entity
- Root entity of the path. Must not be null.
-
PersistentPropertyPathExtension
public PersistentPropertyPathExtension(MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> context, PersistentPropertyPath<? extends RelationalPersistentProperty> path) Deprecated, for removal: This API element is subject to removal in a future version.Creates a non-empty path.- Parameters:
context
- must not be null.path
- must not be null.
-
-
Method Details
-
isWritable
public static boolean isWritable(@Nullable PersistentPropertyPath<? extends RelationalPersistentProperty> path) Deprecated, for removal: This API element is subject to removal in a future version. -
isEmbedded
public boolean isEmbedded()Deprecated, for removal: This API element is subject to removal in a future version.Returns true exactly when the path is non-empty and the leaf property an embedded one.- Returns:
- if the leaf property is embedded.
-
getParentPath
Deprecated, for removal: This API element is subject to removal in a future version.Returns the path that has the same beginning but is one segment shorter than this path.- Returns:
- the parent path. Guaranteed to be not null.
- Throws:
IllegalStateException
- when called on an empty path.
-
isMultiValued
public boolean isMultiValued()Deprecated, for removal: This API element is subject to removal in a future version.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.- Returns:
- true if the path contains a multivalued element.
-
getLeafEntity
Deprecated, for removal: This API element is subject to removal in a future version.TheRelationalPersistentEntity
associated with the leaf of this path.- Returns:
- Might return null when called on a path that does not represent an entity.
-
getRequiredLeafEntity
Deprecated, for removal: This API element is subject to removal in a future version.TheRelationalPersistentEntity
associated with the leaf of this path or throwIllegalStateException
if the leaf cannot be resolved.- Returns:
- the required
RelationalPersistentEntity
associated with the leaf of this path. - Throws:
IllegalStateException
- if the persistent entity cannot be resolved.- Since:
- 3.0
-
isEntity
public boolean isEntity()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- true when this is an empty path or the path references an entity.
-
isQualified
public boolean isQualified()Deprecated, for removal: This API element is subject to removal in a future version. -
isCollectionLike
public boolean isCollectionLike()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- true when this is references a
Collection
or an array.
-
getReverseColumnName
Deprecated, for removal: This API element is subject to removal in a future version.The name of the column used to reference the id in the parent table.- Throws:
IllegalStateException
- when called on an empty path.
-
getReverseColumnNameAlias
Deprecated, for removal: This API element is subject to removal in a future version.The alias used in select for the column used to reference the id in the parent table.- Throws:
IllegalStateException
- when called on an empty path.
-
getColumnName
Deprecated, for removal: This API element is subject to removal in a future version.The name of the column used to represent this property in the database.- Throws:
IllegalStateException
- when called on an empty path.
-
getColumnAlias
Deprecated, for removal: This API element is subject to removal in a future version.The alias for the column used to represent this property in the database.- Throws:
IllegalStateException
- when called on an empty path.
-
hasIdProperty
public boolean hasIdProperty()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- true if this path represents an entity which has an Id attribute.
-
getIdDefiningParentPath
Deprecated, for removal: This API element is subject to removal in a future version.Returns the longest ancestor path that has anId
property.- Returns:
- A path that starts just as this path but is shorter. Guaranteed to be not null.
-
getQualifiedTableName
Deprecated, for removal: This API element is subject to removal in a future version.The fully qualified name of the table this path is tied to or of the longest ancestor path that is actually tied to a table.- Returns:
- the name of the table. Guaranteed to be not null.
- Since:
- 3.0
-
getTableName
Deprecated, for removal: This API element is subject to removal in a future version.The name of the table this path is tied to or of the longest ancestor path that is actually tied to a table.- Returns:
- the name of the table. Guaranteed to be not null.
- Since:
- 3.0
-
getTableAlias
Deprecated, for removal: This API element is subject to removal in a future version.The alias used for the table on which this path is based.- Returns:
- a table alias, null if the table owning path is the empty path.
-
getIdColumnName
Deprecated, for removal: This API element is subject to removal in a future version.The column name of the id column of the ancestor path that represents an actual table. -
getEffectiveIdColumnName
Deprecated, for removal: This API element is subject to removal in a future version.If the table owning ancestor has an id the column name of that id property is returned. Otherwise the reverse column is returned. -
getLength
public int getLength()Deprecated, for removal: This API element is subject to removal in a future version.The length of the path. -
matches
Deprecated, for removal: This API element is subject to removal in a future version.Tests ifthis
and the argument represent the same path.- Parameters:
path
- to which this path gets compared. May be null.- Returns:
- Whence the argument matches the path represented by this instance.
-
getRequiredIdProperty
Deprecated, for removal: This API element is subject to removal in a future version.The id property of the final element of the path.- Returns:
- Guaranteed to be not null.
- Throws:
IllegalStateException
- if no such property exists.
-
getQualifierColumn
Deprecated, for removal: This API element is subject to removal in a future version.The column name used for the list index or map key of the leaf property of this path.- Returns:
- May be null.
-
getQualifierColumnType
Deprecated, for removal: This API element is subject to removal in a future version.The type of the qualifier column of the leaf property of this path or null if this is not applicable.- Returns:
- may be null.
-
extendBy
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new path by extending the current path by the property passed as an argument.- Parameters:
property
- must not be null.- Returns:
- Guaranteed to be not null.
-
toString
Deprecated, for removal: This API element is subject to removal in a future version. -
getActualType
Deprecated, for removal: This API element is subject to removal in a future version.For empty paths this is the type of the entity. For non empty paths this is the actual type of the leaf property.- Returns:
- Guaranteed to be not null.
- See Also:
-
isMap
public boolean isMap()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- true if the leaf property of this path is a
Map
. - See Also:
-
getRequiredPersistentPropertyPath
public PersistentPropertyPath<? extends RelationalPersistentProperty> getRequiredPersistentPropertyPath()Deprecated, for removal: This API element is subject to removal in a future version.Converts this path to a non-nullPersistentPropertyPath
.- Returns:
- Guaranteed to be not null.
- Throws:
IllegalStateException
- if this path is empty.
-
equals
Deprecated, for removal: This API element is subject to removal in a future version. -
hashCode
public int hashCode()Deprecated, for removal: This API element is subject to removal in a future version. -
getAggregatePath
Deprecated, for removal: This API element is subject to removal in a future version.
-
AggregatePath
instead