KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > resource > metadata > ConnectionDefinitionMetaData


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.resource.metadata;
23
24 /**
25  * Connection Definition meta data
26  *
27  * @author <a HREF="mailto:adrian@jboss.com">Adrian Brock</a>
28  * @version $Revision: 38342 $
29  */

30 public class ConnectionDefinitionMetaData extends ConfigPropertyMetaDataContainer
31 {
32    private static final long serialVersionUID = -138227135002730221L;
33
34    /** The connector metadata */
35    private ConnectorMetaData cmd;
36    
37    /** The managed connection factory class */
38    private String JavaDoc managedConnectionFactoryClass;
39
40    /** The connection factory interface class */
41    private String JavaDoc connectionFactoryInterfaceClass;
42
43    /** The connection factory implementation class */
44    private String JavaDoc connectionFactoryImplementationClass;
45
46    /** The connection interface class */
47    private String JavaDoc connectionInterfaceClass;
48
49    /** The connection implementation class */
50    private String JavaDoc connectionImplementationClass;
51    
52    public ConnectionDefinitionMetaData(ConnectorMetaData cmd)
53    {
54       this.cmd = cmd;
55    }
56
57    /**
58     * Get the connector
59     *
60     * @return the connector
61     */

62    public ConnectorMetaData getConnector()
63    {
64       return cmd;
65    }
66    
67    /**
68     * Get the managed connection factory class
69     *
70     * @return the managed connection factory class
71     */

72    public String JavaDoc getManagedConnectionFactoryClass()
73    {
74       return managedConnectionFactoryClass;
75    }
76
77    /**
78     * Set the managed connection factory class
79     *
80     * @param managedConnectionFactoryClass the class name
81     */

82    public void setManagedConnectionFactoryClass(String JavaDoc managedConnectionFactoryClass)
83    {
84       this.managedConnectionFactoryClass = managedConnectionFactoryClass;
85    }
86
87    /**
88     * Get the connection factory interface class
89     *
90     * @return the connection factory interface class
91     */

92    public String JavaDoc getConnectionFactoryInterfaceClass()
93    {
94       return connectionFactoryInterfaceClass;
95    }
96
97    /**
98     * Set the connection factory interface class
99     *
100     * @param connectionFactoryInterfaceClass the class name
101     */

102    public void setConnectionFactoryInterfaceClass(String JavaDoc connectionFactoryInterfaceClass)
103    {
104       this.connectionFactoryInterfaceClass = connectionFactoryInterfaceClass;
105    }
106
107    /**
108     * Get the connection factory implementation class
109     *
110     * @return the connection factory implementation class
111     */

112    public String JavaDoc getConnectionFactoryImplementationClass()
113    {
114       return connectionFactoryImplementationClass;
115    }
116
117    /**
118     * Set the connection factory implementation class
119     *
120     * @param connectionFactoryImplementationClass the class name
121     */

122    public void setConnectionFactoryImplementationClass(String JavaDoc connectionFactoryImplementationClass)
123    {
124       this.connectionFactoryImplementationClass = connectionFactoryImplementationClass;
125    }
126
127    /**
128     * Get the connection interface class
129     *
130     * @return the connection interface class
131     */

132    public String JavaDoc getConnectionInterfaceClass()
133    {
134       return connectionInterfaceClass;
135    }
136
137    /**
138     * Set the connection interface class
139     *
140     * @param connectionInterfaceClass the class name
141     */

142    public void setConnectionInterfaceClass(String JavaDoc connectionInterfaceClass)
143    {
144       this.connectionInterfaceClass = connectionInterfaceClass;
145    }
146
147    /**
148     * Get the connection implementation class
149     *
150     * @return the connection implementation class
151     */

152    public String JavaDoc getConnectionImplementationClass()
153    {
154       return connectionImplementationClass;
155    }
156
157    /**
158     * Set the connection implementation class
159     *
160     * @param connectionImplementationClass the class name
161     */

162    public void setConnectionImplementationClass(String JavaDoc connectionImplementationClass)
163    {
164       this.connectionImplementationClass = connectionImplementationClass;
165    }
166    
167    public String JavaDoc toString()
168    {
169       StringBuffer JavaDoc buffer = new StringBuffer JavaDoc();
170       buffer.append("ConnectionDefinitionMetaData").append('@');
171       buffer.append(Integer.toHexString(System.identityHashCode(this)));
172       buffer.append("[managedConnectionFactoryClass=").append(managedConnectionFactoryClass);
173       buffer.append(" connectionFactoryInterfaceClass=").append(connectionFactoryInterfaceClass);
174       buffer.append(" connectionFactoryImplementationClass=").append(connectionFactoryImplementationClass);
175       buffer.append(" connectionInterfaceClass=").append(connectionInterfaceClass);
176       buffer.append(" connectionImplementationClass=").append(connectionImplementationClass);
177       buffer.append(" properties=").append(getProperties());
178       buffer.append(']');
179       return buffer.toString();
180    }
181 }
182
Popular Tags