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 classSubclass used to simplify instantiation of singular attributes representing an entity's identifier.static classSubclass used to simply instantiation of singular attributes representing an entity's version.Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.Attribute
Attribute.PersistentAttributeTypeNested 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) -
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 aPathSourceby name relative to this source.findSubPathSource(String name, boolean includeSubtypes) Find aPathSourceby 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 typebooleanbooleanbooleanIndicates if this path source is generically typedbooleanisId()booleanbooleanMethods inherited from class org.hibernate.metamodel.model.domain.internal.AbstractAttribute
getAttributeClassification, getAttributeJavaType, getDeclaringType, getJavaMember, getJavaType, getName, getPersistentAttributeType, toString, writeReplaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface jakarta.persistence.metamodel.Attribute
getJavaMember, getName, getPersistentAttributeTypeMethods inherited from interface org.hibernate.metamodel.model.domain.PersistentAttribute
getAttributeClassification, getAttributeJavaTypeMethods inherited from interface org.hibernate.metamodel.model.domain.SingularPersistentAttribute
getDeclaringType, getJavaTypeMethods inherited from interface org.hibernate.query.sqm.SqmExpressible
getTypeNameMethods inherited from interface org.hibernate.query.sqm.tree.SqmExpressibleAccessor
getNodeJavaTypeMethods inherited from interface org.hibernate.query.sqm.SqmJoinable
getNameMethods 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)
-
-
Method Details
-
getPathName
Description copied from interface:PathSourceThe name of this thing.- Specified by:
getPathNamein interfacePathSource<D>
-
getExpressibleJavaType
Description copied from interface:SqmExpressibleThe Java type descriptor for this expressible- Specified by:
getExpressibleJavaTypein interfaceSqmExpressible<D>
-
getPathType
Description copied from interface:PathSourceThe type of path this source creates.- Specified by:
getPathTypein interfacePathSource<D>- Specified by:
getPathTypein interfaceSqmPathSource<D>- Overrides:
getPathTypein classAbstractAttribute<D,J, 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
- Specified by:
getKeyGraphTypein interfacePersistentAttribute<D,J>
-
getType
- Specified by:
getTypein interfaceSingularAttribute<D,J> - Specified by:
getTypein interfaceSingularPersistentAttribute<D,J>
-
getBindableJavaType
- Specified by:
getBindableJavaTypein interfaceBindable<D>
-
findSubPathSource
Description copied from interface:PathSourceFind aPathSourceby name relative to this source.- Specified by:
findSubPathSourcein interfacePathSource<D>- Specified by:
findSubPathSourcein 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:PathSourceFind aPathSourceby name relative to this source. IfincludeSubtypesis set totrueand this path source is polymorphic, also try finding subtype attributes.- Specified by:
findSubPathSourcein interfacePathSource<D>- Specified by:
findSubPathSourcein 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:
getSqmPathSourcein interfaceSqmSingularPersistentAttribute<D,J>
-
getExpressible
- Specified by:
getExpressiblein interfaceSqmExpressibleAccessor<D>- Specified by:
getExpressiblein interfaceSqmPathSource<D>
-
isGeneric
public boolean isGeneric()Description copied from interface:SqmPathSourceIndicates if this path source is generically typed- Specified by:
isGenericin interfaceSqmPathSource<D>
-
createSqmJoin
public SqmJoin<D,J> createSqmJoin(SqmFrom<?, D> lhs, SqmJoinType joinType, String alias, boolean fetched, SqmCreationState creationState) - Specified by:
createSqmJoinin 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
- Specified by:
getBindableTypein interfaceBindable<D>
-
createSqmPath
Description copied from interface:SqmPathSourceCreate an SQM path for this source relative to the given left hand side- Specified by:
createSqmPathin interfaceSqmPathSource<D>
-
getRelationalJavaType
Description copied from interface:SqmExpressibleUsually the same asSqmExpressible.getExpressibleJavaType(). But for types with value conversion, the Java type of the converted value.- Specified by:
getRelationalJavaTypein interfaceSqmExpressible<D>
-