@Retention(value=RUNTIME) public @interface PersistenceUnitDefinition
| Modifier and Type | Required Element and Description |
|---|---|
String |
unitName
Returns the name of the persistence unit.
|
| Modifier and Type | Optional Element and Description |
|---|---|
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.
|
String[] |
jarFileUrls
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.
|
String |
jtaDataSourceName
Returns the JTA-enabled data source to be used by the
persistence provider.
|
Class<?>[] |
managedClasses
Returns the list of the classes that the
persistence provider must add to its set of managed
classes.
|
String[] |
managedClassNames
Returns the list of the names of the classes that the
persistence provider must add to its set of managed
classes.
|
String[] |
mappingFileNames
Returns the list of the names of the mapping files that the
persistence provider must load to determine the mappings for
the entity classes.
|
String |
nonJtaDataSourceName
Returns the non-JTA-enabled data source to be used by the
persistence provider for accessing data outside a JTA
transaction.
|
PersistenceUnitDefinition.Property[] |
properties
Returns a properties object.
|
String |
providerClassName
Returns the fully qualified name of the persistence provider
implementation class.
|
javax.persistence.SharedCacheMode |
sharedCacheMode
Returns the specification of how the provider must use
a second-level cache for the persistence unit.
|
javax.persistence.spi.PersistenceUnitTransactionType |
transactionType
Returns the transaction type of the entity managers created by
the
EntityManagerFactory. |
String |
unitRootUrl
Returns the URL for the jar file or directory that is the
root of the persistence unit.
|
javax.persistence.ValidationMode |
validationMode
Returns the validation mode to be used by the persistence
provider for the persistence unit.
|
String |
xmlSchemaVersion
Returns the schema version of the
persistence.xml file. |
public abstract String unitName
name attribute in the persistence.xml file.public abstract String providerClassName
provider element in
the persistence.xml file.public abstract javax.persistence.spi.PersistenceUnitTransactionType transactionType
EntityManagerFactory. The transaction type corresponds to
the transaction-type attribute in the persistence.xml file.public abstract String jtaDataSourceName
jta-data-source element in the persistence.xml file or is
provided at deployment or by the container.public abstract String nonJtaDataSourceName
non-jta-data-source element in the persistence.xml file or
provided at deployment or by the container.public abstract String[] mappingFileNames
mapping-file element in the
persistence.xml file.public abstract String[] jarFileUrls
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.public abstract String unitRootUrl
public abstract Class<?>[] managedClasses
class element in the
persistence.xml file.public abstract String[] managedClassNames
class element in the
persistence.xml file.public abstract boolean excludeUnlistedClasses
exclude-unlisted-classes element in the persistence.xml file.public abstract javax.persistence.SharedCacheMode sharedCacheMode
shared-cache-mode
element in the persistence.xml file.public abstract javax.persistence.ValidationMode validationMode
validation-mode element in the
persistence.xml file.public abstract PersistenceUnitDefinition.Property[] properties
property element in the persistence.xml file
or to a property set by the container.public abstract String xmlSchemaVersion
persistence.xml file.Copyright © 2018–2022 Codegeny. All rights reserved.