private String[] validateUIRules(SportsActivityVoCollection voSportColl) { if(voSportColl.equals(null)) return null; for(SportsActivityVo voSportsAct: voSportColl) { if(voSportsAct.getSelect() == null && voSportsAct.getComments() != null && !voSportsAct.getComments().equals("")) return new String[]{"Select is mandatory if Comments field is populated"}; } return null; }
public SportsActivityVo saveSportActivities(SportsActivityVo recordRef) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException { if (recordRef == null || recordRef.getID_SportsActivity() == null) throw new CodingRuntimeException("This SportsActivityVo is null"); DomainFactory factory = getDomainFactory(); SportsActivity domSportsActivity = SportsActivityVoAssembler.extractSportsActivity(factory, recordRef); domSportsActivity.setIsRIE(recordRef.getIsRIE()); factory.save(domSportsActivity); return SportsActivityVoAssembler.create(domSportsActivity); }