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.
use AggregatePath instead
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 Details

  • 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

      public PersistentPropertyPathExtension 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

      @Nullable public RelationalPersistentEntity<?> getLeafEntity()
      Deprecated, for removal: This API element is subject to removal in a future version.
      The RelationalPersistentEntity associated with the leaf of this path.
      Returns:
      Might return null when called on a path that does not represent an entity.
    • getRequiredLeafEntity

      public RelationalPersistentEntity<?> getRequiredLeafEntity()
      Deprecated, for removal: This API element is subject to removal in a future version.
      The RelationalPersistentEntity associated with the leaf of this path or throw IllegalStateException 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.
      Returns:
      true when this is references a List or Map.
    • 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

      public SqlIdentifier 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

      public SqlIdentifier 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

      public SqlIdentifier 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

      public SqlIdentifier 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

      public PersistentPropertyPathExtension getIdDefiningParentPath()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the longest ancestor path that has an Id property.
      Returns:
      A path that starts just as this path but is shorter. Guaranteed to be not null.
    • getQualifiedTableName

      public SqlIdentifier 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

      public SqlIdentifier 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

      @Nullable public SqlIdentifier 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

      public SqlIdentifier 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

      public SqlIdentifier 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

      public boolean matches(PersistentPropertyPath<RelationalPersistentProperty> path)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Tests if this 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

      public RelationalPersistentProperty 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

      @Nullable public SqlIdentifier 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

      @Nullable public Class<?> 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

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object
    • getActualType

      public Class<?> 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-null PersistentPropertyPath.
      Returns:
      Guaranteed to be not null.
      Throws:
      IllegalStateException - if this path is empty.
    • equals

      public boolean equals(@Nullable Object o)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      hashCode in class Object
    • getAggregatePath

      public AggregatePath getAggregatePath()
      Deprecated, for removal: This API element is subject to removal in a future version.