Package | Description |
---|---|
org.hibernate.cfg |
This package defines APIs for configuring Hibernate, and classes
for building the Hibernate configuration-time metamodel.
|
Modifier and Type | Method and Description |
---|---|
Configuration |
Configuration.addAnnotatedClass(Class annotatedClass)
Read metadata from the annotations associated with this class.
|
Configuration |
Configuration.addCacheableFile(File xmlFile)
Add a cached mapping file.
|
Configuration |
Configuration.addCacheableFile(String xmlFile)
Add a cacheable mapping file.
|
Configuration |
Configuration.addCacheableFileStrictly(File xmlFile)
INTENDED FOR TESTSUITE USE ONLY!
Much like
addCacheableFile(File) except that here we will fail immediately if
the cache version cannot be found or used for whatever reason |
Configuration |
Configuration.addClass(Class persistentClass)
Read a mapping as an application resource using the convention that a class
named foo.bar.Foo is mapped by a file foo/bar/Foo.hbm.xml
which can be resolved as a classpath resource.
|
Configuration |
Configuration.addDirectory(File dir)
Read all mapping documents from a directory tree.
|
Configuration |
Configuration.addDocument(Document doc)
Deprecated.
Use addURL, addResource, addFile, etc. instead
|
Configuration |
Configuration.addFile(File xmlFile)
Read mappings from a particular XML file
|
Configuration |
Configuration.addFile(String xmlFile)
Read mappings from a particular XML file
|
Configuration |
Configuration.addInputStream(InputStream xmlInputStream)
Read mappings from an
InputStream . |
Configuration |
Configuration.addJar(File jar)
Read all mappings from a jar file
Assumes that any file named *.hbm.xml is a mapping document.
|
Configuration |
Configuration.addPackage(String packageName)
Read package-level metadata.
|
Configuration |
Configuration.addProperties(Properties properties)
Add the given properties to ours.
|
Configuration |
Configuration.addResource(String resourceName)
Read mappings as a application resourceName (i.e.
|
Configuration |
Configuration.addResource(String resourceName,
ClassLoader classLoader)
Deprecated.
This form (accepting a ClassLoader) is no longer supported. Instead, add the ClassLoader
to the ClassLoaderService on the ServiceRegistry associated with this Configuration
|
Configuration |
Configuration.addURL(URL url)
Read mappings from a URL
|
Configuration |
Configuration.addXML(String xml)
Deprecated.
No longer supported
|
protected Configuration |
ExternalSessionFactoryConfig.buildConfiguration() |
Configuration |
Configuration.configure()
Use the mappings and properties specified in an application resource named hibernate.cfg.xml.
|
Configuration |
Configuration.configure(Document document)
Deprecated.
No longer supported.
|
Configuration |
Configuration.configure(File configFile)
Use the mappings and properties specified in the given application file.
|
Configuration |
Configuration.configure(String resource)
Use the mappings and properties specified in the given application resource.
|
Configuration |
Configuration.configure(URL url)
Use the mappings and properties specified in the given document.
|
Configuration |
Configuration.mergeProperties(Properties properties)
Adds the incoming properties to the internal properties structure, as long as the internal structure does not
already contain an entry for the given key.
|
Configuration |
Configuration.registerTypeContributor(TypeContributor typeContributor) |
Configuration |
Configuration.registerTypeOverride(BasicType type)
Allows registration of a type into the type registry.
|
Configuration |
Configuration.registerTypeOverride(CompositeUserType type,
String[] keys) |
Configuration |
Configuration.registerTypeOverride(UserType type,
String[] keys) |
Configuration |
Configuration.setInterceptor(Interceptor interceptor)
Set the current
Interceptor |
Configuration |
Configuration.setProperties(Properties properties)
Specify a completely new set of properties
|
Configuration |
Configuration.setProperty(String propertyName,
String value)
Set a property value by name
|
Copyright © 2021 JBoss by Red Hat. All rights reserved.