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
- Author:
- Emmanuel Bernard, Steve Ebersole
- 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, 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 aSqmPathSourceby name relative to this source.findSubPathSource(String name, JpaMetamodelImplementor metamodel) Find aSqmPathSourceby name relative to this source.Return the Java type of the represented object.Return the bindable type of the represented object.The Java type descriptor for this expressibleThe name of this thing.JavaType<?>The type of path this source creates.getType()Return the type that represents the type of the attribute.For a singular attribute, the value type is defined as the attribute typebooleanIs the attribute an association.booleanIs the attribute collection-valued (represents a Collection, Set, List, or Map).booleanIndicates if this path source is generically typedbooleanisId()Is the attribute an id attribute.booleanCan the attribute be null.booleanIs the attribute a version attribute.Methods 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
getTypeName, isInstance, resolveExpressibleMethods 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
getExpressible, getIntermediatePathSource, getSqmType, 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:SqmPathSourceThe name of this thing.- Specified by:
getPathNamein interfaceSqmPathSource<D>
-
getExpressibleJavaType
Description copied from interface:SqmExpressibleThe Java type descriptor for this expressible- Specified by:
getExpressibleJavaTypein interfaceSqmExpressible<D>
-
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
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
Description copied from interface:SingularAttributeReturn the type that represents the type of the attribute.- Specified by:
getTypein interfaceSingularAttribute<D,J> - Specified by:
getTypein interfaceSingularPersistentAttribute<D,J> - Returns:
- type of attribute
-
getBindableJavaType
Description copied from interface:BindableReturn the Java type of the represented object. If the bindable type of the object isPLURAL_ATTRIBUTE, the Java element type is returned. If the bindable type isSINGULAR_ATTRIBUTEorENTITY_TYPE, the Java type of the represented entity or attribute is returned.- Specified by:
getBindableJavaTypein interfaceBindable<D>- Specified by:
getBindableJavaTypein interfaceBindableType<D>- Returns:
- Java type
-
findSubPathSource
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
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
- 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>
-
isId
public boolean isId()Description copied from interface:SingularAttributeIs the attribute an id attribute. This method will return true if the attribute is an attribute that corresponds to a simple id, an embedded id, or an attribute of an id class.- Specified by:
isIdin interfaceSingularAttribute<D,J> - Returns:
- boolean indicating whether the attribute is an id
-
isVersion
public boolean isVersion()Description copied from interface:SingularAttributeIs the attribute a version attribute.- Specified by:
isVersionin interfaceSingularAttribute<D,J> - Returns:
- boolean indicating whether the attribute is a version attribute
-
isOptional
public boolean isOptional()Description copied from interface:SingularAttributeCan the attribute be null.- Specified by:
isOptionalin interfaceSingularAttribute<D,J> - Returns:
- boolean indicating whether the attribute can be null
-
isAssociation
public boolean isAssociation()Description copied from interface:AttributeIs the attribute an association.- Specified by:
isAssociationin interfaceAttribute<D,J> - Returns:
- boolean indicating whether the attribute corresponds to an association
-
isCollection
public boolean isCollection()Description copied from interface:AttributeIs the attribute collection-valued (represents a Collection, Set, List, or Map).- Specified by:
isCollectionin interfaceAttribute<D,J> - Returns:
- boolean indicating whether the attribute is collection-valued
-
getBindableType
Description copied from interface:BindableReturn the bindable type of the represented object.- Specified by:
getBindableTypein interfaceBindable<D>- Returns:
- bindable type
-
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
- Specified by:
getRelationalJavaTypein interfaceSqmExpressible<D>
-