| Modifier and Type | Field and Description |
|---|---|
| private final SingularAttributeMapping | |
| private final SessionFactoryImplementor | sessionFactory
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| private final TypeConfiguration |
| Access | Constructor and Description |
|---|---|
| public | SimpleNaturalIdMapping(SingularAttributeMapping attribute, EntityMappingType declaringType, MappingModelCreationProcess creationProcess)
|
| attribute | back to summary |
|---|---|
| private final SingularAttributeMapping attribute | |
| sessionFactory | back to summary |
|---|---|
| private final SessionFactoryImplementor sessionFactory
Deprecated as a consequence of | |
| typeConfiguration | back to summary |
|---|---|
| private final TypeConfiguration typeConfiguration | |
| SimpleNaturalIdMapping | back to summary |
|---|---|
| public SimpleNaturalIdMapping(SingularAttributeMapping attribute, EntityMappingType declaringType, MappingModelCreationProcess creationProcess) | |
| addToCacheKey | back to summary |
|---|---|
| public void addToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session) Overrides default org. Implements org. Doc from org. Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.
| |
| applySqlSelections | back to summary |
|---|---|
| public void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState) Implements org. Doc from org. Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.
| |
| applySqlSelections | back to summary |
|---|---|
| public void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection, JdbcMapping> selectionConsumer) Implements org. Doc from org. Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.
| |
| asAttributeMapping | back to summary |
|---|---|
| public AttributeMapping asAttributeMapping() Overrides default org.
| |
| breakDownJdbcValues | back to summary |
|---|---|
| public <X, Y> int breakDownJdbcValues(Object domainValue, int offset, X x, Y y, ModelPart. Implements org. Doc from org. Breaks down the domain value to its constituent JDBC values.
Think of it as breaking the multi-dimensional array into a visitable flat array.
Additionally, it passes through the values
| |
| calculateHashCode | back to summary |
|---|---|
| public int calculateHashCode(Object value) Implements org. Doc from org. Calculate the hash-code of a natural-id value | |
| createDomainResult | back to summary |
|---|---|
| public <T> DomainResult Implements org. Doc from org. Create a DomainResult for a specific reference to this ModelPart.
| |
| disassemble | back to summary |
|---|---|
| public Object disassemble(Object value, SharedSessionContractImplementor session) Overrides default org. Implements org. Doc from org. Breaks down a value of
Generally speaking, this is the form in which entity state is kept relative to a
Session via
@Entity class Person {
@Id Integer id;
@Embedded Name name;
int age;
}
@Embeddable class Name {
String familiarName;
String familyName;
}
At the top level, we would want to disassemble a
Person( id=1, name=Name( 'Steve', 'Ebersole' ), 28 ) this disassemble would result in a multidimensional array:
[ ["Steve", "Ebersole"], 28 ] Note that the identifier is not part of this disassembled state. Note also how the embedded value results in a sub-array.
| |
| extractNaturalIdFromEntity | back to summary |
|---|---|
| public Object extractNaturalIdFromEntity(Object entity) Implements org. Doc from org. Given an entity instance, extract the normalized natural id representation | |
| extractNaturalIdFromEntityState | back to summary |
|---|---|
| public Object extractNaturalIdFromEntityState(Object[] state) Implements org. Doc from org. Given an array of "full entity state", extract the normalized natural id representation | |
| forEachDisassembledJdbcValue | back to summary |
|---|---|
| public <X, Y> int forEachDisassembledJdbcValue(Object value, int offset, X x, Y y, Bindable. Implements org. Doc from org. Like
| |
| forEachJdbcType | back to summary |
|---|---|
| public int forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action) Implements org. Doc from org. Visit each JdbcMapping starting from the given offset
| |
| forEachJdbcValue | back to summary |
|---|---|
| public <X, Y> int forEachJdbcValue(Object value, int offset, X x, Y y, Bindable. Overrides default org. Doc from org. Visit each constituent JDBC value extracted from the entity instance itself.
Short-hand form of calling
| |
| forEachSelectable | back to summary |
|---|---|
| public int forEachSelectable(int offset, SelectableConsumer consumer) Overrides default org. Doc from org. Visits each selectable mapping with the selectable index offset by the given value. Returns the amount of jdbc types that have been visited.
| |
| getAttribute | back to summary |
|---|---|
| public SingularAttributeMapping getAttribute() | |
| getJavaType | back to summary |
|---|---|
| public JavaType Implements org. Doc from org. The Java type for this part. Generally equivalent to
| |
| getJdbcMapping | back to summary |
|---|---|
| public JdbcMapping getJdbcMapping(int index) Overrides default org. Implements org.
| |
| getJdbcMapping | back to summary |
|---|---|
| public JdbcMapping getJdbcMapping() Implements org. Doc from org. Anything that is expressible at the SQL AST level would be of basic type.
| |
| getJdbcTypeCount | back to summary |
|---|---|
| public int getJdbcTypeCount() Overrides default org. Doc from org. The number of JDBC mappings
| |
| getMappedType | back to summary |
|---|---|
| public MappingType getMappedType() Implements org. Doc from org. Descriptor for the type of this mapping
| |
| getNaturalIdAttributes | back to summary |
|---|---|
| public List Implements org. Doc from org. The attribute(s) making up the natural-id.
| |
| getPartMappingType | back to summary |
|---|---|
| public MappingType getPartMappingType() Implements org. Doc from org. The type for this part.
| |
| getSingleJdbcMapping | back to summary |
|---|---|
| public JdbcMapping getSingleJdbcMapping() Overrides default org.
| |
| getTypeConfiguration | back to summary |
|---|---|
| public TypeConfiguration getTypeConfiguration() Implements org.
| |
| hasPartitionedSelectionMapping | back to summary |
|---|---|
| public boolean hasPartitionedSelectionMapping() Implements org.
| |
| makeLoader | back to summary |
|---|---|
| public NaturalIdLoader Implements org. Doc from org. Make a loader capable of loading a single entity by natural-id
| |
| makeMultiLoader | back to summary |
|---|---|
| public MultiNaturalIdLoader Implements org. Doc from org. Make a loader capable of loading multiple entities by natural-id
| |
| normalizeIncomingValue | back to summary |
|---|---|
public Object normalizeIncomingValue(Object naturalIdToLoad)
| |
| normalizeInput | back to summary |
|---|---|
| public Object normalizeInput(Object incoming) Implements org. Doc from org. Normalize a user-provided natural-id value into the representation Hibernate uses internally | |
| validateInternalForm | back to summary |
|---|---|
| public void validateInternalForm(Object naturalIdValue) Implements org. Doc from org. Validates a natural id value(s) for the described natural-id based on the expected internal representation
| |
| verifyFlushState | back to summary |
|---|---|
| public void verifyFlushState(Object id, Object[] currentState, Object[] loadedState, SharedSessionContractImplementor session) Implements org. Doc from org. Verify the natural-id value(s) we are about to flush to the database
| |