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
,PathSource<J>
,PersistentAttribute<D,
,J> SingularPersistentAttribute<D,
,J> SqmExpressible<J>
,SqmJoinable<D,
,J> SqmPathSource<J>
,SqmPersistentAttribute<D,
,J> SqmSingularPersistentAttribute<D,
,J> SqmExpressibleAccessor<J>
- Direct Known Subclasses:
SingularAttributeImpl.Identifier
,SingularAttributeImpl.Version
public class SingularAttributeImpl<D,J>
extends AbstractAttribute<D,J,J>
implements SqmSingularPersistentAttribute<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, SqmDomainType<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 aPathSource
by name relative to this source.findSubPathSource
(String name, boolean includeSubtypes) Find aPathSource
by name relative to this source.The Java type descriptor for this expressibleThe name of this thing.The type of path this source creates.JavaType<?>
Usually the same asSqmExpressible.getExpressibleJavaType()
.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
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
getIntermediatePathSource, getSqmType, getSubPathSource, getSubPathSource
-
Constructor Details
-
SingularAttributeImpl
public SingularAttributeImpl(ManagedDomainType<D> declaringType, String name, AttributeClassification attributeClassification, SqmDomainType<J> attributeType, JavaType<?> relationalJavaType, Member member, boolean isIdentifier, boolean isVersion, boolean isOptional, boolean isGeneric, MetadataContext metadataContext)
-
-
Method Details
-
getPathName
Description copied from interface:PathSource
The name of this thing.- Specified by:
getPathName
in interfacePathSource<D>
-
getExpressibleJavaType
Description copied from interface:SqmExpressible
The Java type descriptor for this expressible- Specified by:
getExpressibleJavaType
in interfaceSqmExpressible<D>
-
getPathType
Description copied from interface:PathSource
The type of path this source creates.- Specified by:
getPathType
in interfacePathSource<D>
- Specified by:
getPathType
in interfaceSqmPathSource<D>
- Overrides:
getPathType
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
- Specified by:
getBindableJavaType
in interfaceBindable<D>
-
findSubPathSource
Description copied from interface:PathSource
Find aPathSource
by name relative to this source.- Specified by:
findSubPathSource
in interfacePathSource<D>
- 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:PathSource
Find aPathSource
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 interfacePathSource<D>
- 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
-
getSqmPathSource
- Specified by:
getSqmPathSource
in interfaceSqmSingularPersistentAttribute<D,
J>
-
getExpressible
- Specified by:
getExpressible
in interfaceSqmExpressibleAccessor<D>
- Specified by:
getExpressible
in interfaceSqmPathSource<D>
-
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
Description copied from interface:SqmExpressible
Usually the same asSqmExpressible.getExpressibleJavaType()
. But for types with value conversion, the Java type of the converted value.- Specified by:
getRelationalJavaType
in interfaceSqmExpressible<D>
-