|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hydrateframework.Assembler.TestKey
public static class Assembler.TestKey
A Discriminator
implementation for class hierarchies. This
class is intended for use with queries that may populate any one of a
number of different classes from a class hierarchy KeyName is the name
of the key field in the table containing the most derived data for the
object that this assembler is constructing. This field will be non-null
if this query row is an object of that class.
Constructor Summary | |
---|---|
Assembler.TestKey(java.lang.String keyName)
Construct a TestKey object that will determine whether an
object should be built based on whether the column with name
keyName is null (do not build) or non-null (do build)
in the query results row |
|
Assembler.TestKey(java.lang.String[] keyNames)
|
Method Summary | |
---|---|
boolean |
prepareToProcessResults(java.sql.ResultSet rs,
java.util.Map columns)
This call gives the object an opportunity to find the column indexes of any fields of interest to the calculation |
boolean |
shouldBuild(Assembler bld)
Determine if the object should be built based on information from the current row of the query. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Assembler.TestKey(java.lang.String keyName)
TestKey
object that will determine whether an
object should be built based on whether the column with name
keyName
is null (do not build) or non-null (do build)
in the query results row
keyName
- the name of the key columnpublic Assembler.TestKey(java.lang.String[] keyNames)
Method Detail |
---|
public boolean prepareToProcessResults(java.sql.ResultSet rs, java.util.Map columns)
Assembler.Discriminator
prepareToProcessResults
in interface Assembler.Discriminator
rs
- The ResultSet
object holding the data from
which objects are about to be builtcolumns
- a mapping between the names of columns found in the
query and the names of attributes that this assembler's object is
expecting.
public boolean shouldBuild(Assembler bld)
Assembler.Discriminator
shouldBuild
in interface Assembler.Discriminator
bld
- the assembler that is about to try to build an object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |