View Javadoc

1   /*
2    * Copyright 2009 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 1.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl1.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.student.contract.model.test.source;
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.w3c.dom.Element;
28  
29  @XmlAccessorType(XmlAccessType.FIELD)
30  @XmlType(name = "LprInfo", propOrder = {"id", "typeKey", "stateKey", "luiId", "personId", "effectiveDate", "expirationDate", "meta", "attributes", "_futureElements"})
31  public class LprInfo extends RelationshipInfo
32          implements Lpr, Serializable {
33  
34      private static final long serialVersionUID = 1L;
35      @XmlElement
36      private final String luiId;
37      @XmlElement
38      private final String personId;
39      @XmlAnyElement
40      private final List<Element> _futureElements;
41  
42      private LprInfo() {
43          super ();
44          luiId = null;
45          personId = null;
46          _futureElements = null;
47      }
48  
49      private LprInfo(Lpr builder) {
50          super(builder);
51          this.luiId = builder.getLuiId();
52          this.personId = builder.getPersonId();
53          _futureElements = null;
54      }
55  
56      @Override
57      public String getLuiId() {
58          return luiId;
59      }
60  
61      @Override
62      public String getPersonId() {
63          return personId;
64      }
65  
66  
67      public static class Builder extends RelationshipInfo.Builder implements ModelBuilder<LprInfo>, Lpr {
68  
69          private String luiId;
70          private String personId;
71  
72          public Builder() {
73          }
74  
75          public Builder(Lpr lprInfo) {
76              super(lprInfo);
77              this.luiId = lprInfo.getLuiId();
78              this.personId = lprInfo.getPersonId();
79          }
80  
81          @Override
82          public LprInfo build() {
83              return new LprInfo(this);
84          }
85  
86          @Override
87          public String getLuiId() {
88              return luiId;
89          }
90  
91          public void setLuiId(String luiId) {
92              this.luiId = luiId;
93          }
94  
95          @Override
96          public String getPersonId() {
97              return personId;
98          }
99  
100         public void setPersonId(String personId) {
101             this.personId = personId;
102         }
103        
104     }
105 }