List<WarrantUserUniqueId> list = q.list();
result = list;
WarrantUserUniqueId warrantUserUniqueId = null;
if (list.isEmpty()) {
FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UNIQUEID,
finderArgs, list);
}
else {
warrantUserUniqueId = list.get(0);
cacheResult(warrantUserUniqueId);
if ((warrantUserUniqueId.getUniqueId() == null) ||
!warrantUserUniqueId.getUniqueId().equals(uniqueId)) {
FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UNIQUEID,
finderArgs, warrantUserUniqueId);
}
}