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 org.kuali.student.r2.common.dto.HasAttributesInfo;
19  import org.kuali.student.r2.common.dto.RichTextInfo;
20  import org.kuali.student.r2.lum.clu.infc.AffiliatedOrg;
21  import org.kuali.student.r2.lum.clu.infc.CluAccounting;
22  
23  import javax.xml.bind.Element;
24  import javax.xml.bind.annotation.XmlAccessType;
25  import javax.xml.bind.annotation.XmlAccessorType;
26  import javax.xml.bind.annotation.XmlAnyElement;
27  import javax.xml.bind.annotation.XmlElement;
28  import javax.xml.bind.annotation.XmlType;
29  import java.io.Serializable;
30  import java.util.ArrayList;
31  import java.util.List;
32  import java.util.Map;
33  
34  @XmlAccessorType(XmlAccessType.FIELD)
35  @XmlType(name = "CluAccountingInfo", propOrder = {"id", "descr", "affiliatedOrgs", "attributes" , "_futureElements" }) 
36  public class CluAccountingInfo extends HasAttributesInfo implements CluAccounting, Serializable {
37  
38      private static final long serialVersionUID = 1L;
39  
40      @XmlElement
41      private String id;
42      @XmlElement
43      private RichTextInfo descr;
44      @XmlElement
45      private List<AffiliatedOrgInfo> affiliatedOrgs;
46      @XmlAnyElement
47      private List<Object> _futureElements;  
48  
49      public CluAccountingInfo() {
50  
51      }
52  
53      public CluAccountingInfo(CluAccounting cluAccounting) {
54          super(cluAccounting);
55          if (null != cluAccounting) {
56              this.id = cluAccounting.getId();
57              this.affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>();
58              for (AffiliatedOrg affiliatedOrg : cluAccounting.getAffiliatedOrgs()) {
59                  this.affiliatedOrgs.add(new AffiliatedOrgInfo(affiliatedOrg));
60              }
61          }
62      }
63  
64      @Override
65      public String getId() {
66          return id;
67      }
68  
69      public void setId(String id) {
70          this.id = id;
71      }
72  
73      @Override
74      public RichTextInfo getDescr() {
75          return descr;
76      }
77  
78      public void setDescr(RichTextInfo descr) {
79          this.descr = descr;
80      }
81  
82  
83      @Override
84      public List<AffiliatedOrgInfo> getAffiliatedOrgs() {
85          return affiliatedOrgs;
86      }
87  
88      public void setAffiliatedOrgs(List<AffiliatedOrgInfo> affiliatedOrgs) {
89          this.affiliatedOrgs = affiliatedOrgs;
90      }
91  
92  }