Package com.blazebit.persistence.spi
Interface JpaMetamodelAccessor
-
public interface JpaMetamodelAccessor
- Since:
- 1.3.0
- Author:
- Jan-Willem Gmelig Meyling
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AttributePath
getAttributePath(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.ManagedType<?> type, String attributePath)
Construct anAttributePath
for a particular attribute in type.AttributePath
getBasicAttributePath(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.ManagedType<?> type, String attributePath)
Construct anAttributePath
for a particular basic attribute in type.AttributePath
getJoinTableCollectionAttributePath(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.EntityType<?> type, String attributePath, String collectionName)
Construct anAttributePath
for a particular collection attribute in type.boolean
isCompositeNode(javax.persistence.metamodel.Attribute<?,?> attr)
Returns true if the attribute is composite (i.e. embeddable).boolean
isElementCollection(javax.persistence.metamodel.Attribute<?,?> attribute)
Returns whether the given attribute is an element collection.boolean
isJoinable(javax.persistence.metamodel.Attribute<?,?> attr)
Returns true if the attribute is joinable (i.e. association).
-
-
-
Method Detail
-
getAttributePath
AttributePath getAttributePath(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.ManagedType<?> type, String attributePath)
Construct anAttributePath
for 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 anAttributePath
for 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 anAttributePath
for 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
-
-