001/** 002 * Copyright 2012 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the 005 * "License"); you may not use this file except in compliance with the 006 * License. You may obtain a copy of the License at 007 * 008 * http://www.osedu.org/licenses/ECL-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 013 * implied. See the License for the specific language governing 014 * permissions and limitations under the License. 015 */ 016 017package org.kuali.student.enrollment.roster.dto; 018 019import java.io.Serializable; 020import java.util.ArrayList; 021import java.util.List; 022 023import javax.xml.bind.annotation.XmlAccessType; 024import javax.xml.bind.annotation.XmlAccessorType; 025import javax.xml.bind.annotation.XmlAnyElement; 026import javax.xml.bind.annotation.XmlElement; 027import javax.xml.bind.annotation.XmlType; 028 029import org.kuali.student.enrollment.roster.infc.LprRoster; 030import org.kuali.student.r2.common.dto.IdEntityInfo; 031import org.kuali.student.r2.common.dto.TimeAmountInfo; 032import org.w3c.dom.Element; 033 034@XmlAccessorType(XmlAccessType.FIELD) 035@XmlType(name = "LprRosterInfo", propOrder = { 036 "id", "typeKey", "stateKey", "name", "descr", 037 "associatedLuiIds", "maximumCapacity", "checkInRequired", 038 "checkInFrequency", "meta", "attributes", "_futureElements"}) 039 040public class LprRosterInfo 041 extends IdEntityInfo 042 implements LprRoster, Serializable { 043 044 private static final long serialVersionUID = 1L; 045 046 @XmlElement 047 private List<String> associatedLuiIds; 048 049 @XmlElement 050 private Integer maximumCapacity; 051 052 @XmlElement 053 private Boolean checkInRequired; 054 055 @XmlElement 056 private TimeAmountInfo checkInFrequency; 057 058 @XmlAnyElement 059 private List<Element> _futureElements; 060 061 062 /** 063 * Constructs a new LprRosterInfo. 064 */ 065 public LprRosterInfo() { 066 } 067 068 /** 069 * Constructs a new LprRosterInfo from another LprRoster. 070 * 071 * @param lprRoster the LprRoster to copy 072 */ 073 public LprRosterInfo(LprRoster lprRoster) { 074 super(lprRoster); 075 if (lprRoster != null) { 076 this.associatedLuiIds = new ArrayList<String>(lprRoster.getAssociatedLuiIds()); 077 this.maximumCapacity = lprRoster.getMaximumCapacity(); 078 this.checkInRequired = lprRoster.getCheckInRequired(); 079 this.checkInFrequency = lprRoster.getCheckInFrequency(); 080 } 081 } 082 083 @Override 084 public List<String> getAssociatedLuiIds() { 085 if (this.associatedLuiIds == null) { 086 this.associatedLuiIds = new ArrayList<String>(); 087 } 088 089 return this.associatedLuiIds; 090 } 091 092 public void setAssociatedLuiIds(List<String> associatedLuiIds) { 093 this.associatedLuiIds = associatedLuiIds; 094 } 095 096 @Override 097 public Integer getMaximumCapacity() { 098 return maximumCapacity; 099 } 100 101 public void setMaximumCapacity(Integer maximumCapacity) { 102 this.maximumCapacity = maximumCapacity; 103 } 104 105 @Override 106 public Boolean getCheckInRequired() { 107 return checkInRequired; 108 } 109 110 public void setCheckInRequired(Boolean checkInRequired) { 111 this.checkInRequired = checkInRequired; 112 } 113 114 @Override 115 public TimeAmountInfo getCheckInFrequency() { 116 return checkInFrequency; 117 } 118 119 public void setCheckInFrequency(TimeAmountInfo checkInFrequency) { 120 this.checkInFrequency = checkInFrequency; 121 } 122}