use of org.apereo.portal.groups.pags.dao.IPersonAttributesGroupTestGroupDefinition in project uPortal by Jasig.
the class JpaPersonAttributesGroupTestGroupDefinitionDao method deletePersonAttributesGroupTestGroupDefinition.
@PortalTransactional
@Override
public void deletePersonAttributesGroupTestGroupDefinition(IPersonAttributesGroupTestGroupDefinition definition) {
Validate.notNull(definition, "definition can not be null");
final IPersonAttributesGroupTestGroupDefinition persistentDefinition;
final EntityManager entityManager = this.getEntityManager();
if (entityManager.contains(definition)) {
persistentDefinition = definition;
} else {
persistentDefinition = entityManager.merge(definition);
}
entityManager.remove(persistentDefinition);
}
use of org.apereo.portal.groups.pags.dao.IPersonAttributesGroupTestGroupDefinition in project uPortal by Jasig.
the class JpaPersonAttributesGroupTestGroupDefinitionDao method updatePersonAttributesGroupTestGroupDefinition.
@PortalTransactional
@Override
public IPersonAttributesGroupTestGroupDefinition updatePersonAttributesGroupTestGroupDefinition(IPersonAttributesGroupTestGroupDefinition personAttributesGroupTestGroupDefinition) {
Validate.notNull(personAttributesGroupTestGroupDefinition, "personAttributesGroupTestGroupDefinition can not be null");
final IPersonAttributesGroupTestGroupDefinition persistentDefinition;
final EntityManager entityManager = this.getEntityManager();
if (entityManager.contains(personAttributesGroupTestGroupDefinition)) {
persistentDefinition = personAttributesGroupTestGroupDefinition;
} else {
persistentDefinition = entityManager.merge(personAttributesGroupTestGroupDefinition);
}
this.getEntityManager().persist(persistentDefinition);
return persistentDefinition;
}
Aggregations