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 JPAManagedType
descriptor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ManagedTypeDescriptor.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.String
getName()
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 theIdentifiableTypeDescriptor
branch 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:
getDeclaredAttribute
in interfaceManagedType<J>
-
getAttribute
PersistentAttributeDescriptor<? super J,?> getAttribute(java.lang.String name)
- Specified by:
getAttribute
in interfaceManagedType<J>
-
getSingularAttribute
<Y> SingularPersistentAttribute<? super J,Y> getSingularAttribute(java.lang.String name, java.lang.Class<Y> type)
- Specified by:
getSingularAttribute
in interfaceManagedType<J>
-
getDeclaredSingularAttribute
<Y> SingularPersistentAttribute<J,Y> getDeclaredSingularAttribute(java.lang.String name, java.lang.Class<Y> type)
- Specified by:
getDeclaredSingularAttribute
in 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:
getCollection
in interfaceManagedType<J>
-
getDeclaredCollection
default <E> CollectionAttribute<J,E> getDeclaredCollection(java.lang.String name, java.lang.Class<E> elementType)
- Specified by:
getDeclaredCollection
in interfaceManagedType<J>
-
getSet
default <E> SetAttribute<? super J,E> getSet(java.lang.String name, java.lang.Class<E> elementType)
- Specified by:
getSet
in interfaceManagedType<J>
-
getDeclaredSet
default <E> SetAttribute<J,E> getDeclaredSet(java.lang.String name, java.lang.Class<E> elementType)
- Specified by:
getDeclaredSet
in interfaceManagedType<J>
-
getList
default <E> ListAttribute<? super J,E> getList(java.lang.String name, java.lang.Class<E> elementType)
- Specified by:
getList
in interfaceManagedType<J>
-
getDeclaredList
default <E> ListAttribute<J,E> getDeclaredList(java.lang.String name, java.lang.Class<E> elementType)
- Specified by:
getDeclaredList
in 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:
getMap
in 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:
getDeclaredMap
in interfaceManagedType<J>
-
getSingularAttribute
default SingularAttribute<? super J,?> getSingularAttribute(java.lang.String name)
- Specified by:
getSingularAttribute
in interfaceManagedType<J>
-
getDeclaredSingularAttribute
default SingularAttribute<J,?> getDeclaredSingularAttribute(java.lang.String name)
- Specified by:
getDeclaredSingularAttribute
in interfaceManagedType<J>
-
getCollection
default CollectionAttribute<? super J,?> getCollection(java.lang.String name)
- Specified by:
getCollection
in interfaceManagedType<J>
-
getDeclaredCollection
default CollectionAttribute<J,?> getDeclaredCollection(java.lang.String name)
- Specified by:
getDeclaredCollection
in interfaceManagedType<J>
-
getSet
default SetPersistentAttribute<? super J,?> getSet(java.lang.String name)
- Specified by:
getSet
in interfaceManagedType<J>
-
getDeclaredSet
default SetPersistentAttribute<J,?> getDeclaredSet(java.lang.String name)
- Specified by:
getDeclaredSet
in interfaceManagedType<J>
-
getList
default ListPersistentAttribute<? super J,?> getList(java.lang.String name)
- Specified by:
getList
in interfaceManagedType<J>
-
getDeclaredList
default ListPersistentAttribute<J,?> getDeclaredList(java.lang.String name)
- Specified by:
getDeclaredList
in interfaceManagedType<J>
-
getMap
default MapPersistentAttribute<? super J,?,?> getMap(java.lang.String name)
- Specified by:
getMap
in interfaceManagedType<J>
-
getDeclaredMap
default MapPersistentAttribute<J,?,?> getDeclaredMap(java.lang.String name)
- Specified by:
getDeclaredMap
in interfaceManagedType<J>
-
-