|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.store.query.ResultClassROF
Take a ResultSet, and for each row retrieves an object of a specified type. Follows the rules in JDO2 spec [14.6.12] regarding the result class.
The resultClass will be used to create objects of that type when calling getObject(). The resultClass can be one of the following
Objects of this class are created in 2 distinct situations. The first is where a candidate class is available, and consequently field position mappings are available. The second is where no candidate class is available and so only the field names are available, and the results are taken in ResultSet order. These 2 modes have their own constructor.
Field Summary | |
protected static Localiser |
LOCALISER
|
Constructor Summary | |
ResultClassROF(java.lang.Class resultClass,
StatementExpressionIndex[] statementExpressionIndex)
Constructor for cases where we have a candidate class and so have mapping information to base field positions on. |
|
ResultClassROF(java.lang.Class resultClass,
StatementExpressionIndex[] statementExpressionIndex,
ScalarExpression[] expressions)
Constructor for cases where we have a candidate class and so have mapping information to base field positions on. |
|
ResultClassROF(java.lang.Class resultClass,
java.lang.String[] resultFieldNames)
Constructor for cases where we have no candidate class and so have no mapping information to base field positions on. |
Method Summary | |
java.lang.Object |
getObject(PersistenceManager pm,
java.sql.ResultSet rs,
java.lang.Class pcClass)
Method to convert the ResultSet row into an Object of the ResultClass type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final Localiser LOCALISER
Constructor Detail |
public ResultClassROF(java.lang.Class resultClass, StatementExpressionIndex[] statementExpressionIndex)
resultClass
- The result class to usestatementExpressionIndex
- The mapping information for field positions etcpublic ResultClassROF(java.lang.Class resultClass, StatementExpressionIndex[] statementExpressionIndex, ScalarExpression[] expressions)
resultClass
- The result class to usestatementExpressionIndex
- The mapping information for field positions etcexpressions
- The result expressions (if known)public ResultClassROF(java.lang.Class resultClass, java.lang.String[] resultFieldNames)
resultClass
- The result class to useresultFieldNames
- Names for the result fieldsMethod Detail |
public java.lang.Object getObject(PersistenceManager pm, java.sql.ResultSet rs, java.lang.Class pcClass)
getObject
in interface Query.ResultObjectFactory
pm
- The PersistenceManagerrs
- The ResultSet from the Query.pcClass
- Not used.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |