if (o instanceof Object[]) {
Object[] oo = (Object[]) o;
if (oo.length == 2 && oo[0] instanceof Uzer && oo[1] instanceof Profile) {
Uzer uzer = (Uzer) oo[0];
Profile profile = (Profile) oo[1];
result.add(new UzerProfile(uzer, profile));
}
}
}
} catch (Exception ex) {
throw new CustomException(ex);
}
try {
javax.persistence.Query q2 = entityManager.createQuery("SELECT p FROM " + IModel.DATABASE_PRE + "Profile p "
+ "where p.id not in(select u.profile.id as id from " + IModel.DATABASE_PRE + "Uzer u)");
for (Object o : q2.getResultList()) {
if (o instanceof Profile) {
Profile profile = (Profile) o;
result.add(new UzerProfile(null, profile));
}
}
} catch (Exception ex) {
throw new CustomException(ex);
}