use of org.apache.syncope.core.persistence.api.entity.DerSchema in project syncope by apache.
the class JPADerSchemaDAO method findByAnyTypeClasses.
@Override
public List<DerSchema> findByAnyTypeClasses(final Collection<AnyTypeClass> anyTypeClasses) {
StringBuilder queryString = new StringBuilder("SELECT e FROM ").append(JPADerSchema.class.getSimpleName()).append(" e WHERE ");
for (AnyTypeClass anyTypeClass : anyTypeClasses) {
queryString.append("e.anyTypeClass.id='").append(anyTypeClass.getKey()).append("' OR ");
}
TypedQuery<DerSchema> query = entityManager().createQuery(queryString.substring(0, queryString.length() - 4), DerSchema.class);
return query.getResultList();
}
use of org.apache.syncope.core.persistence.api.entity.DerSchema in project syncope by apache.
the class DerSchemaTest method delete.
@Test
public void delete() {
DerSchema cn = derSchemaDAO.find("cn");
assertNotNull(cn);
derSchemaDAO.delete(cn.getKey());
DerSchema actual = derSchemaDAO.find("cn");
assertNull(actual);
// ------------- //
DerSchema rderiveddata = derSchemaDAO.find("rderiveddata");
assertNotNull(rderiveddata);
derSchemaDAO.delete(rderiveddata.getKey());
actual = derSchemaDAO.find("rderiveddata");
assertNull(actual);
}
Aggregations