001/**
002 * Copyright 2010 The Kuali Foundation Licensed under the
003 * Educational Community License, Version 2.0 (the "License"); you may
004 * not use this file except in compliance with the License. You may
005 * obtain a copy of the License at
006 *
007 * http://www.osedu.org/licenses/ECL-2.0
008 *
009 * Unless required by applicable law or agreed to in writing,
010 * software distributed under the License is distributed on an "AS IS"
011 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
012 * or implied. See the License for the specific language governing
013 * permissions and limitations under the License.
014 */
015
016package org.kuali.student.enrollment.class1.krms.dto;
017
018import org.kuali.student.r2.common.dto.IdEntityInfo;
019import org.kuali.student.r2.lum.clu.dto.MembershipQueryInfo;
020import org.kuali.student.r2.lum.clu.infc.CluSet;
021
022import javax.xml.bind.annotation.XmlAccessType;
023import javax.xml.bind.annotation.XmlAccessorType;
024import javax.xml.bind.annotation.XmlAnyElement;
025import javax.xml.bind.annotation.XmlElement;
026import javax.xml.bind.annotation.XmlType;
027import java.io.Serializable;
028import java.util.ArrayList;
029import java.util.Date;
030import java.util.List;
031
032@XmlAccessorType(XmlAccessType.FIELD)
033@XmlType(name = "CluSetInfo", propOrder = {"id", "descr", "stateKey", "typeKey", "name", "membershipQuery", "adminOrg", "isReusable", "isReferenceable", "cluSetIds", "cluIds",
034        "effectiveDate", "expirationDate", "meta", "attributes" , "_futureElements", "longName", "containsSet"})
035public class TestSetInfo extends IdEntityInfo implements Serializable, CluSet {
036
037    private static final long serialVersionUID = 1L;
038
039    @XmlElement
040    private MembershipQueryInfo membershipQuery;
041
042    @XmlElement
043    private String adminOrg;
044
045    @XmlElement
046    private Boolean isReusable;
047
048    @XmlElement
049    private Boolean isReferenceable;
050
051    @XmlElement
052    private List<String> cluSetIds;
053
054    @XmlElement
055    private List<String> cluIds;
056
057    @XmlElement
058    private Date effectiveDate;
059
060    @XmlElement
061    private Date expirationDate;
062
063    @XmlAnyElement
064    private List<Object> _futureElements;
065
066    private String longName;
067
068    private String containsSet;
069
070    public TestSetInfo() {
071
072    }
073
074    public TestSetInfo(CluSet cluSet) {
075        super(cluSet);
076        if (null != cluSet) {
077            this.membershipQuery = (null != cluSet.getMembershipQuery()) ? new MembershipQueryInfo(cluSet.getMembershipQuery()) : null;
078            this.adminOrg = cluSet.getAdminOrg();
079            this.isReusable = cluSet.getIsReusable();
080            this.isReferenceable = cluSet.getIsReferenceable();
081            this.cluSetIds = new ArrayList<String>(cluSet.getCluSetIds());
082            this.cluIds = new ArrayList<String>(cluSet.getCluIds());
083            this.effectiveDate = (null != cluSet.getEffectiveDate()) ? new Date(cluSet.getEffectiveDate().getTime()) : null;
084            this.expirationDate = (null != cluSet.getExpirationDate()) ? new Date(cluSet.getExpirationDate().getTime()) : null;
085        }
086    }
087
088    @Override
089    public List<String> getCluSetIds() {
090        if (cluSetIds == null) {
091            cluSetIds = new ArrayList<String>();
092        }
093        return cluSetIds;
094    }
095
096    public void setCluSetIds(List<String> cluSetIds) {
097        this.cluSetIds = cluSetIds;
098    }
099
100    @Override
101    public List<String> getCluIds() {
102        if (cluIds == null) {
103            cluIds = new ArrayList<String>();
104        }
105        return cluIds;
106    }
107
108    public void setCluIds(List<String> cluIds) {
109        this.cluIds = cluIds;
110    }
111
112    @Override
113    public MembershipQueryInfo getMembershipQuery() {
114        return membershipQuery;
115    }
116
117    public void setMembershipQuery(MembershipQueryInfo membershipQuery) {
118        this.membershipQuery = membershipQuery;
119    }
120
121    @Override
122    public String getAdminOrg() {
123        return adminOrg;
124    }
125
126    public void setAdminOrg(String adminOrg) {
127        this.adminOrg = adminOrg;
128    }
129
130    @Override
131    public Boolean getIsReusable() {
132        return isReusable;
133    }
134
135    public void setIsReusable(Boolean isReusable) {
136        this.isReusable = isReusable;
137    }
138
139    @Override
140    public Boolean getIsReferenceable() {
141        return isReferenceable;
142    }
143
144    public void setIsReferenceable(Boolean isReferenceable) {
145        this.isReferenceable = isReferenceable;
146    }
147
148    @Override
149    public Date getEffectiveDate() {
150        return effectiveDate;
151    }
152
153    public void setEffectiveDate(Date effectiveDate) {
154        this.effectiveDate = effectiveDate;
155    }
156
157    @Override
158    public Date getExpirationDate() {
159        return expirationDate;
160    }
161
162    public void setExpirationDate(Date expirationDate) {
163        this.expirationDate = expirationDate;
164    }
165
166    public String getLongName() {
167        return longName;
168    }
169
170    public void setLongName(String longName) {
171        this.longName = longName;
172    }
173
174    public String getContainsSet() {
175        return containsSet;
176    }
177
178    public void setContainsSet(String containsSet) {
179        this.containsSet = containsSet;
180    }
181}