public static AgeDto createAgeDTO(String AgeId, String AgeDescription) { AgeDto age = new AgeDto(); age.AgeId = AgeId; age.AgeDescription = AgeDescription; return age; }
public static AgeDto createAgeDTO(Age obj) { AgeDto age = new AgeDto(); age.AgeId = obj.AgeId; age.AgeDescription = obj.AgeDescription; return age; }
public Boolean insertAge(AgeDto dto) { Age obj = Age.createAge(dto.AgeId, dto.AgeDescription); AgeManager mgr = new AgeManager(); return mgr.insertAge(obj); }
public AgeDto selectAgeById(AgeDto dto) { AgeManager mgr = new AgeManager(); Age obj = new Age(); obj.AgeId = dto.AgeId; obj = mgr.selectAgeById(obj); if (obj != null) { return AgeDto.createAgeDTO(obj); } else { return null; } }