K - key class type for row objectsR - Class associated with a row in tablepublic class LinkedHashMapSelectOperation<K,R> extends MapSelectOperation<K,R>
MapSelectOperation that uses LinkedHashMap for SelectOperation.readAll() results.
A LinkedHashMap allows you to order with ScalarSelectOperation.setOrderBy(String) so
that the order is preserved in the resulting map and yet allow direct look up by primary key.| Constructor and Description |
|---|
LinkedHashMapSelectOperation(Table<R> table)
Constructs for a table.
|
LinkedHashMapSelectOperation(Table<R> table,
java.lang.String whereConditionName)
Constructs for a table and where condition.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<K,R> |
createReadAllCollection()
Creates an
LinkedHashMap to contain selected rows. |
add, getGetKeyMethod, getGetKeyMethodName, getKey, prepare, setGetKeyMethod, setGetKeyMethodNamegetDefaultReadAllSize, getSelectedRows, readAll, selectAll, selectAll, setDefaultReadAllSizeclose, execute, getMaximumRowsRead, getOrderByName, getOrderByTranslator, getResultSet, getRowsReadCount, getSql, initBaseSql, isLazySelectsCascades, isNotifyLazySelects, postRead, postReadCascade, prepareCascades, preRead, preReadCascade, readNext, select, select, setMaximumRowsRead, setOrderBy, setOrderByTranslator, setParameters, setRowParameterscancel, cascade, closeCascades, closeStatement, createTargetField, getBaseSql, getConnection, getCustomSql, getNextParameter, getOperationTime, getParameters, getPreparedSql, getPreparedStatement, getQueryTimeout, getTable, getTargetTable, getTimingId, getWhereConditionName, getWhereTranslator, initOperationTime, isAutoGeneratedKeys, isIncludeIdentityColumns, isReadOnly, isTimings, logTimings, prepareCascades, prepareCheck, setAutoGeneratedKeys, setBaseSql, setCustomSql, setIncludeIdentityColumns, setNextParameter, setQueryTimeout, setReadOnly, setTimingId, setTimings, setWhere, setWhereTranslator, writeColumns, writeParameter, writeParameters, writeWherepublic LinkedHashMapSelectOperation(Table<R> table) throws OperationException
table - select from this tableOperationException - if errorpublic LinkedHashMapSelectOperation(Table<R> table, java.lang.String whereConditionName) throws OperationException
table - select from this tablewhereConditionName - name of where condition to use ("primaryKey" to select
by primary key; empty string to select all rows in table)OperationException - if errorprotected java.util.Map<K,R> createReadAllCollection()
LinkedHashMap to contain selected rows.createReadAllCollection in class SelectOperation<R,java.util.Map<K,R>>LinkedHashMap