Implementation Note
`discriminatorType` represents the mapping to Class, whereas `discriminatorType.getUnderlyingType()` represents the "raw" JDBC mapping (String, Integer, etc)
| Modifier and Type | Field and Description |
|---|---|
| private final DiscriminatorType | |
| private final EntityMappingType | |
| private final NavigableRole | |
| private final BasicType |
| Access | Constructor and Description |
|---|---|
| public | AbstractDiscriminatorMapping(EntityMappingType entityDescriptor, DiscriminatorType<Object> discriminatorType, BasicType<Object> underlyingJdbcMapping)
|
| discriminatorType | back to summary |
|---|---|
| private final DiscriminatorType<Object> discriminatorType | |
| entityDescriptor | back to summary |
|---|---|
| private final EntityMappingType entityDescriptor | |
| role | back to summary |
|---|---|
| private final NavigableRole role | |
| underlyingJdbcMapping | back to summary |
|---|---|
| private final BasicType<Object> underlyingJdbcMapping | |
| AbstractDiscriminatorMapping | back to summary |
|---|---|
| public AbstractDiscriminatorMapping(EntityMappingType entityDescriptor, DiscriminatorType<Object> discriminatorType, BasicType<Object> underlyingJdbcMapping) | |
| 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.
| |
| 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
| |
| createDomainResult | back to summary |
|---|---|
| public 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.
| |
| findContainingEntityMapping | back to summary |
|---|---|
| public EntityMappingType findContainingEntityMapping() Implements org.
| |
| 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
| |
| 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.
| |
| generateFetch | back to summary |
|---|---|
| public BasicFetch Implements org. Doc from org. Generates a Fetch of this fetchable
| |
| getEntityDescriptor | back to summary |
|---|---|
| public EntityMappingType getEntityDescriptor() | |
| 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() Implements org. Doc from org. Anything that is expressible at the SQL AST level would be of basic type.
| |
| getMappedType | back to summary |
|---|---|
| public MappingType getMappedType() Implements org. Doc from org. Descriptor for the type of this mapping
| |
| getNavigableRole | back to summary |
|---|---|
| public NavigableRole getNavigableRole() Implements org.
| |
| getUnderlyingJdbcMapping | back to summary |
|---|---|
| public BasicType Implements org.
| |
| getValueConverter | back to summary |
|---|---|
| public DiscriminatorConverter Implements org. Doc from org. Information about the value mappings
| |
| resolveDiscriminatorValue | back to summary |
|---|---|
| public DiscriminatorValueDetails resolveDiscriminatorValue(Object value) Implements org. Doc from org. Retrieve the details for a particular discriminator value.
Returns
| |
| resolveSqlSelection | back to summary |
|---|---|
| private SqlSelection resolveSqlSelection(NavigablePath navigablePath, JdbcMapping jdbcMappingToUse, TableGroup tableGroup, FetchParent fetchParent, SqlAstCreationState creationState) | |