public EmpDiscipline addEmpDiscipline( long empId, String decisionNo, String content, String type, Date effectiveDate, String additionalType, String description, ServiceContext serviceContext) { EmpDiscipline obj = createPrePersistedEntity(serviceContext); obj.setEmpId(empId); obj.setDecisionNo(decisionNo); obj.setContent(content); obj.setDisciplineType(type); obj.setEffectiveDate(effectiveDate); obj.setAdditionalDisciplineType(additionalType); obj.setDescription(description); return this.addEmpDiscipline(obj, serviceContext); }
public EmpDiscipline updateEmpDiscipline( long id, String decisionNo, String type, String content, Date effectiveDate, String additionType, String desc) { try { final EmpDiscipline obj = super.fetchEmpDiscipline(id); obj.setDecisionNo(decisionNo); obj.setDisciplineType(type); obj.setContent(content); obj.setEffectiveDate(effectiveDate); obj.setAdditionalDisciplineType(additionType); obj.setDescription(desc); return this.updateEmpDiscipline(obj); } catch (SystemException e) { LOGGER.info(e); } return null; }