com.j256.ormlite.stmt.mapped
Class BaseMappedQuery<T,ID>

java.lang.Object
  extended by com.j256.ormlite.stmt.mapped.BaseMappedStatement<T,ID>
      extended by com.j256.ormlite.stmt.mapped.BaseMappedQuery<T,ID>
All Implemented Interfaces:
GenericRowMapper<T>
Direct Known Subclasses:
MappedPreparedStmt, MappedQueryForId

public abstract class BaseMappedQuery<T,ID>
extends BaseMappedStatement<T,ID>
implements GenericRowMapper<T>

Abstract mapped statement for queries which handle the creating of a new object and the row mapping functionality.

Author:
graywatson

Field Summary
protected  FieldType[] resultsFieldTypes
           
 
Fields inherited from class com.j256.ormlite.stmt.mapped.BaseMappedStatement
argFieldTypes, clazz, idField, logger, statement, tableInfo
 
Constructor Summary
protected BaseMappedQuery(TableInfo<T,ID> tableInfo, String statement, FieldType[] argFieldTypes, FieldType[] resultsFieldTypes)
           
 
Method Summary
 T mapRow(DatabaseResults results)
          Used to convert a results row to an object.
 void setParentInformation(Object parent, Object parentId)
          If we have a foreign collection object then this sets the value on the foreign object in the class.
 
Methods inherited from class com.j256.ormlite.stmt.mapped.BaseMappedStatement
convertIdToFieldObject, getFieldObjects, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resultsFieldTypes

protected final FieldType[] resultsFieldTypes
Constructor Detail

BaseMappedQuery

protected BaseMappedQuery(TableInfo<T,ID> tableInfo,
                          String statement,
                          FieldType[] argFieldTypes,
                          FieldType[] resultsFieldTypes)
Method Detail

mapRow

public T mapRow(DatabaseResults results)
         throws SQLException
Description copied from interface: GenericRowMapper
Used to convert a results row to an object.

Specified by:
mapRow in interface GenericRowMapper<T>
Parameters:
results - Results object we are mapping.
Returns:
The created object with all of the fields set from the results;
Throws:
SQLException - If we could not get the SQL results or instantiate the object.

setParentInformation

public void setParentInformation(Object parent,
                                 Object parentId)
If we have a foreign collection object then this sets the value on the foreign object in the class.



This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.