|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface Assembler.Discriminator
This interface is used to determine whether an object should be built or
not. In general, an assembler will build an instance of its object from a
query provided the primary key of the object is available in the query.
There are instances however, where the assembler should only build the
object depending on an arbitrary ResultSet
dependent
expression. This requirement is met by allowing the user of the assembler
to supply an arbitrary expression via the Discriminator
interface when calling prepareToProcessResults(java.sql.ResultSet, java.util.Map)
on the assembler.
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. |
Method Detail |
---|
boolean prepareToProcessResults(java.sql.ResultSet rs, java.util.Map columns)
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.
boolean shouldBuild(Assembler bld)
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 |