01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.openejb.jee.sun;
17:
18: import javax.xml.bind.annotation.XmlAccessType;
19: import javax.xml.bind.annotation.XmlAccessorType;
20: import javax.xml.bind.annotation.XmlAttribute;
21: import javax.xml.bind.annotation.XmlType;
22: import javax.xml.bind.annotation.XmlValue;
23: import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
24: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
25:
26: @XmlAccessorType(XmlAccessType.FIELD)
27: @XmlType(name="",propOrder={"value"})
28: public class ConstraintFieldValue {
29: @XmlAttribute(name="match-expr")
30: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
31: protected String matchExpr;
32: @XmlAttribute(name="cache-on-match")
33: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
34: protected String cacheOnMatch;
35: @XmlAttribute(name="cache-on-match-failure")
36: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
37: protected String cacheOnMatchFailure;
38: @XmlValue
39: protected String value;
40:
41: public String getMatchExpr() {
42: if (matchExpr == null) {
43: return "equals";
44: } else {
45: return matchExpr;
46: }
47: }
48:
49: public void setMatchExpr(String value) {
50: this .matchExpr = value;
51: }
52:
53: public String getCacheOnMatch() {
54: if (cacheOnMatch == null) {
55: return "true";
56: } else {
57: return cacheOnMatch;
58: }
59: }
60:
61: public void setCacheOnMatch(String value) {
62: this .cacheOnMatch = value;
63: }
64:
65: public String getCacheOnMatchFailure() {
66: if (cacheOnMatchFailure == null) {
67: return "false";
68: } else {
69: return cacheOnMatchFailure;
70: }
71: }
72:
73: public void setCacheOnMatchFailure(String value) {
74: this .cacheOnMatchFailure = value;
75: }
76:
77: public String getvalue() {
78: return value;
79: }
80:
81: public void setvalue(String value) {
82: this.value = value;
83: }
84: }
|