View Javadoc

1   /*
2    * Copyright 2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 1.0 (the
5    * "License"); you may not use this file except in compliance with the
6    * License.  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
13   * implied.  See the License for the specific language governing
14   * permissions and limitations under the License.
15   */
16  
17  package org.kuali.student.r2.common.datadictionary.dto;
18  
19  import java.io.Serializable;
20  import javax.xml.bind.annotation.XmlAccessType;
21  import javax.xml.bind.annotation.XmlAccessorType;
22  import javax.xml.bind.annotation.XmlElement;
23  
24  import org.kuali.student.r2.common.datadictionary.infc.ValidCharactersConstraintInfc;
25  
26  
27  @XmlAccessorType(XmlAccessType.FIELD)
28  public class ValidCharactersConstraintInfo 
29      implements ValidCharactersConstraintInfc, Serializable {
30  
31      private static final long serialVersionUID = 1L;
32  
33      @XmlElement
34      private String value;
35  
36      @XmlElement
37      private String jsValue;
38  
39      @XmlElement
40      private Boolean isApplyClientSide;
41  
42      @XmlElement
43      private String labelKey;
44  
45      /**
46       * Constructs a new ValidCharactersConstraintInfo.
47       */
48      public ValidCharactersConstraintInfo() {
49      }
50  
51      /**
52       * Constructs a new ValidCharactersConstraintInfo from a
53       * ValidCharactersConstraintInfc.
54       *
55       * @param vcc the ValidcharactersConstraint to copy
56       */
57      public ValidCharactersConstraintInfo(ValidCharactersConstraintInfc vcc) {
58          this.value = vcc.getValue();
59          this.jsValue = vcc.getJsValue();
60          this.isApplyClientSide = vcc.getIsApplyClientSide();
61          this.labelKey = vcc.getLabelKey();
62      }
63  
64      @Override
65      public String getJsValue() {
66          return this.jsValue;
67      }
68  
69      @Override
70      public String getValue() {
71          return this.value;
72      }
73  
74      @Override
75      public Boolean getIsApplyClientSide() {
76          return this.isApplyClientSide;
77      }
78  
79      @Override
80      public String getLabelKey() {
81          return this.labelKey;
82      }
83  
84      public static class Builder implements ValidCharactersConstraintInfc {
85  
86          private String value;
87          private String jsValue;
88          private Boolean isApplyClientSide;
89          private String labelKey;
90  
91          public Builder() {
92          }
93  
94          public Builder(ValidCharactersConstraintInfc vcc) {
95              super();
96              this.value = vcc.getValue();
97              this.jsValue = vcc.getJsValue();
98              this.isApplyClientSide = vcc.getIsApplyClientSide();
99              this.labelKey = vcc.getLabelKey();
100         }
101 
102         public ValidCharactersConstraintInfo build() {
103             return new ValidCharactersConstraintInfo(this);
104         }
105 
106         @Override
107         public String getJsValue() {
108             return this.jsValue;
109         }
110 
111         @Override
112         public String getValue() {
113             return this.value;
114         }
115 
116         public Builder setJsValue(String jsValue) {
117             this.jsValue = jsValue;
118             return this;
119         }
120 
121         public Builder setValue(String value) {
122             this.value = value;
123             return this;
124         }
125 
126         @Override
127         public Boolean getIsApplyClientSide() {
128             return this.isApplyClientSide;
129         }
130 
131         @Override
132         public String getLabelKey() {
133             return this.labelKey;
134         }
135 
136         public Builder setApplyClientSide(Boolean applyClientSide) {
137             this.isApplyClientSide = applyClientSide;
138             return this;
139         }
140 
141         public Builder setLabelKey(String labelKey) {
142             this.labelKey = labelKey;
143             return this;
144         }
145     }
146 }