|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.query.ResultClassROF
public class 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 org.datanucleus.util.Localiser |
LOCALISER
|
| Constructor Summary | |
|---|---|
ResultClassROF(RDBMSStoreManager storeMgr,
Class cls,
org.datanucleus.store.mapped.StatementClassMapping classDefinition)
Constructor for a resultClass object factory where we have no result clause specified but a result class. |
|
ResultClassROF(RDBMSStoreManager storeMgr,
Class cls,
StatementResultMapping resultDefinition)
Constructor for a resultClass object factory where we have a result clause specified. |
|
ResultClassROF(RDBMSStoreManager storeMgr,
Class cls,
String[] resultFieldNames)
Constructor for cases where we have no candidate class and so have no mapping information to base field positions on. |
|
| Method Summary | |
|---|---|
Object |
getObject(org.datanucleus.store.ExecutionContext ec,
Object rs)
Method to convert the ResultSet row into an Object of the ResultClass type. |
protected Object |
getValueForNewObject(StatementNewObjectMapping newMap,
org.datanucleus.store.ExecutionContext ec,
Object results)
Convenience method to return the value of a NewObject mapping for the current row of the provided query results. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.datanucleus.util.Localiser LOCALISER
| Constructor Detail |
|---|
public ResultClassROF(RDBMSStoreManager storeMgr,
Class cls,
StatementResultMapping resultDefinition)
storeMgr - RDBMS StoreManagercls - The result class to use (if any)resultDefinition - The mapping information for the result expressions
public ResultClassROF(RDBMSStoreManager storeMgr,
Class cls,
org.datanucleus.store.mapped.StatementClassMapping classDefinition)
storeMgr - RDBMS StoreManagercls - The result class to useclassDefinition - The mapping information for the (candidate) class
public ResultClassROF(RDBMSStoreManager storeMgr,
Class cls,
String[] resultFieldNames)
storeMgr - RDBMS StoreManagercls - The result class to useresultFieldNames - Names for the result fields| Method Detail |
|---|
public Object getObject(org.datanucleus.store.ExecutionContext ec,
Object rs)
getObject in interface org.datanucleus.store.query.ResultObjectFactoryec - execution contextrs - The ResultSet from the Query.
protected Object getValueForNewObject(StatementNewObjectMapping newMap,
org.datanucleus.store.ExecutionContext ec,
Object results)
newMap - new object mappingec - ObjectManagerresults - Query results
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||