com.j256.ormlite.stmt.mapped
Class BaseMappedQuery<T,ID>
java.lang.Object
com.j256.ormlite.stmt.mapped.BaseMappedStatement<T,ID>
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
resultsFieldTypes
protected final FieldType[] resultsFieldTypes
BaseMappedQuery
protected BaseMappedQuery(TableInfo<T,ID> tableInfo,
String statement,
FieldType[] argFieldTypes,
FieldType[] resultsFieldTypes)
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 content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.