cacheKey = modelCacheClient.getCacheKey("findAll", findSQL, inputs, limit, offset);
list = (List<ActiveRecord>) modelCacheClient.getCache().get(cacheKey);
if (list != null) return list;
}
TableData td = getSqlService().retrieveRows(inputs,
DataProcessorTypes.DIRECT_SQL_STATEMENT_PROCESSOR, findSQL,
limit, offset);
if (td != null) {
int records = td.getTableSize();
if (records > 0) {
list = new ArrayList<ActiveRecord>();
for (int i = 0; i < records; i++) {
ActiveRecord newRecord = (ActiveRecord) createNewInstance();
newRecord.populateDataFromDatabase(td.getRow(i));
list.add(newRecord);
}
if (modelCacheClient.useCache("findAll")) {
modelCacheClient.getCache().put(cacheKey, list);