checkKeysQry.WHERE().pad().appendGroupedOr(params.toArray(new DynamicQuery.Parameter[0]));
Query qry = checkKeysQry.buildJPAQuery(em);
List<?> obj = qry.getResultList();
if (obj != null && obj.size() > 0)
throw new TokenAlreadyExistsException(new ErrorMessage("errors.gettransfertoken.KeyExists", (String)obj.get(0)));
}