Top Inners Fields Constructors Methods
org.hibernate.metamodel.model.domain.internal

public Class SingularAttributeImpl<D, J>

extends AbstractAttribute<D, J, J>
implements SingularPersistentAttribute<D, J>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.hibernate.metamodel.model.domain.SingularPersistentAttribute, org.hibernate.query.sqm.SqmJoinable, org.hibernate.query.sqm.SqmPathSource, org.hibernate.query.sqm.tree.SqmExpressibleAccessor, jakarta.persistence.metamodel.Bindable, org.hibernate.query.sqm.SqmExpressible, org.hibernate.query.BindableType, org.hibernate.metamodel.model.domain.PersistentAttribute, jakarta.persistence.metamodel.Attribute, jakarta.persistence.metamodel.SingularAttribute
Known Direct Subclasses
org.hibernate.metamodel.model.domain.internal.SingularAttributeImpl.Identifier, org.hibernate.metamodel.model.domain.internal.SingularAttributeImpl.Version
Imports
java.io.Serializable, java.lang.reflect.Member, org.hibernate.metamodel.AttributeClassification, org.hibernate.metamodel.internal.MetadataContext, org.hibernate.metamodel.mapping.CollectionPart, org.hibernate.metamodel.model.domain.AnyMappingDomainType, .DomainType, .EntityDomainType, .IdentifiableDomainType, .ManagedDomainType, .PluralPersistentAttribute, .SimpleDomainType, .SingularPersistentAttribute, org.hibernate.metamodel.model.domain.spi.JpaMetamodelImplementor, org.hibernate.query.SemanticException, org.hibernate.query.sqm.SqmPathSource, org.hibernate.query.hql.spi.SqmCreationState, org.hibernate.query.sqm.internal.SqmMappingModelHelper, org.hibernate.query.sqm.spi.SqmCreationHelper, org.hibernate.query.sqm.tree.SqmJoinType, org.hibernate.query.sqm.tree.domain.SqmPath, .SqmSingularJoin, org.hibernate.query.sqm.tree.from.SqmAttributeJoin, .SqmFrom, org.hibernate.spi.EntityIdentifierNavigablePath, .NavigablePath, org.hibernate.type.descriptor.java.JavaType

Authors
Emmanuel Bernard, Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
SingularAttributeImpl.Identifier<D, J>

Subclass used to simplify instantiation of singular attributes representing an entity's identifier.

public static class
SingularAttributeImpl.Version<X, Y>

Subclass used to simply instantiation of singular attributes representing an entity's version.

Field Summary

Modifier and TypeField and Description
private final boolean
private final boolean
private final boolean
private final SqmPathSource<J>

Constructor Summary

AccessConstructor and Description
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 Summary

Modifier and TypeMethod and Description
public NavigablePath
public SqmAttributeJoin<D, J>
createSqmJoin(SqmFrom<?, D> lhs, SqmJoinType joinType, String alias, boolean fetched, SqmCreationState creationState)

Implements org.hibernate.query.sqm.SqmJoinable.createSqmJoin.

public SqmPath<J>
createSqmPath(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource)

Implements org.hibernate.query.sqm.SqmPathSource.createSqmPath.

Create an SQM path for this source relative to the given left hand side
public SqmPathSource<?>
findSubPathSource(String name)

Implements org.hibernate.query.sqm.SqmPathSource.findSubPathSource.

Find a SqmPathSource by name relative to this source.
public SqmPathSource<?>
findSubPathSource(String name, JpaMetamodelImplementor metamodel)

Overrides default org.hibernate.query.sqm.SqmPathSource.findSubPathSource.

Find a SqmPathSource by name relative to this source.
public Class<J>
public Bindable.BindableType
getBindableType()

Implements jakarta.persistence.metamodel.Bindable.getBindableType.

Return the bindable type of the represented object.
public JavaType<J>
getExpressibleJavaType()

Implements org.hibernate.query.sqm.SqmExpressible.getExpressibleJavaType.

The Java type descriptor for this expressible
public SimpleDomainType<?>
public String
public SqmPathSource<J>
public SimpleDomainType<J>
public SimpleDomainType<J>
getType()

Implements org.hibernate.metamodel.model.domain.SingularPersistentAttribute.getType.

Return the type that represents the type of the attribute.
public SimpleDomainType<J>
public boolean
isAssociation()

Implements jakarta.persistence.metamodel.Attribute.isAssociation.

Is the attribute an association.
public boolean
isCollection()

Implements jakarta.persistence.metamodel.Attribute.isCollection.

Is the attribute collection-valued (represents a Collection, Set, List, or Map).
public boolean
isGeneric()

Overrides default org.hibernate.query.sqm.SqmPathSource.isGeneric.

Indicates if this path source is generically typed
public boolean
isId()

Implements jakarta.persistence.metamodel.SingularAttribute.isId.

Is the attribute an id attribute.
public boolean
public boolean
isVersion()

Implements jakarta.persistence.metamodel.SingularAttribute.isVersion.

Is the attribute a version attribute.
Inherited from org.hibernate.metamodel.model.domain.internal.AbstractAttribute:
getAttributeClassificationgetAttributeJavaTypegetDeclaringTypegetJavaMembergetJavaTypegetNamegetPersistentAttributeTypetoStringwriteReplace

Field Detail

isIdentifierback to summary
private final boolean isIdentifier
isOptionalback to summary
private final boolean isOptional
isVersionback to summary
private final boolean isVersion
sqmPathSourceback to summary
private final SqmPathSource<J> sqmPathSource

Constructor Detail

SingularAttributeImplback to summary
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

createNavigablePathback to summary
public NavigablePath createNavigablePath(SqmPath<?> parent, String alias)

Overrides default org.hibernate.query.sqm.SqmJoinable.createNavigablePath.

Annotations
@Override
createSqmJoinback to summary
public SqmAttributeJoin<D, J> createSqmJoin(SqmFrom<?, D> lhs, SqmJoinType joinType, String alias, boolean fetched, SqmCreationState creationState)

Implements org.hibernate.query.sqm.SqmJoinable.createSqmJoin.

Annotations
@Override
createSqmPathback to summary
public SqmPath<J> createSqmPath(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource)

Implements org.hibernate.query.sqm.SqmPathSource.createSqmPath.

Doc from org.hibernate.query.sqm.SqmPathSource.createSqmPath.

Create an SQM path for this source relative to the given left hand side

Annotations
@Override
findSubPathSourceback to summary
public SqmPathSource<?> findSubPathSource(String name)

Implements org.hibernate.query.sqm.SqmPathSource.findSubPathSource.

Doc from org.hibernate.query.sqm.SqmPathSource.findSubPathSource.

Find a SqmPathSource by name relative to this source.

Returns:SqmPathSource<?>

null if the subPathSource is not found

Annotations
@Override
findSubPathSourceback to summary
public SqmPathSource<?> findSubPathSource(String name, JpaMetamodelImplementor metamodel)

Overrides default org.hibernate.query.sqm.SqmPathSource.findSubPathSource.

Doc from org.hibernate.query.sqm.SqmPathSource.findSubPathSource.

Find a SqmPathSource by name relative to this source.

Returns:SqmPathSource<?>

null if the subPathSource is not found

Annotations
@Override
getBindableJavaTypeback to summary
public Class<J> getBindableJavaType()

Implements jakarta.persistence.metamodel.Bindable.getBindableJavaType, org.hibernate.query.BindableType.getBindableJavaType.

Doc from jakarta.persistence.metamodel.Bindable.getBindableJavaType.

Return the Java type of the represented object. If the bindable type of the object is PLURAL_ATTRIBUTE, the Java element type is returned. If the bindable type is SINGULAR_ATTRIBUTE or ENTITY_TYPE, the Java type of the represented entity or attribute is returned.

Returns:Class<J>

Java type

Annotations
@Override
getBindableTypeback to summary
public Bindable.BindableType getBindableType()

Implements jakarta.persistence.metamodel.Bindable.getBindableType.

Doc from jakarta.persistence.metamodel.Bindable.getBindableType.

Return the bindable type of the represented object.

Returns:Bindable.BindableType

bindable type

Annotations
@Override
getExpressibleJavaTypeback to summary
public JavaType<J> getExpressibleJavaType()

Implements org.hibernate.query.sqm.SqmExpressible.getExpressibleJavaType.

Doc from org.hibernate.query.sqm.SqmExpressible.getExpressibleJavaType.

The Java type descriptor for this expressible

getKeyGraphTypeback to summary
public SimpleDomainType<?> getKeyGraphType()

Implements org.hibernate.metamodel.model.domain.PersistentAttribute.getKeyGraphType.

Annotations
@Override
getPathNameback to summary
public String getPathName()

Implements org.hibernate.query.sqm.SqmPathSource.getPathName.

Doc from org.hibernate.query.sqm.SqmPathSource.getPathName.

The name of this thing.

Annotations
@Override
getPathSourceback to summary
public SqmPathSource<J> getPathSource()

Implements org.hibernate.metamodel.model.domain.SingularPersistentAttribute.getPathSource.

Annotations
@Override
getSqmPathTypeback to summary
public SimpleDomainType<J> getSqmPathType()

Overrides org.hibernate.metamodel.model.domain.internal.AbstractAttribute.getSqmPathType.

Implements org.hibernate.metamodel.model.domain.SingularPersistentAttribute.getSqmPathType.

Doc from org.hibernate.query.sqm.SqmPathSource.getSqmPathType.

The type of path this source creates.

Annotations
@Override
getTypeback to summary
public SimpleDomainType<J> getType()

Implements org.hibernate.metamodel.model.domain.SingularPersistentAttribute.getType.

Doc from jakarta.persistence.metamodel.SingularAttribute.getType.

Return the type that represents the type of the attribute.

Returns:SimpleDomainType<J>

type of attribute

Annotations
@Override
getValueGraphTypeback to summary
public SimpleDomainType<J> getValueGraphType()

Overrides org.hibernate.metamodel.model.domain.internal.AbstractAttribute.getValueGraphType.

Overrides default org.hibernate.metamodel.model.domain.SingularPersistentAttribute.getValueGraphType.

Implements org.hibernate.metamodel.model.domain.PersistentAttribute.getValueGraphType.

Doc from org.hibernate.metamodel.model.domain.SingularPersistentAttribute.getValueGraphType.

For a singular attribute, the value type is defined as the attribute type

Annotations
@Override
isAssociationback to summary
public boolean isAssociation()

Implements jakarta.persistence.metamodel.Attribute.isAssociation.

Doc from jakarta.persistence.metamodel.Attribute.isAssociation.

Is the attribute an association.

Returns:boolean

boolean indicating whether the attribute corresponds to an association

Annotations
@Override
isCollectionback to summary
public boolean isCollection()

Implements jakarta.persistence.metamodel.Attribute.isCollection.

Doc from jakarta.persistence.metamodel.Attribute.isCollection.

Is the attribute collection-valued (represents a Collection, Set, List, or Map).

Returns:boolean

boolean indicating whether the attribute is collection-valued

Annotations
@Override
isGenericback to summary
public boolean isGeneric()

Overrides default org.hibernate.query.sqm.SqmPathSource.isGeneric.

Doc from org.hibernate.query.sqm.SqmPathSource.isGeneric.

Indicates if this path source is generically typed

Annotations
@Override
isIdback to summary
public boolean isId()

Implements jakarta.persistence.metamodel.SingularAttribute.isId.

Doc from jakarta.persistence.metamodel.SingularAttribute.isId.

Is 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.

Returns:boolean

boolean indicating whether the attribute is an id

Annotations
@Override
isOptionalback to summary
public boolean isOptional()

Implements jakarta.persistence.metamodel.SingularAttribute.isOptional.

Doc from jakarta.persistence.metamodel.SingularAttribute.isOptional.

Can the attribute be null.

Returns:boolean

boolean indicating whether the attribute can be null

Annotations
@Override
isVersionback to summary
public boolean isVersion()

Implements jakarta.persistence.metamodel.SingularAttribute.isVersion.

Doc from jakarta.persistence.metamodel.SingularAttribute.isVersion.

Is the attribute a version attribute.

Returns:boolean

boolean indicating whether the attribute is a version attribute

Annotations
@Override
org.hibernate.metamodel.model.domain.internal back to summary

public Class SingularAttributeImpl.Identifier<D, J>

extends SingularAttributeImpl<D, J>
Class Inheritance

Subclass used to simplify instantiation of singular attributes representing an entity's identifier.

Constructor Summary

AccessConstructor and Description
public
Identifier(ManagedDomainType<D> declaringType, String name, SimpleDomainType<J> attributeType, Member member, AttributeClassification attributeClassification, boolean isGeneric, MetadataContext metadataContext)

Method Summary

Modifier and TypeMethod and Description
public NavigablePath
Inherited from org.hibernate.metamodel.model.domain.internal.SingularAttributeImpl:
createSqmJoincreateSqmPathfindSubPathSourcefindSubPathSourcegetBindableJavaTypegetBindableTypegetExpressibleJavaTypegetKeyGraphTypegetPathNamegetPathSourcegetSqmPathTypegetTypegetValueGraphTypeisAssociationisCollectionisGenericisIdisOptionalisVersion

Constructor Detail

Identifierback to summary
public Identifier(ManagedDomainType<D> declaringType, String name, SimpleDomainType<J> attributeType, Member member, AttributeClassification attributeClassification, boolean isGeneric, MetadataContext metadataContext)

Method Detail

createNavigablePathback to summary
public NavigablePath createNavigablePath(SqmPath<?> parent, String alias)

Overrides org.hibernate.metamodel.model.domain.internal.SingularAttributeImpl.createNavigablePath.

Overrides default org.hibernate.query.sqm.SqmJoinable.createNavigablePath.

Annotations
@Override
org.hibernate.metamodel.model.domain.internal back to summary

public Class SingularAttributeImpl.Version<X, Y>

extends SingularAttributeImpl<X, Y>
Class Inheritance

Subclass used to simply instantiation of singular attributes representing an entity's version.

Constructor Summary

AccessConstructor and Description
public
Version(ManagedDomainType<X> declaringType, String name, AttributeClassification attributeClassification, SimpleDomainType<Y> attributeType, Member member, MetadataContext metadataContext)

Method Summary

Inherited from org.hibernate.metamodel.model.domain.internal.SingularAttributeImpl:
createNavigablePathcreateSqmJoincreateSqmPathfindSubPathSourcefindSubPathSourcegetBindableJavaTypegetBindableTypegetExpressibleJavaTypegetKeyGraphTypegetPathNamegetPathSourcegetSqmPathTypegetTypegetValueGraphTypeisAssociationisCollectionisGenericisIdisOptionalisVersion

Constructor Detail

Versionback to summary
public Version(ManagedDomainType<X> declaringType, String name, AttributeClassification attributeClassification, SimpleDomainType<Y> attributeType, Member member, MetadataContext metadataContext)