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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Subclass used to simplify instantiation of singular attributes representing an entity's identifier.static class
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
ConstructorsConstructorDescriptionSingularAttributeImpl
(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
Modifier and TypeMethodDescriptioncreateNavigablePath
(SqmPath<?> parent, String alias) createSqmJoin
(SqmFrom<?, D> lhs, SqmJoinType joinType, String alias, boolean fetched, SqmCreationState creationState) createSqmPath
(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource) Create an SQM path for this source relative to the given left hand sidefindSubPathSource
(String name) Find aSqmPathSource
by name relative to this source.findSubPathSource
(String name, boolean includeSubtypes) Find aSqmPathSource
by name relative to this source.The expected Java typeThe Java type descriptor for this expressibleThe name of this thing.JavaType<?>
The type of path this source creates.getType()
For a singular attribute, the value type is defined as the attribute typeboolean
boolean
boolean
Indicates if this path source is generically typedboolean
isId()
boolean
boolean
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
findSubPathSource, getExpressible, getIntermediatePathSource, getSqmType, getSubPathSource, getSubPathSource, getSubPathSource
-
Constructor Details
-
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 Details
-
getPathName
Description copied from interface:SqmPathSource
The name of this thing.- Specified by:
getPathName
in interfaceSqmPathSource<D>
-
getExpressibleJavaType
Description copied from interface:SqmExpressible
The Java type descriptor for this expressible- Specified by:
getExpressibleJavaType
in interfaceSqmExpressible<D>
-
getSqmPathType
Description copied from interface:SqmPathSource
The type of path this source creates.- Specified by:
getSqmPathType
in interfaceSingularPersistentAttribute<D,
J> - Specified by:
getSqmPathType
in interfaceSqmPathSource<D>
- Overrides:
getSqmPathType
in classAbstractAttribute<D,
J, 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
- Specified by:
getKeyGraphType
in interfacePersistentAttribute<D,
J>
-
getType
- Specified by:
getType
in interfaceSingularAttribute<D,
J> - Specified by:
getType
in interfaceSingularPersistentAttribute<D,
J>
-
getBindableJavaType
Description copied from interface:BindableType
The expected Java type- Specified by:
getBindableJavaType
in interfaceBindable<D>
- Specified by:
getBindableJavaType
in interfaceBindableType<D>
-
findSubPathSource
Description copied from interface:SqmPathSource
Find aSqmPathSource
by name relative to this source.- Specified by:
findSubPathSource
in interfaceSqmPathSource<D>
- Parameters:
name
- the name of the path source to find- Returns:
- null if the subPathSource is not found
-
findSubPathSource
Description copied from interface:SqmPathSource
Find aSqmPathSource
by name relative to this source. IfincludeSubtypes
is set totrue
and this path source is polymorphic, also try finding subtype attributes.- Specified by:
findSubPathSource
in interfaceSqmPathSource<D>
- Parameters:
name
- the name of the path source to findincludeSubtypes
- flag indicating whether to consider subtype attributes- Returns:
- null if the subPathSource is not found
-
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 SqmJoin<D,J> createSqmJoin(SqmFrom<?, D> lhs, SqmJoinType joinType, String alias, boolean fetched, SqmCreationState creationState) - Specified by:
createSqmJoin
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
- Specified by:
getBindableType
in interfaceBindable<D>
-
createSqmPath
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>
-
getRelationalJavaType
- Specified by:
getRelationalJavaType
in interfaceSqmExpressible<D>
-