001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.resource.metadata;
023:
024: /**
025: * Connection Definition meta data
026: *
027: * @author <a href="mailto:adrian@jboss.com">Adrian Brock</a>
028: * @version $Revision: 57189 $
029: */
030: public class ConnectionDefinitionMetaData extends
031: ConfigPropertyMetaDataContainer {
032: private static final long serialVersionUID = -138227135002730221L;
033:
034: /** The connector metadata */
035: private ConnectorMetaData cmd;
036:
037: /** The managed connection factory class */
038: private String managedConnectionFactoryClass;
039:
040: /** The connection factory interface class */
041: private String connectionFactoryInterfaceClass;
042:
043: /** The connection factory implementation class */
044: private String connectionFactoryImplementationClass;
045:
046: /** The connection interface class */
047: private String connectionInterfaceClass;
048:
049: /** The connection implementation class */
050: private String connectionImplementationClass;
051:
052: public ConnectionDefinitionMetaData(ConnectorMetaData cmd) {
053: this .cmd = cmd;
054: }
055:
056: /**
057: * Get the connector
058: *
059: * @return the connector
060: */
061: public ConnectorMetaData getConnector() {
062: return cmd;
063: }
064:
065: /**
066: * Get the managed connection factory class
067: *
068: * @return the managed connection factory class
069: */
070: public String getManagedConnectionFactoryClass() {
071: return managedConnectionFactoryClass;
072: }
073:
074: /**
075: * Set the managed connection factory class
076: *
077: * @param managedConnectionFactoryClass the class name
078: */
079: public void setManagedConnectionFactoryClass(
080: String managedConnectionFactoryClass) {
081: this .managedConnectionFactoryClass = managedConnectionFactoryClass;
082: }
083:
084: /**
085: * Get the connection factory interface class
086: *
087: * @return the connection factory interface class
088: */
089: public String getConnectionFactoryInterfaceClass() {
090: return connectionFactoryInterfaceClass;
091: }
092:
093: /**
094: * Set the connection factory interface class
095: *
096: * @param connectionFactoryInterfaceClass the class name
097: */
098: public void setConnectionFactoryInterfaceClass(
099: String connectionFactoryInterfaceClass) {
100: this .connectionFactoryInterfaceClass = connectionFactoryInterfaceClass;
101: }
102:
103: /**
104: * Get the connection factory implementation class
105: *
106: * @return the connection factory implementation class
107: */
108: public String getConnectionFactoryImplementationClass() {
109: return connectionFactoryImplementationClass;
110: }
111:
112: /**
113: * Set the connection factory implementation class
114: *
115: * @param connectionFactoryImplementationClass the class name
116: */
117: public void setConnectionFactoryImplementationClass(
118: String connectionFactoryImplementationClass) {
119: this .connectionFactoryImplementationClass = connectionFactoryImplementationClass;
120: }
121:
122: /**
123: * Get the connection interface class
124: *
125: * @return the connection interface class
126: */
127: public String getConnectionInterfaceClass() {
128: return connectionInterfaceClass;
129: }
130:
131: /**
132: * Set the connection interface class
133: *
134: * @param connectionInterfaceClass the class name
135: */
136: public void setConnectionInterfaceClass(
137: String connectionInterfaceClass) {
138: this .connectionInterfaceClass = connectionInterfaceClass;
139: }
140:
141: /**
142: * Get the connection implementation class
143: *
144: * @return the connection implementation class
145: */
146: public String getConnectionImplementationClass() {
147: return connectionImplementationClass;
148: }
149:
150: /**
151: * Set the connection implementation class
152: *
153: * @param connectionImplementationClass the class name
154: */
155: public void setConnectionImplementationClass(
156: String connectionImplementationClass) {
157: this .connectionImplementationClass = connectionImplementationClass;
158: }
159:
160: public String toString() {
161: StringBuffer buffer = new StringBuffer();
162: buffer.append("ConnectionDefinitionMetaData").append('@');
163: buffer.append(Integer
164: .toHexString(System.identityHashCode(this )));
165: buffer.append("[managedConnectionFactoryClass=").append(
166: managedConnectionFactoryClass);
167: buffer.append(" connectionFactoryInterfaceClass=").append(
168: connectionFactoryInterfaceClass);
169: buffer.append(" connectionFactoryImplementationClass=").append(
170: connectionFactoryImplementationClass);
171: buffer.append(" connectionInterfaceClass=").append(
172: connectionInterfaceClass);
173: buffer.append(" connectionImplementationClass=").append(
174: connectionImplementationClass);
175: buffer.append(" properties=").append(getProperties());
176: buffer.append(']');
177: return buffer.toString();
178: }
179: }
|