Top Description Fields Constructors Methods
org.hibernate.query.sqm.tree.domain

public Class SqmPolymorphicRootDescriptor<T>

extends Object
implements EntityDomainType<T>
Class Inheritance
All Implemented Interfaces
org.hibernate.metamodel.model.domain.EntityDomainType, org.hibernate.query.sqm.SqmPathSource, org.hibernate.query.sqm.tree.SqmExpressibleAccessor, jakarta.persistence.metamodel.Bindable, org.hibernate.query.sqm.SqmExpressible, org.hibernate.query.BindableType, jakarta.persistence.metamodel.EntityType, jakarta.persistence.metamodel.IdentifiableType, jakarta.persistence.metamodel.ManagedType, jakarta.persistence.metamodel.Type, org.hibernate.metamodel.model.domain.IdentifiableDomainType, org.hibernate.metamodel.model.domain.ManagedDomainType, org.hibernate.metamodel.model.domain.DomainType
Imports
java.util.ArrayList, .Collection, .Collections, .HashMap, .HashSet, .List, .Map, .Set, java.util.function.Consumer, jakarta.persistence.metamodel.Attribute, .CollectionAttribute, .ListAttribute, .MapAttribute, .PluralAttribute, .SetAttribute, .SingularAttribute, org.hibernate.metamodel.RepresentationMode, org.hibernate.metamodel.model.domain.DomainType, .EntityDomainType, .IdentifiableDomainType, .ManagedDomainType, .PersistentAttribute, .PluralPersistentAttribute, .SimpleDomainType, .SingularPersistentAttribute, org.hibernate.query.sqm.SqmPathSource, org.hibernate.type.descriptor.java.JavaType

Acts as the EntityDomainType for a "polymorphic query" grouping.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final Map<String, PersistentAttribute<? super T, ?>>
private final Set<EntityDomainType<? extends T>>
private final JavaType<T>

Constructor Summary

AccessConstructor and Description
public
SqmPolymorphicRootDescriptor(JavaType<T> polymorphicJavaType, Set<EntityDomainType<? extends T>> implementors)

Method Summary

Modifier and TypeMethod and Description
public void
public SqmPath<T>
createSqmPath(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource)

Implements org.hibernate.query.sqm.SqmPathSource.createSqmPath.

Create an SQM path for this source relative to the given left hand side
public PersistentAttribute<? super T, ?>
public PersistentAttribute<? super T, ?>
public PersistentAttribute<? super T, ?>
public PersistentAttribute<T, ?>
public PersistentAttribute<T, ?>
public PluralPersistentAttribute<T, ?, ?>
public SingularPersistentAttribute<T, ?>
public SingularPersistentAttribute<? super T, ?>
public List<? extends SingularPersistentAttribute<? super T, ?>>
public PluralPersistentAttribute<? super T, ?, ?>
public SingularPersistentAttribute<? super T, ?>
public SqmPathSource<?>
findSubPathSource(String name)

Implements org.hibernate.query.sqm.SqmPathSource.findSubPathSource.

Find a SqmPathSource by name relative to this source.
public PersistentAttribute<?, ?>
public SingularPersistentAttribute<? super T, ?>
public PersistentAttribute<? super T, ?>
getAttribute(String
the name of the represented attribute
name
)

Implements org.hibernate.metamodel.model.domain.ManagedDomainType.getAttribute, jakarta.persistence.metamodel.ManagedType.getAttribute.

Return the attribute of the managed type that corresponds to the specified name.
public Set<Attribute<? super T, ?>>
getAttributes()

Implements jakarta.persistence.metamodel.ManagedType.getAttributes.

Return the attributes of the managed type.
public Class<T>
public Bindable.BindableType
getBindableType()

Implements jakarta.persistence.metamodel.Bindable.getBindableType.

Return the bindable type of the represented object.
public <E> CollectionAttribute<? super T, E>
getCollection(String
the name of the represented attribute
name
,
Class<E>
the element type of the represented attribute
elementType
)

Implements jakarta.persistence.metamodel.ManagedType.getCollection.

Return the Collection-valued attribute of the managed type that corresponds to the specified name and Java element type.
public CollectionAttribute<? super T, ?>
getCollection(String
the name of the represented attribute
name
)

Implements jakarta.persistence.metamodel.ManagedType.getCollection.

Return the Collection-valued attribute of the managed type that corresponds to the specified name.
public PersistentAttribute<T, ?>
getDeclaredAttribute(String
the name of the represented attribute
name
)

Implements org.hibernate.metamodel.model.domain.ManagedDomainType.getDeclaredAttribute, jakarta.persistence.metamodel.ManagedType.getDeclaredAttribute.

Return the attribute declared by the managed type that corresponds to the specified name.
public Set<Attribute<T, ?>>
getDeclaredAttributes()

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredAttributes.

Return the attributes declared by the managed type.
public <E> CollectionAttribute<T, E>
getDeclaredCollection(String
the name of the represented attribute
name
,
Class<E>
the element type of the represented attribute
elementType
)

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredCollection.

Return the Collection-valued attribute declared by the managed type that corresponds to the specified name and Java element type.
public CollectionAttribute<T, ?>
getDeclaredCollection(String
the name of the represented attribute
name
)

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredCollection.

Return the Collection-valued attribute declared by the managed type that corresponds to the specified name.
public <Y> SingularPersistentAttribute<T, Y>
getDeclaredId(Class<Y>
the type of the represented declared id attribute
type
)

Implements org.hibernate.metamodel.model.domain.IdentifiableDomainType.getDeclaredId, jakarta.persistence.metamodel.IdentifiableType.getDeclaredId.

Return the attribute that corresponds to the id attribute declared by the entity or mapped superclass.
public <E> ListAttribute<T, E>
getDeclaredList(String
the name of the represented attribute
name
,
Class<E>
the element type of the represented attribute
elementType
)

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredList.

Return the List-valued attribute declared by the managed type that corresponds to the specified name and Java element type.
public ListAttribute<T, ?>
getDeclaredList(String
the name of the represented attribute
name
)

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredList.

Return the List-valued attribute declared by the managed type that corresponds to the specified name.
public <K, V> MapAttribute<T, K, V>
getDeclaredMap(String
the name of the represented attribute
name
,
Class<K>
the key type of the represented attribute
keyType
,
Class<V>
the value type of the represented attribute
valueType
)

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredMap.

Return the Map-valued attribute declared by the managed type that corresponds to the specified name and Java key and value types.
public MapAttribute<T, ?, ?>
getDeclaredMap(String
the name of the represented attribute
name
)

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredMap.

Return the Map-valued attribute declared by the managed type that corresponds to the specified name.
public Set<PluralAttribute<T, ?, ?>>
getDeclaredPluralAttributes()

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredPluralAttributes.

Return all multi-valued attributes (Collection-, Set-, List-, and Map-valued attributes) declared by the managed type.
public <E> SetAttribute<T, E>
getDeclaredSet(String
the name of the represented attribute
name
,
Class<E>
the element type of the represented attribute
elementType
)

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredSet.

Return the Set-valued attribute declared by the managed type that corresponds to the specified name and Java element type.
public SetAttribute<T, ?>
getDeclaredSet(String
the name of the represented attribute
name
)

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredSet.

Return the Set-valued attribute declared by the managed type that corresponds to the specified name.
public <Y> SingularAttribute<T, Y>
getDeclaredSingularAttribute(String
the name of the represented attribute
name
,
Class<Y>
the type of the represented attribute
type
)

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredSingularAttribute.

Return the single-valued attribute declared by the managed type that corresponds to the specified name and Java type.
public SingularAttribute<T, ?>
getDeclaredSingularAttribute(String
the name of the represented attribute
name
)

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredSingularAttribute.

Return the single-valued attribute declared by the managed type that corresponds to the specified name.
public Set<SingularAttribute<T, ?>>
getDeclaredSingularAttributes()

Implements jakarta.persistence.metamodel.ManagedType.getDeclaredSingularAttributes.

Return the single-valued attributes declared by the managed type.
public <Y> SingularPersistentAttribute<T, Y>
getDeclaredVersion(Class<Y>
the type of the represented declared version attribute
type
)

Implements org.hibernate.metamodel.model.domain.IdentifiableDomainType.getDeclaredVersion, jakarta.persistence.metamodel.IdentifiableType.getDeclaredVersion.

Return the attribute that corresponds to the version attribute declared by the entity or mapped superclass.
public JavaType<T>
getExpressibleJavaType()

Implements org.hibernate.query.sqm.SqmExpressible.getExpressibleJavaType.

The Java type descriptor for this expressible
public String
public <Y> SingularPersistentAttribute<? super T, Y>
getId(Class<Y>
the type of the represented id attribute
type
)

Implements org.hibernate.metamodel.model.domain.IdentifiableDomainType.getId, jakarta.persistence.metamodel.IdentifiableType.getId.

Return the attribute that corresponds to the id attribute of the entity or mapped superclass.
public Set<SingularAttribute<? super T, ?>>
public SqmPathSource<?>
public SimpleDomainType<?>
public Set<EntityDomainType<?>>
public Class<T>
getJavaType()

Implements jakarta.persistence.metamodel.Type.getJavaType.

Return the represented Java type.
public <E> ListAttribute<? super T, E>
getList(String
the name of the represented attribute
name
,
Class<E>
the element type of the represented attribute
elementType
)

Implements jakarta.persistence.metamodel.ManagedType.getList.

Return the List-valued attribute of the managed type that corresponds to the specified name and Java element type.
public ListAttribute<? super T, ?>
getList(String
the name of the represented attribute
name
)

Implements jakarta.persistence.metamodel.ManagedType.getList.

Return the List-valued attribute of the managed type that corresponds to the specified name.
public <K, V> MapAttribute<? super T, K, V>
getMap(String
the name of the represented attribute
name
,
Class<K>
the key type of the represented attribute
keyType
,
Class<V>
the value type of the represented attribute
valueType
)

Implements jakarta.persistence.metamodel.ManagedType.getMap.

Return the Map-valued attribute of the managed type that corresponds to the specified name and Java key and value types.
public MapAttribute<? super T, ?, ?>
getMap(String
the name of the represented attribute
name
)

Implements jakarta.persistence.metamodel.ManagedType.getMap.

Return the Map-valued attribute of the managed type that corresponds to the specified name.
public String
getName()

Implements jakarta.persistence.metamodel.EntityType.getName.

Return the entity name.
public String
public Type.PersistenceType
public Set<PluralAttribute<? super T, ?, ?>>
getPluralAttributes()

Implements jakarta.persistence.metamodel.ManagedType.getPluralAttributes.

Return all multi-valued attributes (Collection-, Set-, List-, and Map-valued attributes) of the managed type.
public RepresentationMode
public <E> SetAttribute<? super T, E>
getSet(String
the name of the represented attribute
name
,
Class<E>
the element type of the represented attribute
elementType
)

Implements jakarta.persistence.metamodel.ManagedType.getSet.

Return the Set-valued attribute of the managed type that corresponds to the specified name and Java element type.
public SetAttribute<? super T, ?>
getSet(String
the name of the represented attribute
name
)

Implements jakarta.persistence.metamodel.ManagedType.getSet.

Return the Set-valued attribute of the managed type that corresponds to the specified name.
public <Y> SingularAttribute<? super T, Y>
getSingularAttribute(String
the name of the represented attribute
name
,
Class<Y>
the type of the represented attribute
type
)

Implements jakarta.persistence.metamodel.ManagedType.getSingularAttribute.

Return the single-valued attribute of the managed type that corresponds to the specified name and Java type.
public SingularAttribute<? super T, ?>
getSingularAttribute(String
the name of the represented attribute
name
)

Implements jakarta.persistence.metamodel.ManagedType.getSingularAttribute.

Return the single-valued attribute of the managed type that corresponds to the specified name.
public Set<SingularAttribute<? super T, ?>>
getSingularAttributes()

Implements jakarta.persistence.metamodel.ManagedType.getSingularAttributes.

Return the single-valued attributes of the managed type.
public DomainType<T>
getSqmPathType()

Implements org.hibernate.query.sqm.SqmPathSource.getSqmPathType.

The type of path this source creates.
public Collection<? extends EntityDomainType<? extends T>>
public IdentifiableDomainType<? super T>
getSupertype()

Implements org.hibernate.metamodel.model.domain.IdentifiableDomainType.getSupertype, jakarta.persistence.metamodel.IdentifiableType.getSupertype.

Return the identifiable type that corresponds to the most specific mapped superclass or entity extended by the entity or mapped superclass.
public ManagedDomainType<? super T>
getSuperType()

Implements org.hibernate.metamodel.model.domain.ManagedDomainType.getSuperType.

The descriptor of the supertype of this type.
public String
public <Y> SingularPersistentAttribute<? super T, Y>
getVersion(Class<Y>
the type of the represented version attribute
type
)

Implements org.hibernate.metamodel.model.domain.IdentifiableDomainType.getVersion, jakarta.persistence.metamodel.IdentifiableType.getVersion.

Return the attribute that corresponds to the version attribute of the entity or mapped superclass.
public boolean
public boolean
hasSingleIdAttribute()

Implements jakarta.persistence.metamodel.IdentifiableType.hasSingleIdAttribute.

Whether the identifiable type has a single id attribute.
public boolean
hasVersionAttribute()

Implements jakarta.persistence.metamodel.IdentifiableType.hasVersionAttribute.

Whether the identifiable type has a version attribute.
private Map<String, PersistentAttribute<? super T, ?>>
inferCommonAttributes(Set<EntityDomainType<? extends T>> implementors)

The attributes of a "polymorphic" root are the attributes which are common to all subtypes of the root type.

private static boolean
private PersistentAttribute<? super T, ?>
promote(PersistentAttribute<?, ?> attribute)

Here we pretend that an attribute belonging to all known subtypes is an attribute of this type.

public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait