Class BasicAttributeMapping
java.lang.Object
org.hibernate.metamodel.mapping.internal.AbstractAttributeMapping
org.hibernate.metamodel.mapping.internal.AbstractStateArrayContributorMapping
org.hibernate.metamodel.mapping.internal.AbstractSingularAttributeMapping
org.hibernate.metamodel.mapping.internal.BasicAttributeMapping
- All Implemented Interfaces:
AttributeMapping,BasicValuedMapping,BasicValuedModelPart,Bindable,JdbcMappingContainer,MappingModelExpressible,ModelPart,OwnedValuedModelPart,PropertyBasedMapping,SelectableMapping,SelectableMappings,SingularAttributeMapping,SqlExpressible,SqlTypedMapping,ValuedModelPart,ValueMapping,DatabaseSnapshotContributor,Fetchable,FetchOptions,FetchStyleAccess,FetchTimingAccess,JavaTypedExpressible,MutabilityPlanExposer
public class BasicAttributeMapping
extends AbstractSingularAttributeMapping
implements SingularAttributeMapping, BasicValuedModelPart
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesBiConsumer<X,Y>, Bindable.JdbcValuesConsumer Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer -
Constructor Summary
ConstructorsConstructorDescriptionBasicAttributeMapping(String attributeName, NavigableRole navigableRole, int stateArrayPosition, int fetchableIndex, AttributeMetadata attributeMetadata, FetchTiming mappedFetchTiming, FetchStyle mappedFetchStyle, String tableExpression, String mappedColumnExpression, SelectablePath selectablePath, boolean isFormula, String customReadExpression, String customWriteExpression, String columnDefinition, Long length, Integer precision, Integer scale, Integer temporalPrecision, boolean isLob, boolean nullable, boolean insertable, boolean updateable, boolean partitioned, JdbcMapping jdbcMapping, ManagedMappingType declaringType, PropertyAccess propertyAccess) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState) Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.voidapplySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection, JdbcMapping> selectionConsumer) Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.<X,Y> int breakDownJdbcValues(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X, Y> valueConsumer, SharedSessionContractImplementor session) Breaks down the domain value to its constituent JDBC values.<T> DomainResult<T> createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState) Create a DomainResult for a specific reference to this ModelPart.<X,Y> int forEachDisassembledJdbcValue(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> valuesConsumer, SharedSessionContractImplementor session) LikeBindable.forEachDisassembledJdbcValue(Object, Object, Object, JdbcValuesBiConsumer, SharedSessionContractImplementor), but additionally receives an offset by which the selectionIndex is incremented when callingBindable.JdbcValuesBiConsumer.consume(int, Object, Object, Object, JdbcMapping).intforEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action) Visit each JdbcMapping starting from the given offsetintforEachSelectable(int offset, SelectableConsumer consumer) Visits each selectable mapping with the selectable index offset by the given value.generateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState) Generates a Fetch of this fetchableThe table which contains the columns mapped by this valueThe selection's read expression accounting for formula treatment as well asColumnTransformer.read()The selection's write expression accountingColumnTransformer.write()JavaType<?> The Java type for this part.Anything that is expressible at the SQL AST level would be of basic type.Descriptor for the type of this mappinggetScale()The selection's expression.booleanIs the mapping a formula instead of a physical column?booleanbooleanisLazy()booleanisLob()booleanIs the mapping considered nullable?booleanbooleantoString()static BasicAttributeMappingwithSelectableMapping(ManagedMappingType declaringType, BasicValuedModelPart original, PropertyAccess propertyAccess, boolean insertable, boolean updateable, SelectableMapping selectableMapping) Methods inherited from class org.hibernate.metamodel.mapping.internal.AbstractSingularAttributeMapping
getGeneratorMethods inherited from class org.hibernate.metamodel.mapping.internal.AbstractStateArrayContributorMapping
getFetchableName, getMappedFetchOptions, getStyle, getTimingMethods inherited from class org.hibernate.metamodel.mapping.internal.AbstractAttributeMapping
getAttributeMetadata, getAttributeName, getDeclaringType, getFetchableKey, getPartMappingType, getPropertyAccess, getStateArrayPositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.metamodel.mapping.AttributeMapping
asAttributeMapping, asEmbeddedAttributeMapping, asPluralAttributeMapping, compare, findContainingEntityMapping, getAttributeMetadata, getAttributeName, getDeclaringType, getExposedMutabilityPlan, getGenerator, getPartName, getPropertyAccess, getStateArrayPosition, getValue, isEmbeddedAttributeMapping, isPluralAttributeMapping, setValueMethods inherited from interface org.hibernate.metamodel.mapping.BasicValuedMapping
addToCacheKey, disassembleMethods inherited from interface org.hibernate.metamodel.mapping.BasicValuedModelPart
asBasicValuedModelPart, forEachSelectable, getJdbcMapping, getJdbcTypeCount, getPartMappingType, getSelectable, getSingleJdbcMapping, hasPartitionedSelectionMappingMethods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.sql.results.graph.DatabaseSnapshotContributor
createSnapshotDomainResultMethods inherited from interface org.hibernate.sql.results.graph.Fetchable
getFetchableKey, getFetchableName, getMappedFetchOptions, incrementFetchDepth, isSelectable, resolveCircularFetchMethods inherited from interface org.hibernate.type.descriptor.java.JavaTypedExpressible
addToCacheKeyMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asEntityMappingType, breakDownJdbcValues, decompose, decompose, isEntityIdentifierMapping, isVirtualMethods inherited from interface org.hibernate.metamodel.mapping.SqlTypedMapping
toSizeMethods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachUpdatable, getJdbcTypeCount, getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
Constructor Details
-
Method Details
-
withSelectableMapping
public static BasicAttributeMapping withSelectableMapping(ManagedMappingType declaringType, BasicValuedModelPart original, PropertyAccess propertyAccess, boolean insertable, boolean updateable, SelectableMapping selectableMapping) -
getJdbcMapping
Description copied from interface:SqlExpressibleAnything that is expressible at the SQL AST level would be of basic type.- Specified by:
getJdbcMappingin interfaceBasicValuedMapping- Specified by:
getJdbcMappingin interfaceSqlExpressible- Specified by:
getJdbcMappingin interfaceSqlTypedMapping
-
getMappedType
Description copied from interface:ValueMappingDescriptor for the type of this mapping- Specified by:
getMappedTypein interfaceValueMapping
-
getJavaType
Description copied from interface:ModelPartThe Java type for this part. Generally equivalent toMappingType.getMappedJavaType()relative toModelPart.getPartMappingType()- Specified by:
getJavaTypein interfaceModelPart- Overrides:
getJavaTypein classAbstractAttributeMapping
-
getSelectionExpression
Description copied from interface:SelectableMappingThe selection's expression. This is the column name or formula- Specified by:
getSelectionExpressionin interfaceSelectableMapping
-
getSelectableName
- Specified by:
getSelectableNamein interfaceSelectableMapping
-
getSelectablePath
- Specified by:
getSelectablePathin interfaceSelectableMapping
-
isLob
public boolean isLob()- Specified by:
isLobin interfaceSqlTypedMapping
-
isFormula
public boolean isFormula()Description copied from interface:SelectableMappingIs the mapping a formula instead of a physical column?- Specified by:
isFormulain interfaceSelectableMapping
-
isNullable
public boolean isNullable()Description copied from interface:SelectableMappingIs the mapping considered nullable?- Specified by:
isNullablein interfaceSelectableMapping
-
isLazy
public boolean isLazy() -
isInsertable
public boolean isInsertable()- Specified by:
isInsertablein interfaceSelectableMapping
-
isUpdateable
public boolean isUpdateable()- Specified by:
isUpdateablein interfaceSelectableMapping
-
isPartitioned
public boolean isPartitioned()- Specified by:
isPartitionedin interfaceSelectableMapping
-
getCustomReadExpression
Description copied from interface:SelectableMappingThe selection's read expression accounting for formula treatment as well asColumnTransformer.read()- Specified by:
getCustomReadExpressionin interfaceSelectableMapping
-
getCustomWriteExpression
Description copied from interface:SelectableMappingThe selection's write expression accountingColumnTransformer.write()- Specified by:
getCustomWriteExpressionin interfaceSelectableMapping
-
getWriteExpression
- Specified by:
getWriteExpressionin interfaceSelectableMapping
-
getColumnDefinition
- Specified by:
getColumnDefinitionin interfaceSqlTypedMapping
-
getLength
- Specified by:
getLengthin interfaceSqlTypedMapping
-
getPrecision
- Specified by:
getPrecisionin interfaceSqlTypedMapping
-
getScale
- Specified by:
getScalein interfaceSqlTypedMapping
-
getTemporalPrecision
- Specified by:
getTemporalPrecisionin interfaceSqlTypedMapping
-
getContainingTableExpression
Description copied from interface:ValuedModelPartThe table which contains the columns mapped by this value- Specified by:
getContainingTableExpressionin interfaceSelectableMapping- Specified by:
getContainingTableExpressionin interfaceValuedModelPart
-
toString
-
forEachJdbcType
Description copied from interface:JdbcMappingContainerVisit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-
forEachSelectable
Description copied from interface:ModelPartVisits each selectable mapping with the selectable index offset by the given value. Returns the amount of jdbc types that have been visited.- Specified by:
forEachSelectablein interfaceBasicValuedModelPart- Specified by:
forEachSelectablein interfaceModelPart- Specified by:
forEachSelectablein interfaceSelectableMappings- Specified by:
forEachSelectablein interfaceValuedModelPart- See Also:
-