use of com.ctrip.platform.dal.exceptions.DalException in project dal by ctripcorp.
the class KeyHolder method getKeyList.
/**
* Get all the generated keys for multiple insert.
* @return all the generated keys
* @throws DalException
*/
public List<Map<String, Object>> getKeyList() throws DalException {
if (requireMerge && merged.get() == false)
throw new DalException(ErrorCode.KeyGenerationFailOrNotCompleted);
List<Map<String, Object>> keyList = new ArrayList<>();
int size = size();
for (int i = 0; i < size; i++) keyList.add(allKeys.get(i));
return keyList;
}
Aggregations