View Javadoc

1   /**
2    * Copyright 2011-2012 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  package org.kuali.mobility.academics.entity;
16  
17  import java.util.List;
18  import javax.xml.bind.annotation.XmlElement;
19  import javax.xml.bind.annotation.XmlRootElement;
20  import org.apache.commons.collections.CollectionUtils;
21  import org.kuali.mobility.academics.util.SectionTransform;
22  
23  /**
24   *
25   * @author Joe Swanson <joseswan@umich.edu>
26   */
27  @XmlRootElement(name="catalogNumber")
28  public class CatalogNumberImpl implements CatalogNumber {
29      private String number;
30      private String description;
31      @XmlElement( name="sections" )
32      private List<SectionImpl> sections;
33  
34      /**
35       * @return the number
36       */
37      @Override
38      public String getNumber() {
39          return number;
40      }
41  
42      /**
43       * @param number the number to set
44       */
45      @Override
46      public void setNumber(String number) {
47          this.number = number;
48      }
49  
50      /**
51       * @return the description
52       */
53      @Override
54      public String getDescription() {
55          return description;
56      }
57  
58      /**
59       * @param description the description to set
60       */
61      @Override
62      public void setDescription(String description) {
63          this.description = description;
64      }
65  
66      /**
67       * @return the sections
68       */
69      @Override
70      public List<SectionImpl> getSections() {
71          return sections;
72      }
73  
74      /**
75       * @param sections the sections to set
76       */
77      @Override
78      public void setSections(List<? extends Section> sections) {
79          CollectionUtils.collect( sections, new SectionTransform(), this.sections );
80      }
81      
82  }