Top Description Methods
org.hibernate.metamodel.mapping

public Interface BasicValuedMapping

extends ValueMapping, SqlExpressible
Known Direct Subinterfaces
org.hibernate.metamodel.mapping.BasicValuedModelPart, org.hibernate.type.BasicType
Known Direct Implementers
org.hibernate.metamodel.mapping.internal.SimpleNaturalIdMapping, org.hibernate.sql.ast.tree.expression.EntityTypeLiteral, org.hibernate.sql.exec.internal.AbstractJdbcParameter
Imports
org.hibernate.cache.MutableCacheKeyBuilder, org.hibernate.engine.spi.SharedSessionContractImplementor

Any basic-typed ValueMapping. Generally this would be one of
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public default void
addToCacheKey(MutableCacheKeyBuilder
the MutableCacheKey used to add the disassembled value and the hashCode
cacheKey
,
Object
the value to disassemble
value
,
SharedSessionContractImplementor
the SharedSessionContractImplementor
session
)

Implements org.hibernate.metamodel.mapping.Bindable.addToCacheKey, org.hibernate.type.descriptor.java.JavaTypedExpressible.addToCacheKey.

Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.
public default Object
disassemble(Object value, SharedSessionContractImplementor session)

Implements org.hibernate.metamodel.mapping.Bindable.disassemble.

Breaks down a value of J into its simple pieces.
public default JdbcMapping
public JdbcMapping
getJdbcMapping()

Redeclares org.hibernate.metamodel.mapping.SqlExpressible.getJdbcMapping.

Anything that is expressible at the SQL AST level would be of basic type.
public default int
public default JdbcMapping
Inherited from org.hibernate.metamodel.mapping.ValueMapping:
getExpressibleJavaTypegetMappedTypetreatAs

Method Detail

addToCacheKeyback to summary
public default void addToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session)

Implements org.hibernate.metamodel.mapping.Bindable.addToCacheKey, org.hibernate.type.descriptor.java.JavaTypedExpressible.addToCacheKey.

Doc from org.hibernate.metamodel.mapping.Bindable.addToCacheKey.

Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.

Parameters
cacheKey:MutableCacheKeyBuilder

the MutableCacheKey used to add the disassembled value and the hashCode

value:Object

the value to disassemble

session:SharedSessionContractImplementor

the SharedSessionContractImplementor

Annotations
@Override
disassembleback to summary
public default Object disassemble(Object value, SharedSessionContractImplementor session)

Implements org.hibernate.metamodel.mapping.Bindable.disassemble.

Doc from org.hibernate.metamodel.mapping.Bindable.disassemble.

Breaks down a value of J into its simple pieces. E.g., an embedded value gets broken down into an array of its attribute state; a basic value converts to itself; etc.

Generally speaking, this is the form in which entity state is kept relative to a Session via EntityEntry.

@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 value, so we'd ask the Bindable for the Person entity to disassemble. Given a Person value:

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.

Annotations
@Override
getJdbcMappingback to summary
public default JdbcMapping getJdbcMapping(int index)

Overrides default org.hibernate.metamodel.mapping.SqlExpressible.getJdbcMapping.

Implements org.hibernate.metamodel.mapping.JdbcMappingContainer.getJdbcMapping.

Annotations
@Override
getJdbcMappingback to summary
public JdbcMapping getJdbcMapping()

Redeclares org.hibernate.metamodel.mapping.SqlExpressible.getJdbcMapping.

Doc from org.hibernate.metamodel.mapping.SqlExpressible.getJdbcMapping.

Anything that is expressible at the SQL AST level would be of basic type.

getJdbcTypeCountback to summary
public default int getJdbcTypeCount()

Overrides default org.hibernate.metamodel.mapping.Bindable.getJdbcTypeCount, org.hibernate.metamodel.mapping.JdbcMappingContainer.getJdbcTypeCount.

Doc from org.hibernate.metamodel.mapping.Bindable.getJdbcTypeCount.

The number of JDBC mappings

Annotations
@Override
getSingleJdbcMappingback to summary
public default JdbcMapping getSingleJdbcMapping()

Overrides default org.hibernate.metamodel.mapping.JdbcMappingContainer.getSingleJdbcMapping.

Annotations
@Override