fix some javadoc
This commit is contained in:
parent
c36fdc4d06
commit
aa9bb26498
|
@ -52,43 +52,45 @@ public interface Bindable extends JdbcMappingContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @asciidoc Breaks down a value of `J` into its simple pieces. E.g., an embedded
|
* Breaks down a value of {@code J} into its simple pieces. E.g., an embedded
|
||||||
* value gets broken down into an array of its attribute state; a basic
|
* value gets broken down into an array of its attribute state; a basic
|
||||||
* value converts to itself; etc.
|
* value converts to itself; etc.
|
||||||
* <p>
|
* <p>
|
||||||
* Generally speaking, this is the form in which entity state is kept relative to a
|
* Generally speaking, this is the form in which entity state is kept relative to a
|
||||||
* Session via `EntityEntry`.
|
* Session via {@code EntityEntry}.
|
||||||
* @Entity class Person {
|
* <p>
|
||||||
* @Id Integer id;
|
* <pre>
|
||||||
* @Embedded Name name;
|
* @Entity class Person {
|
||||||
|
* @Id Integer id;
|
||||||
|
* @Embedded Name name;
|
||||||
* int age;
|
* int age;
|
||||||
* }
|
* }
|
||||||
* @Embeddable class Name {
|
*
|
||||||
|
* @Embeddable class Name {
|
||||||
* String familiarName;
|
* String familiarName;
|
||||||
* String familyName;
|
* String familyName;
|
||||||
* }
|
* }
|
||||||
* ````
|
* </pre>
|
||||||
* <p>
|
* <p>
|
||||||
* At the top-level, we would want to disassemble a `Person` value so we'd ask the
|
* At the top level, we would want to disassemble a {@code Person} value, so we'd
|
||||||
* `Bindable` for the `Person` entity to disassemble. Given a Person value:
|
* ask the {@code Bindable} for the {@code Person} entity to disassemble. Given a
|
||||||
|
* {@code Person} value:
|
||||||
* <p>
|
* <p>
|
||||||
* ````
|
* <pre>
|
||||||
* Person( id=1, name=Name( 'Steve', 'Ebersole' ), 28 )
|
* Person( id=1, name=Name( 'Steve', 'Ebersole' ), 28 )
|
||||||
* ````
|
* </pre>
|
||||||
* <p>
|
* <p>
|
||||||
* this disassemble would result in a multi-dimensional array:
|
* this disassemble would result in a multidimensional array:
|
||||||
* <p>
|
* <p>
|
||||||
* ````
|
* <pre>
|
||||||
* [ ["Steve", "Ebersole"], 28 ]
|
* [ ["Steve", "Ebersole"], 28 ]
|
||||||
* ````
|
* </pre>
|
||||||
* <p>
|
* <p>
|
||||||
* Note that the identifier is not part of this disassembled state. Note also
|
* Note that the identifier is not part of this disassembled state. Note also
|
||||||
* how the embedded value results in a sub-array.
|
* how the embedded value results in a sub-array.
|
||||||
|
*
|
||||||
* @see org.hibernate.engine.spi.EntityEntry
|
* @see org.hibernate.engine.spi.EntityEntry
|
||||||
* <p>
|
* <p>
|
||||||
* As an example, consider the following domain model:
|
|
||||||
* <p>
|
|
||||||
* ````
|
|
||||||
*/
|
*/
|
||||||
Object disassemble(Object value, SharedSessionContractImplementor session);
|
Object disassemble(Object value, SharedSessionContractImplementor session);
|
||||||
|
|
||||||
|
@ -103,20 +105,18 @@ public interface Bindable extends JdbcMappingContainer {
|
||||||
void addToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session);
|
void addToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @asciidoc
|
|
||||||
*
|
|
||||||
* Visit each constituent JDBC value over the result from {@link #disassemble}.
|
* Visit each constituent JDBC value over the result from {@link #disassemble}.
|
||||||
*
|
* <p>
|
||||||
* Given the example in {@link #disassemble}, this results in the consumer being
|
* Given the example in {@link #disassemble}, this results in the consumer being
|
||||||
* called for each simple value. E.g.:
|
* called for each simple value. E.g.:
|
||||||
*
|
* <p>
|
||||||
* ````
|
* <pre>
|
||||||
* consumer.consume( "Steve" );
|
* consumer.consume( "Steve" );
|
||||||
* consumer.consume( "Ebersole" );
|
* consumer.consume( "Ebersole" );
|
||||||
* consumer.consume( 28 );
|
* consumer.consume( 28 );
|
||||||
* ````
|
* </pre>
|
||||||
*
|
* <p>
|
||||||
* Think of it as breaking the multi-dimensional array into a visitable flat array.
|
* Think of it as breaking the multidimensional array into a visitable flat array.
|
||||||
* Additionally, it passes through the values {@code X} and {@code Y} to the consumer.
|
* Additionally, it passes through the values {@code X} and {@code Y} to the consumer.
|
||||||
*/
|
*/
|
||||||
default <X, Y> int forEachDisassembledJdbcValue(
|
default <X, Y> int forEachDisassembledJdbcValue(
|
||||||
|
|
Loading…
Reference in New Issue