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;
}
Aggregations