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.XmlElement;
21: import javax.xml.bind.annotation.XmlType;
22: import java.util.ArrayList;
23: import java.util.List;
24:
25: @XmlAccessorType(XmlAccessType.FIELD)
26: @XmlType(name="",propOrder={"ejbName","tableName","cmpFieldMapping","cmrFieldMapping","secondaryTable","consistency"})
27: public class EntityMapping {
28: @XmlElement(name="ejb-name",required=true)
29: protected String ejbName;
30: @XmlElement(name="table-name",required=true)
31: protected String tableName;
32: @XmlElement(name="cmp-field-mapping",required=true)
33: protected List<CmpFieldMapping> cmpFieldMapping;
34: @XmlElement(name="cmr-field-mapping")
35: protected List<CmrFieldMapping> cmrFieldMapping;
36: @XmlElement(name="secondary-table")
37: protected List<SecondaryTable> secondaryTable;
38: protected Consistency consistency;
39:
40: public String getEjbName() {
41: return ejbName;
42: }
43:
44: public void setEjbName(String value) {
45: this .ejbName = value;
46: }
47:
48: public String getTableName() {
49: return tableName;
50: }
51:
52: public void setTableName(String value) {
53: this .tableName = value;
54: }
55:
56: public List<CmpFieldMapping> getCmpFieldMapping() {
57: if (cmpFieldMapping == null) {
58: cmpFieldMapping = new ArrayList<CmpFieldMapping>();
59: }
60: return this .cmpFieldMapping;
61: }
62:
63: public List<CmrFieldMapping> getCmrFieldMapping() {
64: if (cmrFieldMapping == null) {
65: cmrFieldMapping = new ArrayList<CmrFieldMapping>();
66: }
67: return this .cmrFieldMapping;
68: }
69:
70: public List<SecondaryTable> getSecondaryTable() {
71: if (secondaryTable == null) {
72: secondaryTable = new ArrayList<SecondaryTable>();
73: }
74: return this .secondaryTable;
75: }
76:
77: public Consistency getConsistency() {
78: return consistency;
79: }
80:
81: public void setConsistency(Consistency value) {
82: this.consistency = value;
83: }
84: }
|