Coverage Report - org.kuali.student.r2.core.class1.scheduling.model.ScheduleRequestComponentEntity
 
Classes in this File Line Coverage Branch Coverage Complexity
ScheduleRequestComponentEntity
0%
0/43
N/A
1
 
 1  
 package org.kuali.student.r2.core.class1.scheduling.model;
 2  
 
 3  
 import org.kuali.student.r2.core.scheduling.dto.ScheduleRequestComponentInfo;
 4  
 import org.kuali.student.r2.core.scheduling.infc.ScheduleRequestComponent;
 5  
 
 6  
 import javax.persistence.Column;
 7  
 import javax.persistence.Entity;
 8  
 import javax.persistence.Table;
 9  
 import java.util.List;
 10  
 
 11  
 /**
 12  
  * @Version 2.0
 13  
  * @Author Sri komandur@uw.edu
 14  
  */
 15  
 @Entity
 16  
 @Table(name = "KSEN_SCHED_RQST_CMP")
 17  
 public class ScheduleRequestComponentEntity {
 18  
 
 19  
     @Column(name = "SCHED_RQST_ID")
 20  
     private String id;
 21  
 
 22  
     // TODO: Left as @Column per Sambit, TBD: Change the following to join relations
 23  
     @Column
 24  
     private List<String> buildingIds;
 25  
 
 26  
     @Column
 27  
     private List<String> campusIds;
 28  
 
 29  
     @Column
 30  
     private List<String> orgIds;
 31  
 
 32  
     @Column
 33  
     private List<String> resourceTypeKeys;
 34  
 
 35  
     @Column
 36  
     private List<String> roomIds;
 37  
 
 38  
     @Column
 39  
     private List<String> timeSlotIds;
 40  
 
 41  0
     public ScheduleRequestComponentEntity() {
 42  0
     }
 43  
 
 44  0
     public ScheduleRequestComponentEntity(ScheduleRequestComponent scheduleRequestComponent) {
 45  0
         this.setId(scheduleRequestComponent.getId());
 46  0
         this.fromDto(scheduleRequestComponent);
 47  0
     }
 48  
 
 49  
     public void fromDto(ScheduleRequestComponent scheduleRequestComponent) {
 50  
         // TODO: All the following need to change to using entities, leaving as ids per @Sambit
 51  0
         this.setBuildingIds(scheduleRequestComponent.getBuildingIds());
 52  0
         this.setCampusIds(scheduleRequestComponent.getCampusIds());
 53  0
         this.setOrgIds(scheduleRequestComponent.getOrgIds());
 54  0
         this.setResourceTypeKeys(scheduleRequestComponent.getResourceTypeKeys());
 55  0
         this.setRoomIds(scheduleRequestComponent.getRoomIds());
 56  0
         this.setTimeSlotIds(scheduleRequestComponent.getTimeSlotIds());
 57  0
     }
 58  
 
 59  
     public ScheduleRequestComponentInfo toDto() {
 60  0
         ScheduleRequestComponentInfo scheduleRequestComponentInfo  = new ScheduleRequestComponentInfo();
 61  0
         scheduleRequestComponentInfo.setId(this.getId());
 62  
         // TODO: All the following need to change to using entities, leaving as ids per @Sambit
 63  0
         scheduleRequestComponentInfo.setBuildingIds(this.getBuildingIds());
 64  0
         scheduleRequestComponentInfo.setCampusIds(this.getCampusIds());
 65  0
         scheduleRequestComponentInfo.setOrgIds(this.getOrgIds());
 66  0
         scheduleRequestComponentInfo.setResourceTypeKeys(this.getResourceTypeKeys());
 67  0
         scheduleRequestComponentInfo.setRoomIds(this.getRoomIds());
 68  0
         scheduleRequestComponentInfo.setTimeSlotIds(this.getTimeSlotIds());
 69  
 
 70  0
         return scheduleRequestComponentInfo;
 71  
     }
 72  
 
 73  
     public String getId() {
 74  0
         return id;
 75  
     }
 76  
 
 77  
     public void setId(String id) {
 78  0
         this.id = id;
 79  0
     }
 80  
 
 81  
     public List<String> getBuildingIds() {
 82  0
         return buildingIds;
 83  
     }
 84  
 
 85  
     public void setBuildingIds(List<String> buildingIds) {
 86  0
         this.buildingIds = buildingIds;
 87  0
     }
 88  
 
 89  
     public List<String> getCampusIds() {
 90  0
         return campusIds;
 91  
     }
 92  
 
 93  
     public void setCampusIds(List<String> campusIds) {
 94  0
         this.campusIds = campusIds;
 95  0
     }
 96  
 
 97  
     public List<String> getOrgIds() {
 98  0
         return orgIds;
 99  
     }
 100  
 
 101  
     public void setOrgIds(List<String> orgIds) {
 102  0
         this.orgIds = orgIds;
 103  0
     }
 104  
 
 105  
     public List<String> getResourceTypeKeys() {
 106  0
         return resourceTypeKeys;
 107  
     }
 108  
 
 109  
     public void setResourceTypeKeys(List<String> resourceTypeKeys) {
 110  0
         this.resourceTypeKeys = resourceTypeKeys;
 111  0
     }
 112  
 
 113  
     public List<String> getRoomIds() {
 114  0
         return roomIds;
 115  
     }
 116  
 
 117  
     public void setRoomIds(List<String> roomIds) {
 118  0
         this.roomIds = roomIds;
 119  0
     }
 120  
 
 121  
     public List<String> getTimeSlotIds() {
 122  0
         return timeSlotIds;
 123  
     }
 124  
 
 125  
     public void setTimeSlotIds(List<String> timeSlotIds) {
 126  0
         this.timeSlotIds = timeSlotIds;
 127  0
     }
 128  
 }