K
- R
- public abstract class GeneralMapMapper<K,R> extends SQLGroupMapper<java.util.Map<K,R>> implements Contexed
qualify, use_alias
conn
Constructor and Description |
---|
GeneralMapMapper(AppContext c) |
Modifier and Type | Method and Description |
---|---|
protected R |
combine(R a,
R b)
If more than one database value maps to the same key we may have to
combine multiple results.
|
java.util.Map<K,R> |
makeDefault()
Create a default Object to be returned if no SQL results are generated.
|
protected abstract K |
makeKey(java.sql.ResultSet rs)
Make the key object from the ResultSet
|
java.util.Map<K,R> |
makeObject(java.sql.ResultSet rs)
Convert a ResultSet into a domain object.
|
protected abstract R |
makeResult(java.sql.ResultSet rs)
make the result object from the ResultSet
|
addAverage, addClause, addCount, addCount, addKey, addKeyList, addMaxDate, addMaxNumber, addMinDate, addMinNumber, addSQLAverage, addSQLCount, addSum, getModify, getModifyParameters, getRequiredFilter, getTarget, getTargetObject, getTargetParameters, setQualify, setUseAlias
getContext, getLogger, resetLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContext
public GeneralMapMapper(AppContext c)
public java.util.Map<K,R> makeDefault()
ResultMapper
makeDefault
in interface ResultMapper<java.util.Map<K,R>>
public java.util.Map<K,R> makeObject(java.sql.ResultSet rs) throws DataException, java.sql.SQLException
ResultMapper
makeObject
in interface ResultMapper<java.util.Map<K,R>>
rs
- ResultSet or nullDataException
java.sql.SQLException
protected R combine(R a, R b) throws CombineException
CombineException
if the first parameter is non-null.a
- previous valueb
- new valueCombineException
protected abstract K makeKey(java.sql.ResultSet rs) throws DataException, java.sql.SQLException
rs
- DataFault
DataException
java.sql.SQLException
protected abstract R makeResult(java.sql.ResultSet rs) throws DataException, java.sql.SQLException
rs
- DataFault
DataException
java.sql.SQLException