addClass(String className) Adds a class that the persistence provider must add it to its set of
managed classes.
public void
addJarFile(URL jarFile) Adds a jar file to the list of JAR file URLs that the persistence
provider must look in to find the entity classes that must be managed by
EntityManagers of this name.
addTransformer(ClassTransformer transformer) Add a transformer supplied by the provider that will be called for every
new class definition or class redefinition that gets loaded by the loader
returned by the PersistenceInfo.getClassLoader method.
public boolean
excludeUnlistedClasses() Whether classes in the root of the persistence unit that have notbeen explicitly listed are to be included in the set of managedclasses.
getJarFiles() The list of JAR file URLs that the persistence provider must lookin to find the entity classes that must be managed byEntityManagers of this name.
getNonJtaDataSource() The non-JTA-enabled data source to be used by the persistenceprovider when outside the container, or inside the container whenaccessing data outside the global transaction.
setExcludeUnlistedClasses(boolean excludeUnlistedClasses) Sets the boolean defining if the persistence unit that have not been
explicitly listed are to be included in the set of managed classes.
setTransactionType(PersistenceUnitTransactionType transactionType) Sets the transaction type of the entity managers created by the
EntityManagerFactory.
Adds a jar file to the list of JAR file URLs that the persistence
provider must look in to find the entity classes that must be managed by
EntityManagers of this name.
Parameters: jarFile - URL of the jar file
addMappingFileName
public void addMappingFileName(String mappingFileName)(Code)
Adds a filename to the list of mapping file names.
Parameters: mappingFileName - name of the mapping file to add.
addTransformer
public void addTransformer(ClassTransformer transformer)(Code)
Add a transformer supplied by the provider that will be called for every
new class definition or class redefinition that gets loaded by the loader
returned by the PersistenceInfo.getClassLoader method. The transformer
has no effect on the result returned by the
PersistenceInfo.getTempClassLoader method. Classes are only transformed
once within the same classloading scope, regardless of how many
persistence units they may be a part of.
Parameters: transformer - A provider-supplied transformer that the Containerinvokes at class-(re)definition time
Whether classes in the root of the persistence unit that have notbeen explicitly listed are to be included in the set of managedclasses. This value corresponds to the<exclude-unlisted-classes> element in the persistence.xmlfile.
The list of JAR file URLs that the persistence provider mustexamine for managed classes of the persistence unit. Each jarfile URL corresponds to a named <jar-file> element in thepersistence.xml file.
The list of JAR file URLs that the persistence provider must lookin to find the entity classes that must be managed byEntityManagers of this name. The persistence archive jar itselfwill always be the last entry in the list. Each jar file URLcorresponds to a named <jar-file> element inpersistence.xml
the JTA-enabled data source to be used by the persistenceprovider. The data source corresponds to the named<jta-data-source> element in persistence.xml
The list of the names of the classes that the persistenceprovider must add it to its set of managed classes. Each namecorresponds to a named <class> element in thepersistence.xml file.
The list of mapping file names that the persistence provider mustload to determine the mappings for the entity classes. Themapping files must be in the standard XML mapping format, beuniquely named and be resource-loadable from the applicationclasspath. This list will not include the entity-mappings.xmlfile if one was specified. Each mapping file name corresponds toa <mapping-file> element in persistence.xml
Return a new instance of a ClassLoader that the provider may use to
temporarily load any classes, resources, or open URLs. The scope and
classpath of this loader is exactly the same as that of the loader
returned by PersistenceInfo.getClassLoader. None of the classes loaded by
this class loader will be visible to application components. The
container does not use or maintain references to this class loader after
returning it to the provider.
Temporary ClassLoader with same visibility as current loader
The non-JTA-enabled data source to be used by the persistenceprovider when outside the container, or inside the container whenaccessing data outside the global transaction. The data sourcecorresponds to the named <non-jta-data-source> element inpersistence.xml
The URL for the jar file or directory that is the root of thepersistence unit. (If the persistence unit is rooted in theWEB-INF/classes directory, this will be the URL of thatdirectory.)
URL object that points to the persistence.xml file; useful forproviders that may need to re-read the persistence.xml file. Ifno persistence.xml file is present in the persistence archive,null is returned.
Properties object that may contain vendor-specific propertiescontained in the persistence.xml file. Each property correspondsto a <property> element in persistence.xml
getTransactionType
public PersistenceUnitTransactionType getTransactionType()(Code)
The transaction type of the entity managers created by theEntityManagerFactory. The transaction type corresponds to thetransaction-type attribute in the persistence.xml file.
Sets the classloader.
Parameters: classLoader - that the provider may use to load any classes,resources, or open URLs.
setExcludeUnlistedClasses
public void setExcludeUnlistedClasses(boolean excludeUnlistedClasses)(Code)
Sets the boolean defining if the persistence unit that have not been
explicitly listed are to be included in the set of managed classes.
Parameters: excludeUnlistedClasses - true/false
Sets the properties use by this unit.
Parameters: properties - object with key/value.
setTransactionType
public void setTransactionType(PersistenceUnitTransactionType transactionType)(Code)
Sets the transaction type of the entity managers created by the
EntityManagerFactory.
Parameters: transactionType - The transaction type corresponds to thetransaction-type attribute in the persistence.xml file.