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
,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 class
SingularAttributeImpl.Identifier<D,J>
Subclass used to simplify instantiation of singular attributes representing an entity's identifier.static class
SingularAttributeImpl.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 NavigablePath
createNavigablePath(SqmPath parent, String alias)
SqmAttributeJoin<D,J>
createSqmJoin(SqmFrom 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 a SqmPathSource by name relative to this source.Class<J>
getBindableJavaType()
The expected Java typeBindable.BindableType
getBindableType()
JavaType<J>
getExpressibleJavaType()
The Java type descriptor for this expressibleSimpleDomainType<J>
getKeyGraphType()
String
getPathName()
The name of this thing.SqmPathSource<J>
getPathSource()
SimpleDomainType<J>
getSqmPathType()
The type of SqmPaths this source creates.SimpleDomainType<J>
getType()
SimpleDomainType<J>
getValueGraphType()
For a singular attribute, the value type is defined as the attribute typeboolean
isAssociation()
boolean
isCollection()
boolean
isGeneric()
Indicates if this path source is generically typedboolean
isId()
boolean
isOptional()
boolean
isVersion()
-
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
getRelationalJavaType, 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, 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:SqmPathSource
The name of this thing. Mainly used in logging and when creating aNavigablePath
- Specified by:
getPathName
in interfaceSqmPathSource<D>
-
getExpressibleJavaType
public JavaType<J> getExpressibleJavaType()
Description copied from interface:SqmExpressible
The Java type descriptor for this expressible- Specified by:
getExpressibleJavaType
in interfaceSqmExpressible<D>
-
getSqmPathType
public SimpleDomainType<J> getSqmPathType()
Description copied from interface:SqmPathSource
The type of SqmPaths this source creates. Corollary to JPA'sBindable.getBindableJavaType()
- Specified by:
getSqmPathType
in interfaceSingularPersistentAttribute<D,J>
- Specified by:
getSqmPathType
in interfaceSqmPathSource<D>
- Overrides:
getSqmPathType
in classAbstractAttribute<D,J,J>
-
getValueGraphType
public SimpleDomainType<J> getValueGraphType()
Description copied from interface:SingularPersistentAttribute
For a singular attribute, the value type is defined as the attribute type- Specified by:
getValueGraphType
in interfacePersistentAttribute<D,J>
- Specified by:
getValueGraphType
in interfaceSingularPersistentAttribute<D,J>
- Overrides:
getValueGraphType
in classAbstractAttribute<D,J,J>
-
getKeyGraphType
public SimpleDomainType<J> getKeyGraphType()
- Specified by:
getKeyGraphType
in interfacePersistentAttribute<D,J>
-
getType
public SimpleDomainType<J> getType()
- Specified by:
getType
in interfaceSingularAttribute<D,J>
- Specified by:
getType
in interfaceSingularPersistentAttribute<D,J>
-
getBindableJavaType
public Class<J> getBindableJavaType()
Description copied from interface:BindableType
The expected Java type- Specified by:
getBindableJavaType
in interfaceBindable<D>
- Specified by:
getBindableJavaType
in interfaceBindableType<D>
-
findSubPathSource
public SqmPathSource<?> findSubPathSource(String name)
Description copied from interface:SqmPathSource
Find a SqmPathSource by name relative to this source. returns null if the subPathSource is not found- Specified by:
findSubPathSource
in interfaceSqmPathSource<D>
-
getPathSource
public SqmPathSource<J> getPathSource()
- Specified by:
getPathSource
in interfaceSingularPersistentAttribute<D,J>
-
isGeneric
public boolean isGeneric()
Description copied from interface:SqmPathSource
Indicates if this path source is generically typed- Specified by:
isGeneric
in interfaceSqmPathSource<D>
-
createSqmJoin
public SqmAttributeJoin<D,J> createSqmJoin(SqmFrom lhs, SqmJoinType joinType, String alias, boolean fetched, SqmCreationState creationState)
- Specified by:
createSqmJoin
in interfaceSqmJoinable<D,J>
-
createNavigablePath
public NavigablePath createNavigablePath(SqmPath parent, String alias)
- Specified by:
createNavigablePath
in interfaceSqmJoinable<D,J>
-
isId
public boolean isId()
- Specified by:
isId
in interfaceSingularAttribute<D,J>
-
isVersion
public boolean isVersion()
- Specified by:
isVersion
in interfaceSingularAttribute<D,J>
-
isOptional
public boolean isOptional()
- Specified by:
isOptional
in interfaceSingularAttribute<D,J>
-
isAssociation
public boolean isAssociation()
- Specified by:
isAssociation
in interfaceAttribute<D,J>
-
isCollection
public boolean isCollection()
- Specified by:
isCollection
in interfaceAttribute<D,J>
-
getBindableType
public Bindable.BindableType getBindableType()
- Specified by:
getBindableType
in interfaceBindable<D>
-
createSqmPath
public SqmPath<J> createSqmPath(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource)
Description copied from interface:SqmPathSource
Create an SQM path for this source relative to the given left-hand side- Specified by:
createSqmPath
in interfaceSqmPathSource<D>
-
-