KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > entity > PersistenceUnitInfoImpl


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.ejb3.entity;
23
24 import java.net.URL JavaDoc;
25 import java.util.List JavaDoc;
26 import java.util.Properties JavaDoc;
27 import javax.persistence.spi.PersistenceUnitInfo;
28 import javax.persistence.spi.PersistenceUnitTransactionType;
29 import javax.persistence.spi.ClassTransformer;
30 import javax.sql.DataSource JavaDoc;
31
32 /**
33  * Comment
34  *
35  * @author <a HREF="mailto:bill@jboss.org">Bill Burke</a>
36  * @version $Revision: 40422 $
37  */

38 public class PersistenceUnitInfoImpl implements PersistenceUnitInfo
39 {
40    private String JavaDoc entityManagerName;
41    private DataSource JavaDoc jtaDataSource;
42    private DataSource JavaDoc nonJtaDataSource;
43    private List JavaDoc<String JavaDoc> mappingFileNames;
44    private List JavaDoc<URL JavaDoc> jarFiles;
45    private List JavaDoc<String JavaDoc> entityclassNames;
46    private Properties JavaDoc properties;
47    private ClassLoader JavaDoc classLoader;
48    private String JavaDoc persistenceProviderClassName;
49    private PersistenceUnitTransactionType transactionType;
50    private URL JavaDoc persistenceUnitRootUrl;
51    private boolean excludeClasses;
52
53    public PersistenceUnitInfoImpl()
54    {
55    }
56
57    public void addTransformer(ClassTransformer transformer)
58    {
59       //throw new RuntimeException("NOT IMPLEMENTED");
60
}
61
62    public ClassLoader JavaDoc getNewTempClassLoader()
63    {
64       return null;
65    }
66
67    public String JavaDoc getPersistenceProviderClassName()
68    {
69       return persistenceProviderClassName;
70    }
71
72    public void setPersistenceProviderClassName(String JavaDoc persistenceProviderClassName)
73    {
74       this.persistenceProviderClassName = persistenceProviderClassName;
75    }
76
77    public String JavaDoc getPersistenceUnitName()
78    {
79       return entityManagerName;
80    }
81
82    public void setPersistenceUnitName(String JavaDoc entityManagerName)
83    {
84       this.entityManagerName = entityManagerName;
85    }
86
87    public DataSource JavaDoc getJtaDataSource()
88    {
89       return jtaDataSource;
90    }
91
92    public void setJtaDataSource(DataSource JavaDoc jtaDataSource)
93    {
94       this.jtaDataSource = jtaDataSource;
95    }
96
97    public DataSource JavaDoc getNonJtaDataSource()
98    {
99       return nonJtaDataSource;
100    }
101
102    public void setNonJtaDataSource(DataSource JavaDoc nonJtaDataSource)
103    {
104       this.nonJtaDataSource = nonJtaDataSource;
105    }
106
107    public List JavaDoc<String JavaDoc> getMappingFileNames()
108    {
109       return mappingFileNames;
110    }
111
112    public void setMappingFileNames(List JavaDoc<String JavaDoc> mappingFileNames)
113    {
114       this.mappingFileNames = mappingFileNames;
115    }
116
117    public List JavaDoc<URL JavaDoc> getJarFileUrls()
118    {
119       return jarFiles;
120    }
121
122    public void setJarFiles(List JavaDoc<URL JavaDoc> jarFiles)
123    {
124       this.jarFiles = jarFiles;
125    }
126
127    public List JavaDoc<String JavaDoc> getManagedClassNames()
128    {
129       return entityclassNames;
130    }
131
132    public void setManagedClassnames(List JavaDoc<String JavaDoc> entityclassNames)
133    {
134       this.entityclassNames = entityclassNames;
135    }
136
137    public Properties JavaDoc getProperties()
138    {
139       return properties;
140    }
141
142    public void setProperties(Properties JavaDoc properties)
143    {
144       this.properties = properties;
145    }
146
147    public ClassLoader JavaDoc getClassLoader()
148    {
149       return classLoader;
150    }
151
152    public void setClassLoader(ClassLoader JavaDoc classLoader)
153    {
154       this.classLoader = classLoader;
155    }
156
157    public PersistenceUnitTransactionType getTransactionType()
158    {
159       return transactionType;
160    }
161
162    public void setTransactionType(PersistenceUnitTransactionType transactionType)
163    {
164       this.transactionType = transactionType;
165    }
166
167    public URL JavaDoc getPersistenceUnitRootUrl()
168    {
169       return persistenceUnitRootUrl;
170    }
171
172    public void setPersistenceUnitRootUrl(URL JavaDoc persistenceUnitRootUrl)
173    {
174       this.persistenceUnitRootUrl = persistenceUnitRootUrl;
175    }
176
177    public boolean excludeUnlistedClasses()
178    {
179       return excludeClasses;
180    }
181
182    public void setExcludeUnlistedClasses(boolean excludeClasses)
183    {
184       this.excludeClasses = excludeClasses;
185    }
186
187 }
188
Popular Tags