public void fromDto(CourseWaitListEntry entry) { super.fromDTO(entry); this.setEffectiveDate(entry.getEffectiveDate()); this.setExpirationDate(entry.getExpirationDate()); this.setAttributes(new HashSet<CourseWaitListEntryAttributeEntity>()); for (Attribute att : entry.getAttributes()) { CourseWaitListEntryAttributeEntity attEntity = new CourseWaitListEntryAttributeEntity(att, this); this.getAttributes().add(attEntity); } this.setLastCheckIn(entry.getLastCheckIn()); this.setOrder(entry.getOrder()); this.setRegistrationRequestItemId(entry.getRegistrationRequestItemId()); this.setStudentId(entry.getStudentId()); // // Note: CourseWaitListEntity can't be set from CourseWaitListEntryEntity which only contains // the // id (which is a string) for courseWaitListEntity. When constructing an // CourseWaitListEntryEntity // in CourseWaitListServiceImpl, one needs to use the CourseWaitListDao to "find" (call the find // method) to get the courseWaitListEntity and call courseWaitListEntity to set the value // separately }
public CourseWaitListEntryEntity(CourseWaitListEntry entry) { super(entry); this.setId(entry.getId()); this.setType(entry.getTypeKey()); this.fromDto(entry); }