|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface KeyAssembler
The KeyAssembler interface is implemented by classes that know how to build the
elements of a key from a results set. It is similar, but simpler than a
Assembler interface and is implemented by an inner class, RefBld
of each of the generated key classes.
| Method Summary | |
|---|---|
ObjectKey |
getKey()
Make the key that this assembler has been created to build. |
java.lang.Class |
getKeyClass()
Returns the Class object that represents the class of key that this assembler will build. |
boolean |
isAllocatedByDb()
Indicate whether this key was allocated by the database. |
ObjectKey |
makeKeyFromInt(int defPrimary)
Makes a key from a single integer. |
ObjectKey |
makeKeyFromValues(java.lang.Object[] keys)
Makes the key from the given array of objects. |
void |
prepareToProcessResults(java.sql.ResultSet rs,
Assembler bld)
This method is called after a statement has been executed, but before iterating through the results set. |
boolean |
readState(java.sql.ResultSet rs)
The implementation of this method reads the data values from the current row of the results set to make a key. |
void |
writeState(java.sql.ResultSet rs,
java.lang.Object x)
This method updates the fields associated with this key in the given results set. |
| Method Detail |
|---|
void prepareToProcessResults(java.sql.ResultSet rs,
Assembler bld)
rs - the results set that has just been returned.bld - the assembler that will build the object which this key will
reference. The column map is taken from that assembler.
boolean readState(java.sql.ResultSet rs)
throws java.sql.SQLException
rs - the results set which must match the value given in the initial
call to prepareToProcessResults(java.sql.ResultSet, org.hydrateframework.Assembler).
java.sql.SQLException
void writeState(java.sql.ResultSet rs,
java.lang.Object x)
throws java.sql.SQLException
rs - the results set to update which must match the value given in the
initial call to prepareToProcessResults(java.sql.ResultSet, org.hydrateframework.Assembler).
java.sql.SQLExceptionObjectKey getKey()
boolean isAllocatedByDb()
java.lang.Class getKeyClass()
ObjectKey makeKeyFromValues(java.lang.Object[] keys)
ObjectKey makeKeyFromInt(int defPrimary)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||