//
// UNIQUE RESULT KEY
//
private CacheKey createRowKey(ResultMap resultMap, ResultSet rs) throws SQLException {
final CacheKey cacheKey = new CacheKey();
List<ResultMapping> resultMappings = getResultMappingsForRowKey(resultMap);
cacheKey.update(resultMap.getId());
if (resultMappings.size() == 0) {
if (Map.class.isAssignableFrom(resultMap.getType())) {
createRowKeyForMap(rs, cacheKey);
} else {
createRowKeyForUnmappedProperties(resultMap, rs, cacheKey);
}
} else {
createRowKeyForMappedProperties(rs, cacheKey, resultMappings);
}
if (cacheKey.getUpdateCount() < 2) {
return CacheKey.NULL_CACHE_KEY;
}
return cacheKey;
}