Interface ManagedTypeDescriptor<J>
-
- All Superinterfaces:
DomainType<J>,DomainTypeDescriptor<J>,ManagedDomainType<J>,ManagedType<J>,SimpleDomainType<J>,SimpleTypeDescriptor<J>,Type<J>
- All Known Subinterfaces:
EmbeddedTypeDescriptor<J>,EntityTypeDescriptor<J>,IdentifiableTypeDescriptor<J>,MappedSuperclassTypeDescriptor<J>
public interface ManagedTypeDescriptor<J> extends SimpleTypeDescriptor<J>, ManagedDomainType<J>
Hibernate extension to the JPAManagedTypedescriptor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceManagedTypeDescriptor.InFlightAccess<J>Used during creation of the managed type object to add its attributes-
Nested classes/interfaces inherited from interface javax.persistence.metamodel.Type
Type.PersistenceType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PersistentAttributeDescriptor<? super J,?>findAttribute(java.lang.String name)PersistentAttributeDescriptor<J,?>findDeclaredAttribute(java.lang.String name)<S extends J>
ManagedTypeDescriptor<S>findSubType(java.lang.Class<S> type)<S extends J>
ManagedTypeDescriptor<S>findSubType(java.lang.String subTypeName)PersistentAttributeDescriptor<? super J,?>getAttribute(java.lang.String name)default CollectionAttribute<? super J,?>getCollection(java.lang.String name)<E> BagPersistentAttribute<? super J,E>getCollection(java.lang.String name, java.lang.Class<E> elementType)PersistentAttributeDescriptor<J,?>getDeclaredAttribute(java.lang.String name)default CollectionAttribute<J,?>getDeclaredCollection(java.lang.String name)default <E> CollectionAttribute<J,E>getDeclaredCollection(java.lang.String name, java.lang.Class<E> elementType)default ListPersistentAttribute<J,?>getDeclaredList(java.lang.String name)default <E> ListAttribute<J,E>getDeclaredList(java.lang.String name, java.lang.Class<E> elementType)default MapPersistentAttribute<J,?,?>getDeclaredMap(java.lang.String name)default <K,V>
MapAttribute<J,K,V>getDeclaredMap(java.lang.String name, java.lang.Class<K> keyType, java.lang.Class<V> valueType)default SetPersistentAttribute<J,?>getDeclaredSet(java.lang.String name)default <E> SetAttribute<J,E>getDeclaredSet(java.lang.String name, java.lang.Class<E> elementType)default SingularAttribute<J,?>getDeclaredSingularAttribute(java.lang.String name)<Y> SingularPersistentAttribute<J,Y>getDeclaredSingularAttribute(java.lang.String name, java.lang.Class<Y> type)default SubGraphImplementor<J>getDefaultGraph()The default graph for this type.ManagedTypeDescriptor.InFlightAccess<J>getInFlightAccess()In-flight access to the managed type.default ListPersistentAttribute<? super J,?>getList(java.lang.String name)default <E> ListAttribute<? super J,E>getList(java.lang.String name, java.lang.Class<E> elementType)default MapPersistentAttribute<? super J,?,?>getMap(java.lang.String name)default <K,V>
MapAttribute<? super J,K,V>getMap(java.lang.String name, java.lang.Class<K> keyType, java.lang.Class<V> valueType)java.lang.StringgetName()The Hibernate "type name" ("entity name" - for non-POJO representations)<C,E>
PluralPersistentAttribute<J,C,E>getPluralAttribute(java.lang.String name)default SetPersistentAttribute<? super J,?>getSet(java.lang.String name)default <E> SetAttribute<? super J,E>getSet(java.lang.String name, java.lang.Class<E> elementType)default SingularAttribute<? super J,?>getSingularAttribute(java.lang.String name)<Y> SingularPersistentAttribute<? super J,Y>getSingularAttribute(java.lang.String name, java.lang.Class<Y> type)ManagedTypeDescriptor<? super J>getSuperType()Get this ManagedType's super type descriptor.SubGraphImplementor<J>makeSubGraph()Make an empty sub-graph based on this type.<S extends J>
SubGraphImplementor<S>makeSubGraph(java.lang.Class<S> subType)Make a sub-graph based on one of this type's sub-types-
Methods inherited from interface org.hibernate.metamodel.model.domain.DomainType
getTypeName
-
Methods inherited from interface javax.persistence.metamodel.ManagedType
getAttributes, getDeclaredAttributes, getDeclaredPluralAttributes, getDeclaredSingularAttributes, getPluralAttributes, getSingularAttributes
-
Methods inherited from interface javax.persistence.metamodel.Type
getJavaType, getPersistenceType
-
-
-
-
Method Detail
-
getSuperType
ManagedTypeDescriptor<? super J> getSuperType()
Get this ManagedType's super type descriptor. ATM only supported for theIdentifiableTypeDescriptorbranch of the ManagedType tree
-
getName
java.lang.String getName()
The Hibernate "type name" ("entity name" - for non-POJO representations)
-
makeSubGraph
SubGraphImplementor<J> makeSubGraph()
Make an empty sub-graph based on this type.- ApiNote:
- Note that this is *not* the same as the type's "default" graph
-
getDefaultGraph
default SubGraphImplementor<J> getDefaultGraph()
The default graph for this type. Generally this is used to implement JPA's notion of a "load graph" for undefined sub-graphs.- ApiNote:
- The return is immutable (
GraphNode.isMutable()==false) - use a mutable copy
-
makeSubGraph
<S extends J> SubGraphImplementor<S> makeSubGraph(java.lang.Class<S> subType)
Make a sub-graph based on one of this type's sub-types
-
findSubType
<S extends J> ManagedTypeDescriptor<S> findSubType(java.lang.String subTypeName)
-
findSubType
<S extends J> ManagedTypeDescriptor<S> findSubType(java.lang.Class<S> type)
-
getInFlightAccess
ManagedTypeDescriptor.InFlightAccess<J> getInFlightAccess()
In-flight access to the managed type. Used to add attributes, etc. Valid only during boot.
-
findDeclaredAttribute
PersistentAttributeDescriptor<J,?> findDeclaredAttribute(java.lang.String name)
-
findAttribute
PersistentAttributeDescriptor<? super J,?> findAttribute(java.lang.String name)
-
getDeclaredAttribute
PersistentAttributeDescriptor<J,?> getDeclaredAttribute(java.lang.String name)
- Specified by:
getDeclaredAttributein interfaceManagedType<J>
-
getAttribute
PersistentAttributeDescriptor<? super J,?> getAttribute(java.lang.String name)
- Specified by:
getAttributein interfaceManagedType<J>
-
getSingularAttribute
<Y> SingularPersistentAttribute<? super J,Y> getSingularAttribute(java.lang.String name, java.lang.Class<Y> type)
- Specified by:
getSingularAttributein interfaceManagedType<J>
-
getDeclaredSingularAttribute
<Y> SingularPersistentAttribute<J,Y> getDeclaredSingularAttribute(java.lang.String name, java.lang.Class<Y> type)
- Specified by:
getDeclaredSingularAttributein interfaceManagedType<J>
-
getPluralAttribute
<C,E> PluralPersistentAttribute<J,C,E> getPluralAttribute(java.lang.String name)
-
getCollection
<E> BagPersistentAttribute<? super J,E> getCollection(java.lang.String name, java.lang.Class<E> elementType)
- Specified by:
getCollectionin interfaceManagedType<J>
-
getDeclaredCollection
default <E> CollectionAttribute<J,E> getDeclaredCollection(java.lang.String name, java.lang.Class<E> elementType)
- Specified by:
getDeclaredCollectionin interfaceManagedType<J>
-
getSet
default <E> SetAttribute<? super J,E> getSet(java.lang.String name, java.lang.Class<E> elementType)
- Specified by:
getSetin interfaceManagedType<J>
-
getDeclaredSet
default <E> SetAttribute<J,E> getDeclaredSet(java.lang.String name, java.lang.Class<E> elementType)
- Specified by:
getDeclaredSetin interfaceManagedType<J>
-
getList
default <E> ListAttribute<? super J,E> getList(java.lang.String name, java.lang.Class<E> elementType)
- Specified by:
getListin interfaceManagedType<J>
-
getDeclaredList
default <E> ListAttribute<J,E> getDeclaredList(java.lang.String name, java.lang.Class<E> elementType)
- Specified by:
getDeclaredListin interfaceManagedType<J>
-
getMap
default <K,V> MapAttribute<? super J,K,V> getMap(java.lang.String name, java.lang.Class<K> keyType, java.lang.Class<V> valueType)
- Specified by:
getMapin interfaceManagedType<J>
-
getDeclaredMap
default <K,V> MapAttribute<J,K,V> getDeclaredMap(java.lang.String name, java.lang.Class<K> keyType, java.lang.Class<V> valueType)
- Specified by:
getDeclaredMapin interfaceManagedType<J>
-
getSingularAttribute
default SingularAttribute<? super J,?> getSingularAttribute(java.lang.String name)
- Specified by:
getSingularAttributein interfaceManagedType<J>
-
getDeclaredSingularAttribute
default SingularAttribute<J,?> getDeclaredSingularAttribute(java.lang.String name)
- Specified by:
getDeclaredSingularAttributein interfaceManagedType<J>
-
getCollection
default CollectionAttribute<? super J,?> getCollection(java.lang.String name)
- Specified by:
getCollectionin interfaceManagedType<J>
-
getDeclaredCollection
default CollectionAttribute<J,?> getDeclaredCollection(java.lang.String name)
- Specified by:
getDeclaredCollectionin interfaceManagedType<J>
-
getSet
default SetPersistentAttribute<? super J,?> getSet(java.lang.String name)
- Specified by:
getSetin interfaceManagedType<J>
-
getDeclaredSet
default SetPersistentAttribute<J,?> getDeclaredSet(java.lang.String name)
- Specified by:
getDeclaredSetin interfaceManagedType<J>
-
getList
default ListPersistentAttribute<? super J,?> getList(java.lang.String name)
- Specified by:
getListin interfaceManagedType<J>
-
getDeclaredList
default ListPersistentAttribute<J,?> getDeclaredList(java.lang.String name)
- Specified by:
getDeclaredListin interfaceManagedType<J>
-
getMap
default MapPersistentAttribute<? super J,?,?> getMap(java.lang.String name)
- Specified by:
getMapin interfaceManagedType<J>
-
getDeclaredMap
default MapPersistentAttribute<J,?,?> getDeclaredMap(java.lang.String name)
- Specified by:
getDeclaredMapin interfaceManagedType<J>
-
-