Class SingularAttributeImpl<D,J>
- java.lang.Object
-
- org.hibernate.metamodel.model.domain.internal.AbstractAttribute<D,J,J>
-
- org.hibernate.metamodel.model.domain.internal.SingularAttributeImpl<D,J>
-
- All Implemented Interfaces:
Attribute<D,J>,Bindable<J>,SingularAttribute<D,J>,Serializable,PersistentAttribute<D,J>,SingularPersistentAttribute<D,J>,BindableType<J>,SqmExpressible<J>,SqmJoinable<D,J>,SqmPathSource<J>,SqmExpressibleAccessor<J>
- Direct Known Subclasses:
SingularAttributeImpl.Identifier,SingularAttributeImpl.Version
public class SingularAttributeImpl<D,J> extends AbstractAttribute<D,J,J> implements SingularPersistentAttribute<D,J>, Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSingularAttributeImpl.Identifier<D,J>Subclass used to simplify instantiation of singular attributes representing an entity's identifier.static classSingularAttributeImpl.Version<X,Y>Subclass used to simply instantiation of singular attributes representing an entity's version.-
Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.Attribute
Attribute.PersistentAttributeType
-
Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.Bindable
Bindable.BindableType
-
-
Constructor Summary
Constructors Constructor Description SingularAttributeImpl(ManagedDomainType<D> declaringType, String name, AttributeClassification attributeClassification, DomainType<J> attributeType, JavaType<?> relationalJavaType, Member member, boolean isIdentifier, boolean isVersion, boolean isOptional, boolean isGeneric, MetadataContext metadataContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NavigablePathcreateNavigablePath(SqmPath<?> parent, String alias)SqmAttributeJoin<D,J>createSqmJoin(SqmFrom<?,D> lhs, SqmJoinType joinType, String alias, boolean fetched, SqmCreationState creationState)SqmPath<J>createSqmPath(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource)Create an SQM path for this source relative to the given left hand sideSqmPathSource<?>findSubPathSource(String name)Find aSqmPathSourceby name relative to this source.SqmPathSource<?>findSubPathSource(String name, JpaMetamodelImplementor metamodel)Find aSqmPathSourceby name relative to this source.Class<J>getBindableJavaType()The expected Java typeBindable.BindableTypegetBindableType()JavaType<J>getExpressibleJavaType()The Java type descriptor for this expressibleSimpleDomainType<?>getKeyGraphType()StringgetPathName()The name of this thing.SqmPathSource<J>getPathSource()JavaType<?>getRelationalJavaType()SimpleDomainType<J>getSqmPathType()The type of path this source creates.SimpleDomainType<J>getType()SimpleDomainType<J>getValueGraphType()For a singular attribute, the value type is defined as the attribute typebooleanisAssociation()booleanisCollection()booleanisGeneric()Indicates if this path source is generically typedbooleanisId()booleanisOptional()booleanisVersion()-
Methods inherited from class org.hibernate.metamodel.model.domain.internal.AbstractAttribute
getAttributeClassification, getAttributeJavaType, getDeclaringType, getJavaMember, getJavaType, getName, getPersistentAttributeType, toString, writeReplace
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jakarta.persistence.metamodel.Attribute
getJavaMember, getName, getPersistentAttributeType
-
Methods inherited from interface org.hibernate.metamodel.model.domain.PersistentAttribute
getAttributeClassification, getAttributeJavaType
-
Methods inherited from interface org.hibernate.metamodel.model.domain.SingularPersistentAttribute
getDeclaringType, getJavaType
-
Methods inherited from interface org.hibernate.query.sqm.SqmExpressible
getTypeName, isInstance, resolveExpressible
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmExpressibleAccessor
getNodeJavaType
-
Methods inherited from interface org.hibernate.query.sqm.SqmJoinable
getName
-
Methods inherited from interface org.hibernate.query.sqm.SqmPathSource
getExpressible, getIntermediatePathSource, getSqmType, getSubPathSource, getSubPathSource
-
-
-
-
Constructor Detail
-
SingularAttributeImpl
public SingularAttributeImpl(ManagedDomainType<D> declaringType, String name, AttributeClassification attributeClassification, DomainType<J> attributeType, JavaType<?> relationalJavaType, Member member, boolean isIdentifier, boolean isVersion, boolean isOptional, boolean isGeneric, MetadataContext metadataContext)
-
-
Method Detail
-
getPathName
public String getPathName()
Description copied from interface:SqmPathSourceThe name of this thing.- Specified by:
getPathNamein interfaceSqmPathSource<D>
-
getExpressibleJavaType
public JavaType<J> getExpressibleJavaType()
Description copied from interface:SqmExpressibleThe Java type descriptor for this expressible- Specified by:
getExpressibleJavaTypein interfaceSqmExpressible<D>
-
getSqmPathType
public SimpleDomainType<J> getSqmPathType()
Description copied from interface:SqmPathSourceThe type of path this source creates.- Specified by:
getSqmPathTypein interfaceSingularPersistentAttribute<D,J>- Specified by:
getSqmPathTypein interfaceSqmPathSource<D>- Overrides:
getSqmPathTypein classAbstractAttribute<D,J,J>
-
getValueGraphType
public SimpleDomainType<J> getValueGraphType()
Description copied from interface:SingularPersistentAttributeFor a singular attribute, the value type is defined as the attribute type- Specified by:
getValueGraphTypein interfacePersistentAttribute<D,J>- Specified by:
getValueGraphTypein interfaceSingularPersistentAttribute<D,J>- Overrides:
getValueGraphTypein classAbstractAttribute<D,J,J>
-
getKeyGraphType
public SimpleDomainType<?> getKeyGraphType()
- Specified by:
getKeyGraphTypein interfacePersistentAttribute<D,J>
-
getType
public SimpleDomainType<J> getType()
- Specified by:
getTypein interfaceSingularAttribute<D,J>- Specified by:
getTypein interfaceSingularPersistentAttribute<D,J>
-
getBindableJavaType
public Class<J> getBindableJavaType()
Description copied from interface:BindableTypeThe expected Java type- Specified by:
getBindableJavaTypein interfaceBindable<D>- Specified by:
getBindableJavaTypein interfaceBindableType<D>
-
findSubPathSource
public SqmPathSource<?> findSubPathSource(String name)
Description copied from interface:SqmPathSourceFind aSqmPathSourceby name relative to this source.- Specified by:
findSubPathSourcein interfaceSqmPathSource<D>- Returns:
- null if the subPathSource is not found
-
findSubPathSource
public SqmPathSource<?> findSubPathSource(String name, JpaMetamodelImplementor metamodel)
Description copied from interface:SqmPathSourceFind aSqmPathSourceby name relative to this source.- Specified by:
findSubPathSourcein interfaceSqmPathSource<D>- Returns:
- null if the subPathSource is not found
-
getPathSource
public SqmPathSource<J> getPathSource()
- Specified by:
getPathSourcein interfaceSingularPersistentAttribute<D,J>
-
isGeneric
public boolean isGeneric()
Description copied from interface:SqmPathSourceIndicates if this path source is generically typed- Specified by:
isGenericin interfaceSqmPathSource<D>
-
createSqmJoin
public SqmAttributeJoin<D,J> createSqmJoin(SqmFrom<?,D> lhs, SqmJoinType joinType, String alias, boolean fetched, SqmCreationState creationState)
- Specified by:
createSqmJoinin interfaceSqmJoinable<D,J>
-
createNavigablePath
public NavigablePath createNavigablePath(SqmPath<?> parent, String alias)
- Specified by:
createNavigablePathin interfaceSqmJoinable<D,J>
-
isId
public boolean isId()
- Specified by:
isIdin interfaceSingularAttribute<D,J>
-
isVersion
public boolean isVersion()
- Specified by:
isVersionin interfaceSingularAttribute<D,J>
-
isOptional
public boolean isOptional()
- Specified by:
isOptionalin interfaceSingularAttribute<D,J>
-
isAssociation
public boolean isAssociation()
- Specified by:
isAssociationin interfaceAttribute<D,J>
-
isCollection
public boolean isCollection()
- Specified by:
isCollectionin interfaceAttribute<D,J>
-
getBindableType
public Bindable.BindableType getBindableType()
- Specified by:
getBindableTypein interfaceBindable<D>
-
createSqmPath
public SqmPath<J> createSqmPath(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource)
Description copied from interface:SqmPathSourceCreate an SQM path for this source relative to the given left hand side- Specified by:
createSqmPathin interfaceSqmPathSource<D>
-
getRelationalJavaType
public JavaType<?> getRelationalJavaType()
- Specified by:
getRelationalJavaTypein interfaceSqmExpressible<D>
-
-