if (properties == null || ! properties.containsKey(QueryHints.REFRESH)) {
query.refreshIdentityMapResult();
}
if (properties == null || ! properties.containsKey(QueryHints.REFRESH_CASCADE)) {
query.cascadePrivateParts();
}
executeQuery(query, lockMode, getActivePersistenceContext(checkForTransaction(false)));
} else {
RepeatableWriteUnitOfWork context = getActivePersistenceContext(checkForTransaction(false));