Example usage for Java org.hibernate.cfg Configuration fields, constructors, methods, implement or subclass
The text is from its open source code.
Configuration | addAnnotatedClass(Class annotatedClass) Read metadata from the annotations associated with this class. |
void | addAuxiliaryDatabaseObject(AuxiliaryDatabaseObject object) |
Configuration | addCacheableFile(File xmlFile) Add a cached mapping file. |
Configuration | addCacheableFile(String xmlFile) Add a cacheable mapping file. |
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 | addDirectory(File dir) Read all mapping documents from a directory tree. |
Configuration | addFile(String xmlFile) Read mappings from a particular XML file |
Configuration | addFile(File xmlFile) Read mappings from a particular XML file |
Configuration | addInputStream(InputStream xmlInputStream) Read mappings from an java.io.InputStream . |
Configuration | addJar(File jar) Read all mappings from a jar file Assumes that any file named *.hbm.xml is a mapping document. |
Configuration | addPackage(String packageName) Read package-level metadata. |
Configuration | addProperties(Properties properties) Add the given properties to ours. |
Configuration | addResource(String resourceName) Read mappings as a application resourceName (i.e. |
Configuration | addResource(String resourceName, ClassLoader classLoader) |
void | addSqlFunction(String functionName, SQLFunction function) |
Configuration | addURL(URL url) Read mappings from a URL |
Configuration | addXML(String xml) |
void | buildMappings() |
SessionFactory | buildSessionFactory() Create a SessionFactory using the properties and mappings in this configuration. |
SessionFactory | buildSessionFactory(ServiceRegistry serviceRegistry) Create a SessionFactory using the properties and mappings in this configuration. |
Configuration | configure(String resource) Use the mappings and properties specified in the given application resource. |
Configuration | configure(URL url) Use the mappings and properties specified in the given document. |
Configuration | configure(File configFile) Use the mappings and properties specified in the given application file. |
Configuration | configure(org.w3c.dom.Document document) |
Configuration | configure() Use the mappings and properties specified in an application resource named hibernate.cfg.xml. |
EntityTuplizerFactory | getEntityTuplizerFactory() |
Map | getNamedQueries() |
Map | getNamedSQLQueries() |
Properties | getProperties() Get all properties |
String | getProperty(String propertyName) Get a property value by name |
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 | registerTypeOverride(UserType type, String[] keys) |
Configuration | registerTypeOverride(CompositeUserType type, String[] keys) |
Configuration | registerTypeOverride(BasicType type) Allows registration of a type into the type registry. |
void | setImplicitNamingStrategy(ImplicitNamingStrategy implicitNamingStrategy) |
Configuration | setInterceptor(Interceptor interceptor) Set the current Interceptor |
void | setPhysicalNamingStrategy(PhysicalNamingStrategy physicalNamingStrategy) |
Configuration | setProperties(Properties properties) Specify a completely new set of properties |
Configuration | setProperty(String propertyName, String value) Set a property value by name |
void | setSessionFactoryObserver(SessionFactoryObserver sessionFactoryObserver) |