Package com.blazebit.persistence.spi
Interface JpaMetamodelAccessor
public interface JpaMetamodelAccessor
- Since:
- 1.3.0
- Author:
- Jan-Willem Gmelig Meyling
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributePath(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.ManagedType<?> type, String attributePath) Construct anAttributePathfor a particular attribute in type.getBasicAttributePath(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.ManagedType<?> type, String attributePath) Construct anAttributePathfor a particular basic attribute in type.getJoinTableCollectionAttributePath(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.EntityType<?> type, String attributePath, String collectionName) Construct anAttributePathfor a particular collection attribute in type.booleanisCompositeNode(javax.persistence.metamodel.Attribute<?, ?> attr) Returns true if the attribute is composite (i.e. embeddable).booleanisElementCollection(javax.persistence.metamodel.Attribute<?, ?> attribute) Returns whether the given attribute is an element collection.booleanisJoinable(javax.persistence.metamodel.Attribute<?, ?> attr) Returns true if the attribute is joinable (i.e. association).
-
Method Details
-
getAttributePath
AttributePath getAttributePath(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.ManagedType<?> type, String attributePath) Construct anAttributePathfor a particular attribute in type.- Parameters:
metamodel- JPA metamodeltype- Owning typeattributePath- The attribute path- Returns:
- The created attribute path
-
getBasicAttributePath
AttributePath getBasicAttributePath(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.ManagedType<?> type, String attributePath) Construct anAttributePathfor a particular basic attribute in type.- Parameters:
metamodel- JPA metamodeltype- Owning typeattributePath- The attribute path- Returns:
- The created attribute path
-
getJoinTableCollectionAttributePath
AttributePath getJoinTableCollectionAttributePath(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.EntityType<?> type, String attributePath, String collectionName) Construct anAttributePathfor a particular collection attribute in type.- Parameters:
metamodel- JPA metamodeltype- Owning typeattributePath- The attribute pathcollectionName- The name of the collection- Returns:
- The created attribute path
-
isJoinable
boolean isJoinable(javax.persistence.metamodel.Attribute<?, ?> attr) Returns true if the attribute is joinable (i.e. association).- Parameters:
attr- The attribute- Returns:
- Whether the attribute is joinable
-
isCompositeNode
boolean isCompositeNode(javax.persistence.metamodel.Attribute<?, ?> attr) Returns true if the attribute is composite (i.e. embeddable).- Parameters:
attr- The attribute- Returns:
- Whether the attribute is composite
-
isElementCollection
boolean isElementCollection(javax.persistence.metamodel.Attribute<?, ?> attribute) Returns whether the given attribute is an element collection.- Parameters:
attribute- The attribute to check- Returns:
- true if the attribute is an element collection, false otherwise
-