View Javadoc

1   /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  
16  package org.kuali.student.r2.lum.clu.dto;
17  
18  import java.io.Serializable;
19  import java.util.List;
20  
21  import javax.xml.bind.annotation.XmlAccessType;
22  import javax.xml.bind.annotation.XmlAccessorType;
23  import javax.xml.bind.annotation.XmlAnyElement;
24  import javax.xml.bind.annotation.XmlElement;
25  import javax.xml.bind.annotation.XmlType;
26  
27  import org.kuali.student.r2.common.dto.RelationshipInfo;
28  import org.kuali.student.r2.lum.clu.infc.CluCluRelation;
29  
30  @XmlAccessorType(XmlAccessType.FIELD)
31  @XmlType(name = "CluCluRelationInfo", propOrder = {"id", "typeKey",
32          "stateKey", "cluId", "relatedCluId", "isCluRelationRequired", "effectiveDate",
33          "expirationDate", "meta", "attributes" , "_futureElements" }) 
34  public class CluCluRelationInfo extends RelationshipInfo implements CluCluRelation, Serializable {
35  
36      private static final long serialVersionUID = 1L;
37  
38      @XmlElement
39      private String cluId;
40      @XmlElement
41      private String relatedCluId;
42      @XmlElement
43      private Boolean isCluRelationRequired;
44      @XmlAnyElement
45      private List<Object> _futureElements;  
46  
47      public CluCluRelationInfo() {
48  
49      }
50  
51      public CluCluRelationInfo(CluCluRelation cluCluRelation) {
52          super(cluCluRelation);
53          if (null != cluCluRelation) {
54              this.cluId = cluCluRelation.getCluId();
55              this.relatedCluId = cluCluRelation.getRelatedCluId();
56              this.isCluRelationRequired = cluCluRelation.getIsCluRelationRequired();
57          }
58      }
59  
60      @Override
61      public String getCluId() {
62          return cluId;
63      }
64  
65      public void setCluId(String cluId) {
66          this.cluId = cluId;
67      }
68  
69      @Override
70      public String getRelatedCluId() {
71          return relatedCluId;
72      }
73  
74      public void setRelatedCluId(String relatedCluId) {
75          this.relatedCluId = relatedCluId;
76      }
77  
78      @Override
79      public Boolean getIsCluRelationRequired() {
80          return isCluRelationRequired;
81      }
82  
83      public void setIsCluRelationRequired(Boolean isCluRelationRequired) {
84          this.isCluRelationRequired = isCluRelationRequired;
85      }
86  
87      @Override
88      public String toString() {
89          return "CluCluRelationInfo[id=" + this.getId() + ", cluId=" + cluId + ", relatedCluId=" + relatedCluId + ", type=" + this.getTypeKey() + ", cluRelationRequired=" + isCluRelationRequired + "]";
90      }
91  
92  }