Interface ExtendedAttribute<X,​Y>

Type Parameters:
X - The Java type represented by the managed type owning the attribute
Y - The Java element type of the attribute

public interface ExtendedAttribute<X,​Y>
This is a wrapper around the JPA Attribute that allows additionally efficient access to properties of the metamodel.
Since:
1.2.0
Author:
Christian Beikov
  • Method Details

    • getAttribute

      javax.persistence.metamodel.Attribute<X,​?> getAttribute()
      Returns the underlying attribute.
      Returns:
      The attribute
    • getAccessor

      AttributeAccessor<X,​Y> getAccessor()
      The attribute accessor for this attribute.
      Returns:
      The attribute accessor
      Since:
      1.4.1
    • getAttributePath

      List<javax.persistence.metamodel.Attribute<?,​?>> getAttributePath()
      Returns the path from the owning entity type to this attribute.
      Returns:
      The path to the attribute
    • getAttributePathString

      String getAttributePathString()
      Returns the path from the owning entity type to this attribute as string.
      Returns:
      The path to the attribute as string
      Since:
      1.3.0
    • getElementClass

      Class<Y> getElementClass()
      Returns the element type of the attribute.
      Returns:
      The element type
    • hasJoinCondition

      boolean hasJoinCondition()
      Returns whether the attribute has a join condition.
      Returns:
      True if it has a join condition, false otherwise
      Since:
      1.4.0
    • hasCascadingDeleteCycle

      boolean hasCascadingDeleteCycle()
      Returns whether the type of the attribute causes a cascading delete cycle.
      Returns:
      True if it has a cascading delete cycle, false otherwise
    • isForeignJoinColumn

      boolean isForeignJoinColumn()
      Whether the join columns for the attribute are in a foreign table.
      Returns:
      True if join columns are in a foreign table, false otherwise
    • isColumnShared

      boolean isColumnShared()
      Whether columns for the attribute are shared between multiple subtypes or shared by occupying the same slot in the resulting SQL.
      Returns:
      True if columns of the attribute are shared, false otherwise
    • isBag

      boolean isBag()
      Whether the attribute is a non-indexed and non-ordered collection a.k.a. a bag.
      Returns:
      True if it is a bag, false otherwise
    • isOrphanRemoval

      boolean isOrphanRemoval()
      Whether orphan removal is activated for the attribute.
      Returns:
      True if orphan removal is activated, else false
    • isDeleteCascaded

      boolean isDeleteCascaded()
      Whether delete cascading is activated for the attribute.
      Returns:
      True if delete cascading is activated, else false
    • getJoinTypeIndexedRequiresTreatFilter

      JpaProvider.ConstraintType getJoinTypeIndexedRequiresTreatFilter​(JoinType joinType)
      Returns where to put treat filters for a treat joined association of this attribute.
      Parameters:
      joinType - The join type used for the treat join
      Returns:
      The constraint type for the treat filter
    • getWritableMappedByMappings

      Map<String,​String> getWritableMappedByMappings​(javax.persistence.metamodel.EntityType<?> inverseType)
      If the attribute is insertable = false and updatable = false it returns the writable mappings for the inverse type. Otherwise returns null.
      Parameters:
      inverseType - The type containing the inverse relation
      Returns:
      The writable mappings for the inverse type if the attribute is not insertable or updatable, null otherwise
    • getMappedBy

      String getMappedBy()
      If the attribute is an inverse collection, the mapped by attribute name is returned. Otherwise returns null.
      Returns:
      The mapped by attribute name if the attribute is an inverse collection, null otherwise
    • getJoinTable

      JoinTable getJoinTable()
      If the attribute is a collection that uses a join table, returns it's descriptor. Otherwise returns null.
      Returns:
      The join table information if the attribute has one, null otherwise
    • getColumnNames

      String[] getColumnNames()
      Returns the column names of the attribute.
      Returns:
      The column names of the attribute
    • getColumnTypes

      String[] getColumnTypes()
      Returns the SQL column type names of the attribute.
      Returns:
      The SQL column type names for the attribute
    • getColumnEquivalentAttributes

      Set<ExtendedAttribute<X,​?>> getColumnEquivalentAttributes()
      Returns the attributes that have equivalent SQL column names.
      Returns:
      The attributes that have equivalent SQL column names
      Since:
      1.3.0