| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface PersistenceUnitInfo
Interface implemented by the container and used by the
 persistence provider when creating an EntityManagerFactory.
| Method Summary | |
|---|---|
 void | 
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 PersistenceUnitInfo#getClassLoader method. | 
 boolean | 
excludeUnlistedClasses()
Returns whether classes in the root of the persistence unit that have not been explicitly listed are to be included in the set of managed classes.  | 
 java.lang.ClassLoader | 
getClassLoader()
Returns ClassLoader that the provider may use to load any classes, resources, or open URLs.  | 
 java.util.List<java.net.URL> | 
getJarFileUrls()
Returns a list of URLs for the jar files or exploded jar file directories that the persistence provider must examine for managed classes of the persistence unit.  | 
 javax.sql.DataSource | 
getJtaDataSource()
Returns the JTA-enabled data source to be used by the persistence provider.  | 
 java.util.List<java.lang.String> | 
getManagedClassNames()
Returns the list of the names of the classes that the persistence provider must add to its set of managed classes.  | 
 java.util.List<java.lang.String> | 
getMappingFileNames()
Returns the list of the names of the mapping files that the persistence provider must load to determine the mappings for the entity classes.  | 
 java.lang.ClassLoader | 
getNewTempClassLoader()
Return a new instance of a ClassLoader that the provider may use to temporarily load any classes, resources, or open URLs.  | 
 javax.sql.DataSource | 
getNonJtaDataSource()
Returns the non-JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA transaction.  | 
 java.lang.String | 
getPersistenceProviderClassName()
Returns the fully qualified name of the persistence provider implementation class.  | 
 java.lang.String | 
getPersistenceUnitName()
Returns the name of the persistence unit.  | 
 java.net.URL | 
getPersistenceUnitRootUrl()
Returns the URL for the jar file or directory that is the root of the persistence unit.  | 
 java.lang.String | 
getPersistenceXMLSchemaVersion()
Returns the schema version of the persistence.xml file. | 
 java.util.Properties | 
getProperties()
Returns a properties object.  | 
 SharedCacheMode | 
getSharedCacheMode()
Returns the specification of how the provider must use a second-level cache for the persistence unit.  | 
 PersistenceUnitTransactionType | 
getTransactionType()
Returns the transaction type of the entity managers created by the EntityManagerFactory. | 
 ValidationMode | 
getValidationMode()
Returns the validation mode to be used by the persistence provider for the persistence unit.  | 
| Method Detail | 
|---|
java.lang.String getPersistenceUnitName()
name attribute in the persistence.xml file.
- Returns:
 - the name of the persistence unit
 
 
java.lang.String getPersistenceProviderClassName()
provider element in
 the persistence.xml file.
PersistenceUnitTransactionType getTransactionType()
EntityManagerFactory. The transaction type corresponds to
 the transaction-type attribute in the persistence.xml file.
javax.sql.DataSource getJtaDataSource()
jta-data-source element in the persistence.xml file or is
 provided at deployment or by the container.
javax.sql.DataSource getNonJtaDataSource()
non-jta-data-source element in the persistence.xml file or
 provided at deployment or by the container.
java.util.List<java.lang.String> getMappingFileNames()
mapping-file element in the
 persistence.xml file.
java.util.List<java.net.URL> getJarFileUrls()
jar-file element in the
 persistence.xml file. A URL will either be a 
 file: URL referring to a jar file or referring to a directory
 that contains an exploded jar file, or some other URL from
 which an InputStream in jar format can be obtained.
java.net.URL getPersistenceUnitRootUrl()
java.util.List<java.lang.String> getManagedClassNames()
class element in the
 persistence.xml file.
boolean excludeUnlistedClasses()
exclude-unlisted-classes element in the persistence.xml file.
SharedCacheMode getSharedCacheMode()
shared-cache-mode
 element in the persistence.xml file.
ValidationMode getValidationMode()
validation-mode element in the
 persistence.xml file.
java.util.Properties getProperties()
property element in the persistence.xml file.
java.lang.String getPersistenceXMLSchemaVersion()
persistence.xml file.
java.lang.ClassLoader getClassLoader()
void addTransformer(ClassTransformer transformer)
PersistenceUnitInfo#getClassLoader method. The transformer 
 has no effect on the result returned by the
 PersistenceUnitInfo#getNewTempClassLoader method.
 Classes are only transformed once within the same classloading
 scope, regardless of how many persistence units they may be 
 a part of.
transformer - provider-supplied transformer that the
 container invokes at class-(re)definition timejava.lang.ClassLoader getNewTempClassLoader()
PersistenceUnitInfo#getClassLoader. None of the classes loaded
 by this class loader will be visible to application
 components. The provider may only use this ClassLoader within
 the scope of the PersistenceProvider#createContainerEntityManagerFactory call.
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 10-February-2011 12:41