001: /**
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */package org.apache.openejb.jee;
017:
018: import javax.xml.bind.annotation.XmlAccessType;
019: import javax.xml.bind.annotation.XmlAccessorType;
020: import javax.xml.bind.annotation.XmlAttribute;
021: import javax.xml.bind.annotation.XmlElement;
022: import javax.xml.bind.annotation.XmlID;
023: import javax.xml.bind.annotation.XmlType;
024: import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
025: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
026: import java.util.ArrayList;
027: import java.util.List;
028:
029: /**
030: * The connection-definitionType defines a set of connection
031: * interfaces and classes pertaining to a particular connection
032: * type. This also includes configurable properties for
033: * ManagedConnectionFactory instances that may be produced out
034: * of this set.
035: */
036: @XmlAccessorType(XmlAccessType.FIELD)
037: @XmlType(name="connection-definitionType",propOrder={"managedConnectionFactoryClass","configProperty","connectionFactoryInterface","connectionFactoryImplClass","connectionInterface","connectionImplClass"})
038: public class ConnectionDefinition {
039:
040: @XmlElement(name="managedconnectionfactory-class",required=true)
041: protected String managedConnectionFactoryClass;
042: @XmlElement(name="config-property")
043: protected List<ConfigProperty> configProperty;
044: @XmlElement(name="connectionfactory-interface",required=true)
045: protected String connectionFactoryInterface;
046: @XmlElement(name="connectionfactory-impl-class",required=true)
047: protected String connectionFactoryImplClass;
048: @XmlElement(name="connection-interface",required=true)
049: protected String connectionInterface;
050: @XmlElement(name="connection-impl-class",required=true)
051: protected String connectionImplClass;
052: @XmlAttribute
053: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
054: @XmlID
055: protected String id;
056:
057: public String getManagedConnectionFactoryClass() {
058: return managedConnectionFactoryClass;
059: }
060:
061: public void setManagedConnectionFactoryClass(String value) {
062: this .managedConnectionFactoryClass = value;
063: }
064:
065: public List<ConfigProperty> getConfigProperty() {
066: if (configProperty == null) {
067: configProperty = new ArrayList<ConfigProperty>();
068: }
069: return this .configProperty;
070: }
071:
072: public String getConnectionFactoryInterface() {
073: return connectionFactoryInterface;
074: }
075:
076: public void setConnectionFactoryInterface(String value) {
077: this .connectionFactoryInterface = value;
078: }
079:
080: public String getConnectionFactoryImplClass() {
081: return connectionFactoryImplClass;
082: }
083:
084: public void setConnectionFactoryImplClass(String value) {
085: this .connectionFactoryImplClass = value;
086: }
087:
088: public String getConnectionInterface() {
089: return connectionInterface;
090: }
091:
092: public void setConnectionInterface(String value) {
093: this .connectionInterface = value;
094: }
095:
096: public String getConnectionImplClass() {
097: return connectionImplClass;
098: }
099:
100: public void setConnectionImplClass(String value) {
101: this .connectionImplClass = value;
102: }
103:
104: public String getId() {
105: return id;
106: }
107:
108: public void setId(String value) {
109: this.id = value;
110: }
111:
112: }
|