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.lum.clu.infc.Field;
19  
20  import javax.xml.bind.Element;
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.XmlAttribute;
25  import javax.xml.bind.annotation.XmlElement;
26  import javax.xml.bind.annotation.XmlType;
27  import java.io.Serializable;
28  import java.util.List;
29  
30  @XmlAccessorType(XmlAccessType.FIELD)
31  @XmlType(name = "FieldInfo", propOrder = {"id", "value" , "_futureElements" }) 
32  public class FieldInfo implements Serializable, Field {
33  
34      private static final long serialVersionUID = 1L;
35  
36      @XmlAttribute
37      private String id;
38  
39      @XmlElement
40      private String value;
41  
42      @XmlAnyElement
43      private List<Object> _futureElements;  
44  
45      public FieldInfo() {
46  
47      }
48  
49      public FieldInfo(Field field) {
50          if (null != field) {
51              this.id = field.getId();
52              this.value = field.getValue();
53          }
54      }
55  
56      @Override
57      public String getId() {
58          return id;
59      }
60  
61      public void setId(String id) {
62          this.id = id;
63      }
64  
65      @Override
66      public String getValue() {
67          return value;
68      }
69  
70      public void setValue(String value) {
71          this.value = value;
72      }
73  }