|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hydrateframework.Assembler.TestCol
public static class Assembler.TestCol
A Discriminator
implementation that decides whether or not to
build an object based on whether a particular column has a particular value.
Constructor Summary | |
---|---|
Assembler.TestCol(java.lang.String fldName,
java.lang.Object value)
Construct a TestCol object that will only allow an object to be built if the column named |
|
Assembler.TestCol(java.lang.String context,
java.lang.String objectName)
Construct a TestCol object that will only allow an object to be built if the column named |
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.TestCol(java.lang.String context, java.lang.String objectName)
TestCol
object that will only allow an object to be built if the column named
context
- a string that was supplied on the map line of the object map. This is
expected to be of the form 'column=Value' e.g. type='M', index=1, test=true, etc.objectName
- the name of the object that we wish to build. This is ignoredpublic Assembler.TestCol(java.lang.String fldName, java.lang.Object value)
TestCol
object that will only allow an object to be built if the column named
fldName
- the name of the column to testvalue
- the value to test for.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 |