|
||||||||||
| 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(java.lang.Class cls,
org.datanucleus.store.mapped.StatementClassMapping classDefinition)
Constructor for a resultClass object factory where we have no result clause specified, so the result will be appropriate for the candidate class. |
|
ResultClassROF(java.lang.Class cls,
org.datanucleus.store.mapped.StatementMappingIndex[] resultMappings,
org.datanucleus.store.mapped.expression.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 cls,
org.datanucleus.store.mapped.StatementResultMapping resultDefinition)
Constructor for a resultClass object factory where we have a result clause specified. |
|
ResultClassROF(java.lang.Class cls,
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(org.datanucleus.ObjectManager om,
java.lang.Object rs)
Method to convert the ResultSet row into an Object of the ResultClass type. |
protected java.lang.Object |
getValueForNewObject(org.datanucleus.store.mapped.StatementNewObjectMapping newMap,
org.datanucleus.ObjectManager om,
java.lang.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(java.lang.Class cls,
org.datanucleus.store.mapped.StatementResultMapping resultDefinition)
cls - The result class to use (if any)resultDefinition - The mapping information for the result expressions
public ResultClassROF(java.lang.Class cls,
org.datanucleus.store.mapped.StatementClassMapping classDefinition)
cls - The result class to useclassDefinition - The mapping information for the (candidate) class
public ResultClassROF(java.lang.Class cls,
org.datanucleus.store.mapped.StatementMappingIndex[] resultMappings,
org.datanucleus.store.mapped.expression.ScalarExpression[] expressions)
cls - The result class to useresultMappings - The mapping information for field positions etcexpressions - The result expressions (if known)
public ResultClassROF(java.lang.Class cls,
java.lang.String[] resultFieldNames)
cls - The result class to useresultFieldNames - Names for the result fields| Method Detail |
|---|
public java.lang.Object getObject(org.datanucleus.ObjectManager om,
java.lang.Object rs)
getObject in interface org.datanucleus.store.query.ResultObjectFactoryom - The ObjectManagerrs - The ResultSet from the Query.
protected java.lang.Object getValueForNewObject(org.datanucleus.store.mapped.StatementNewObjectMapping newMap,
org.datanucleus.ObjectManager om,
java.lang.Object results)
newMap - new object mappingom - ObjectManagerresults - Query results
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||