jakarta.persistence.spi.PersistenceUnitInfo interface,
used to bootstrap an EntityManagerFactory in a container.
This implementation is largely a JavaBean, offering mutators
for all standard PersistenceUnitInfo properties.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final List | |
| private DataSource | |
| private final List | |
| private final List | |
| private final List | |
| private DataSource | |
| private String | |
| private String | |
| private String | |
| private URL | |
| private String | |
| private Properties | |
| private SharedCacheMode | |
| private PersistenceUnitTransactionType | |
| private ValidationMode |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addManagedClassName(String managedClassName)
Add a managed class name to the persistence provider's metadata. |
| public void | |
| public void | |
| public void | |
| public void | addTransformer(ClassTransformer
provider-supplied transformer that the
container invokes at class-(re)definition time classTransformer)Implements jakarta. This implementation throws an UnsupportedOperationException. |
| public boolean | excludeUnlistedClasses()
Implements jakarta. 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. |
| public ClassLoader | getClassLoader()
Implements jakarta. This implementation returns the default ClassLoader. |
| public List | getJarFileUrls()
Implements jakarta. 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. |
| public DataSource | getJtaDataSource()
Implements jakarta. Returns the JTA-enabled data source to be used by the persistence provider. |
| public List | getManagedClassNames()
Implements jakarta. Returns the list of the names of the classes that the persistence provider must add to its set of managed classes. |
| public List | getManagedPackages()
Implements org. Return a list of managed Java packages, to be introspected by the persistence provider. |
| public List | getMappingFileNames()
Implements jakarta. Returns the list of the names of the mapping files that the persistence provider must load to determine the mappings for the entity classes. |
| public ClassLoader | getNewTempClassLoader()
Implements jakarta. This implementation throws an UnsupportedOperationException. |
| public DataSource | getNonJtaDataSource()
Implements jakarta. Returns the non-JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA transaction. |
| public String | getPersistenceProviderClassName()
Implements jakarta. Returns the fully qualified name of the persistence provider implementation class. |
| public String | |
| public String | getPersistenceUnitName()
Implements jakarta. Returns the name of the persistence unit. |
| public URL | getPersistenceUnitRootUrl()
Implements jakarta. Returns the URL for the jar file or directory that is the root of the persistence unit. |
| public String | getPersistenceXMLSchemaVersion()
Implements jakarta. Returns the schema version of the |
| public Properties | getProperties()
Implements jakarta. Returns a properties object. |
| public SharedCacheMode | getSharedCacheMode()
Implements jakarta. Returns the specification of how the provider must use a second-level cache for the persistence unit. |
| public PersistenceUnitTransactionType | getTransactionType()
Implements jakarta. Returns the transaction type of the entity managers created by
the |
| public ValidationMode | getValidationMode()
Implements jakarta. Returns the validation mode to be used by the persistence provider for the persistence unit. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setPersistenceProviderPackageName(String persistenceProviderPackageName)
Implements org. Set the persistence provider's own package name, for exclusion from class transformation. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public String |
| excludeUnlistedClasses | back to summary |
|---|---|
| private boolean excludeUnlistedClasses | |
| jarFileUrls | back to summary |
|---|---|
| private final List<URL> jarFileUrls | |
| jtaDataSource | back to summary |
|---|---|
| private DataSource jtaDataSource
| |
| managedClassNames | back to summary |
|---|---|
| private final List<String> managedClassNames | |
| managedPackages | back to summary |
|---|---|
| private final List<String> managedPackages | |
| mappingFileNames | back to summary |
|---|---|
| private final List<String> mappingFileNames | |
| nonJtaDataSource | back to summary |
|---|---|
| private DataSource nonJtaDataSource
| |
| persistenceProviderClassName | back to summary |
|---|---|
| private String persistenceProviderClassName
| |
| persistenceProviderPackageName | back to summary |
|---|---|
| private String persistenceProviderPackageName
| |
| persistenceUnitName | back to summary |
|---|---|
| private String persistenceUnitName
| |
| persistenceUnitRootUrl | back to summary |
|---|---|
| private URL persistenceUnitRootUrl
| |
| persistenceXMLSchemaVersion | back to summary |
|---|---|
| private String persistenceXMLSchemaVersion | |
| properties | back to summary |
|---|---|
| private Properties properties | |
| sharedCacheMode | back to summary |
|---|---|
| private SharedCacheMode sharedCacheMode | |
| transactionType | back to summary |
|---|---|
| private PersistenceUnitTransactionType transactionType
| |
| validationMode | back to summary |
|---|---|
| private ValidationMode validationMode | |
| MutablePersistenceUnitInfo | back to summary |
|---|---|
| public MutablePersistenceUnitInfo() | |
| addJarFileUrl | back to summary |
|---|---|
| public void addJarFileUrl(URL jarFileUrl) | |
| addManagedClassName | back to summary |
|---|---|
| public void addManagedClassName(String managedClassName) Add a managed class name to the persistence provider's metadata. | |
| addManagedPackage | back to summary |
|---|---|
| public void addManagedPackage(String packageName) Add a managed package to the persistence provider's metadata. Note This refers to annotated
| |
| addMappingFileName | back to summary |
|---|---|
| public void addMappingFileName(String mappingFileName) | |
| addProperty | back to summary |
|---|---|
| public void addProperty(String name, String value) | |
| addTransformer | back to summary |
|---|---|
| public void addTransformer(ClassTransformer classTransformer) Implements jakarta. This implementation throws an UnsupportedOperationException.
| |
| excludeUnlistedClasses | back to summary |
|---|---|
| public boolean excludeUnlistedClasses() Implements jakarta. Doc from jakarta. 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. This value corresponds to the
| |
| getClassLoader | back to summary |
|---|---|
| public ClassLoader getClassLoader() Implements jakarta. This implementation returns the default ClassLoader.
| |
| getJarFileUrls | back to summary |
|---|---|
| public List Implements jakarta. Doc from jakarta. 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. Each URL
corresponds to a | |
| getJtaDataSource | back to summary |
|---|---|
| public DataSource getJtaDataSource() Implements jakarta. Doc from jakarta. Returns the JTA-enabled data source to be used by the
persistence provider. The data source corresponds to the
| |
| getManagedClassNames | back to summary |
|---|---|
| public List Implements jakarta. Doc from jakarta. Returns the list of the names of the classes that the
persistence provider must add to its set of managed
classes. Each name corresponds to a named | |
| getManagedPackages | back to summary |
|---|---|
| public List Implements org. Doc from org. Return a list of managed Java packages, to be introspected by the persistence provider.
Typically found through scanning but not exposable through | |
| getMappingFileNames | back to summary |
|---|---|
| public List Implements jakarta. Doc from jakarta. Returns the list of the names of the mapping files that the
persistence provider must load to determine the mappings for
the entity classes. The mapping files must be in the standard
XML mapping format, be uniquely named and be resource-loadable
from the application classpath. Each mapping file name
corresponds to a | |
| getNewTempClassLoader | back to summary |
|---|---|
| public ClassLoader getNewTempClassLoader() Implements jakarta. This implementation throws an UnsupportedOperationException.
| |
| getNonJtaDataSource | back to summary |
|---|---|
| public DataSource getNonJtaDataSource() Implements jakarta. Doc from jakarta. Returns the non-JTA-enabled data source to be used by the
persistence provider for accessing data outside a JTA
transaction. The data source corresponds to the named
| |
| getPersistenceProviderClassName | back to summary |
|---|---|
| public String getPersistenceProviderClassName() Implements jakarta. Doc from jakarta. Returns the fully qualified name of the persistence provider
implementation class. Corresponds to the | |
| getPersistenceProviderPackageName | back to summary |
|---|---|
public String getPersistenceProviderPackageName()
| |
| getPersistenceUnitName | back to summary |
|---|---|
| public String getPersistenceUnitName() Implements jakarta. Doc from jakarta. Returns the name of the persistence unit. Corresponds to the
| |
| getPersistenceUnitRootUrl | back to summary |
|---|---|
| public URL getPersistenceUnitRootUrl() Implements jakarta. Doc from jakarta. Returns the URL for the jar file or directory that is the root of the persistence unit. (If the persistence unit is rooted in the WEB-INF/classes directory, this will be the URL of that directory.) The 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. | |
| getPersistenceXMLSchemaVersion | back to summary |
|---|---|
| public String getPersistenceXMLSchemaVersion() Implements jakarta. Doc from jakarta. Returns the schema version of the | |
| getProperties | back to summary |
|---|---|
| public Properties getProperties() Implements jakarta. Doc from jakarta. Returns a properties object. Each property corresponds to a
| |
| getSharedCacheMode | back to summary |
|---|---|
| public SharedCacheMode getSharedCacheMode() Implements jakarta. Doc from jakarta. Returns the specification of how the provider must use
a second-level cache for the persistence unit.
The result of this method corresponds to the
| |
| getTransactionType | back to summary |
|---|---|
| public PersistenceUnitTransactionType getTransactionType() Implements jakarta. Doc from jakarta. Returns the transaction type of the entity managers created by
the
| |
| getValidationMode | back to summary |
|---|---|
| public ValidationMode getValidationMode() Implements jakarta. Doc from jakarta. Returns the validation mode to be used by the persistence
provider for the persistence unit. The validation mode
corresponds to the
| |
| setExcludeUnlistedClasses | back to summary |
|---|---|
| public void setExcludeUnlistedClasses(boolean excludeUnlistedClasses) | |
| setJtaDataSource | back to summary |
|---|---|
| public void setJtaDataSource(DataSource jtaDataSource) | |
| setNonJtaDataSource | back to summary |
|---|---|
| public void setNonJtaDataSource(DataSource nonJtaDataSource) | |
| setPersistenceProviderClassName | back to summary |
|---|---|
| public void setPersistenceProviderClassName(String persistenceProviderClassName) | |
| setPersistenceProviderPackageName | back to summary |
|---|---|
| public void setPersistenceProviderPackageName(String persistenceProviderPackageName) Implements org. Set the persistence provider's own package name, for exclusion from class transformation.
| |
| setPersistenceUnitName | back to summary |
|---|---|
| public void setPersistenceUnitName(String persistenceUnitName) | |
| setPersistenceUnitRootUrl | back to summary |
|---|---|
| public void setPersistenceUnitRootUrl(URL persistenceUnitRootUrl) | |
| setPersistenceXMLSchemaVersion | back to summary |
|---|---|
| public void setPersistenceXMLSchemaVersion(String persistenceXMLSchemaVersion) | |
| setProperties | back to summary |
|---|---|
| public void setProperties(Properties properties) | |
| setSharedCacheMode | back to summary |
|---|---|
| public void setSharedCacheMode(SharedCacheMode sharedCacheMode) | |
| setTransactionType | back to summary |
|---|---|
| public void setTransactionType(PersistenceUnitTransactionType transactionType) | |
| setValidationMode | back to summary |
|---|---|
| public void setValidationMode(ValidationMode validationMode) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |