public interface PersistenceUnitConfig
Modifier and Type | Method and Description |
---|---|
PersistenceUnitConfig |
addJarFileUrls(URL url,
URL... urls)
Specifies URLs for any jar files or exploded jar file directories that the persistence provider must
examine for managed classes of the persistence unit.
|
PersistenceUnitConfig |
addMappingFileNames(String fileName,
String... fileNames)
Specifies any mapping files that must be loaded to determine the mappings
for the entity classes.
|
PersistenceUnitConfig |
setExcludeUnlistedClasses(boolean excludeUnlistedClasses)
Specifies 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.
|
PersistenceUnitConfig |
setProperty(String property,
String value)
Specifies a property value to be used by the persistence provider for the persistence unit.
|
PersistenceUnitConfig |
setSharedCacheMode(javax.persistence.SharedCacheMode sharedCacheMode)
Specifies how the provider must use a second-level cache for the persistence unit.
|
PersistenceUnitConfig |
setValidationMode(javax.persistence.ValidationMode validationMode)
Specifies the validation mode to be used by the persistence provider for the persistence unit.
|
PersistenceUnitConfig setExcludeUnlistedClasses(boolean excludeUnlistedClasses)
excludeUnlistedClasses
- whether classes in the root of the persistence unit that have not been
explicitly listed are to be included in the set of managed classesPersistenceUnitConfig setSharedCacheMode(javax.persistence.SharedCacheMode sharedCacheMode)
SharedCacheMode.UNSPECIFIED
is used by default.sharedCacheMode
- the second-level cache mode that must be used by the provider for the persistence unitPersistenceUnitConfig setValidationMode(javax.persistence.ValidationMode validationMode)
ValidationMode.AUTO
is used by default.validationMode
- the validation mode to be used by the persistence provider for the persistence unitPersistenceUnitConfig addMappingFileNames(String fileName, String... fileNames)
fileName
- mapping file name that the persistence provider must load to determine the
mappings for the entity classesfileNames
- list of any additional mapping file names that the persistence provider must
load to determine the mappings for the entity classesPersistenceUnitConfig addJarFileUrls(URL url, URL... urls)
url
- URL object referring to a jar file or directoryurls
- list of any additional URL objects referring to jar files or directoriesPersistenceUnitConfig setProperty(String property, String value)
property
- property namevalue
- the value to be used by the persistence provider for the persistence unitCopyright © 2016. All rights reserved.