1 21 package oracle.toplink.essentials.ejb.cmp3.persistence; 23 24 import javax.persistence.spi.PersistenceUnitTransactionType; 25 import javax.persistence.spi.ClassTransformer; 26 import javax.sql.DataSource ; 27 import java.util.List ; 28 import java.util.Properties ; 29 import java.util.Vector ; 30 import java.net.URL ; 31 32 37 public class SEPersistenceUnitInfo implements javax.persistence.spi.PersistenceUnitInfo { 38 39 protected String persistenceUnitName; 40 protected String persistenceProviderClassName; 41 protected DataSource jtaDataSource; 42 protected DataSource nonJtaDataSource; 43 protected PersistenceUnitTransactionType persistenceUnitTransactionType; 44 protected List mappingFiles; 45 protected List jarFileUrls; 46 protected List managedClassNames; 47 protected URL persistenceUnitRootUrl; 48 protected boolean excludeUnlistedClasses = true; 49 protected Properties properties; 50 protected ClassLoader tempClassLoader; 51 protected ClassLoader realClassLoader; 52 53 public SEPersistenceUnitInfo(){ 54 mappingFiles = new Vector (); 55 jarFileUrls = new Vector (); 56 managedClassNames = new Vector (); 57 properties = new Properties (); 58 persistenceUnitTransactionType = PersistenceUnitTransactionType.RESOURCE_LOCAL; 59 } 60 61 65 public String getPersistenceUnitName(){ 66 return persistenceUnitName; 67 } 68 69 public void setPersistenceUnitName(String persistenceUnitName){ 70 this.persistenceUnitName = persistenceUnitName; 71 } 72 73 79 public String getPersistenceProviderClassName(){ 80 return persistenceProviderClassName; 81 } 82 83 public void setPersistenceProviderClassName(String persistenceProviderClassName){ 84 this.persistenceProviderClassName = persistenceProviderClassName; 85 } 86 87 93 public PersistenceUnitTransactionType getTransactionType(){ 94 return persistenceUnitTransactionType; 95 } 96 97 public void setTransactionType(PersistenceUnitTransactionType persistenceUnitTransactionType){ 98 this.persistenceUnitTransactionType = persistenceUnitTransactionType; 99 } 100 101 108 public DataSource getJtaDataSource(){ 109 return jtaDataSource; 110 } 111 112 public void setJtaDataSource(DataSource jtaDataSource){ 113 this.jtaDataSource = jtaDataSource; 114 } 115 116 124 public DataSource getNonJtaDataSource(){ 125 return nonJtaDataSource; 126 } 127 128 public void setNonJtaDataSource(DataSource nonJtaDataSource){ 129 this.nonJtaDataSource = nonJtaDataSource; 130 } 131 132 142 public List <String > getMappingFileNames(){ 143 return mappingFiles; 144 } 145 146 public void setMappingFileNames(List <String > mappingFiles){ 147 this.mappingFiles = mappingFiles; 148 } 149 155 public List <URL > getJarFileUrls(){ 156 return jarFileUrls; 157 } 158 159 public void setJarFileUrls(List <URL > jarFileUrls){ 160 this.jarFileUrls = jarFileUrls; 161 } 162 163 169 public URL getPersistenceUnitRootUrl(){ 170 return persistenceUnitRootUrl; 171 } 172 173 public void setPersistenceUnitRootUrl(URL persistenceUnitRootUrl){ 174 this.persistenceUnitRootUrl = persistenceUnitRootUrl; 175 } 176 177 183 public List <String > getManagedClassNames(){ 184 return managedClassNames; 185 } 186 187 public void setManagedClassNames(List <String > managedClassNames){ 188 this.managedClassNames = managedClassNames; 189 } 190 197 public boolean excludeUnlistedClasses(){ 198 return excludeUnlistedClasses; 199 } 200 201 public void setExcludeUnlistedClasses(boolean excludeUnlistedClasses){ 202 this.excludeUnlistedClasses = excludeUnlistedClasses; 203 } 204 208 public Properties getProperties(){ 209 return properties; 210 } 211 212 public void setProperties(Properties properties){ 213 this.properties = properties; 214 } 215 219 public ClassLoader getClassLoader(){ 220 return realClassLoader; 221 } 222 236 public void addTransformer(ClassTransformer transformer){ 237 } 239 240 251 public ClassLoader getNewTempClassLoader(){ 252 return tempClassLoader; 253 } 254 255 public void setNewTempClassLoader(ClassLoader loader){ 256 this.tempClassLoader = loader; 257 } 258 259 public void setClassLoader(ClassLoader loader) { 260 this.realClassLoader = loader; 261 } 262 } | Popular Tags |