Search in sources :

Example 1 with IAgreementType

use of org.estatio.module.agreement.dom.type.IAgreementType in project estatio by estatio.

the class AgreementRoleCommunicationChannelTypeRepository method findOrCreate.

public AgreementRoleCommunicationChannelType findOrCreate(final IAgreementRoleCommunicationChannelType data, final IAgreementType IAgreementType) {
    final String title = data.getTitle();
    final AgreementType agreementType = agreementTypeRepository.findOrCreate(IAgreementType);
    AgreementRoleCommunicationChannelType arcct = findByAgreementTypeAndTitle(agreementType, title);
    if (arcct == null) {
        arcct = getContainer().newTransientInstance(AgreementRoleCommunicationChannelType.class);
        arcct.setTitle(title);
        arcct.setAppliesTo(agreementType);
        getContainer().persist(arcct);
    }
    return arcct;
}
Also used : AgreementType(org.estatio.module.agreement.dom.type.AgreementType) IAgreementType(org.estatio.module.agreement.dom.type.IAgreementType) IAgreementRoleCommunicationChannelType(org.estatio.module.agreement.dom.commchantype.IAgreementRoleCommunicationChannelType)

Aggregations

IAgreementRoleCommunicationChannelType (org.estatio.module.agreement.dom.commchantype.IAgreementRoleCommunicationChannelType)1 AgreementType (org.estatio.module.agreement.dom.type.AgreementType)1 IAgreementType (org.estatio.module.agreement.dom.type.IAgreementType)1