Search in sources :

Example 1 with RAccessCertificationCampaign

use of com.evolveum.midpoint.repo.sql.data.common.RAccessCertificationCampaign in project midpoint by Evolveum.

the class CertificationCaseHelper method addCertificationCampaignCases.

public void addCertificationCampaignCases(Session session, RObject object, boolean deleteBeforeAdd) {
    if (!(object instanceof RAccessCertificationCampaign)) {
        return;
    }
    RAccessCertificationCampaign campaign = (RAccessCertificationCampaign) object;
    if (deleteBeforeAdd) {
        LOGGER.trace("Deleting existing cases for {}", campaign.getOid());
        deleteCertificationCampaignCases(session, campaign.getOid());
    }
    if (campaign.getCase() != null) {
        for (RAccessCertificationCase aCase : campaign.getCase()) {
            session.save(aCase);
        }
    }
}
Also used : RAccessCertificationCase(com.evolveum.midpoint.repo.sql.data.common.container.RAccessCertificationCase) RAccessCertificationCampaign(com.evolveum.midpoint.repo.sql.data.common.RAccessCertificationCampaign)

Aggregations

RAccessCertificationCampaign (com.evolveum.midpoint.repo.sql.data.common.RAccessCertificationCampaign)1 RAccessCertificationCase (com.evolveum.midpoint.repo.sql.data.common.container.RAccessCertificationCase)1