Java Doc for SessionFactory.java in  » Database-ORM » hibernate » org » hibernate » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » hibernate » org.hibernate 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.hibernate.SessionFactory

All known Subclasses:   org.hibernate.impl.SessionFactoryImpl,  org.hibernate.jmx.SessionFactoryStub,
SessionFactory
public interface SessionFactory extends Referenceable,Serializable(Code)
Creates Sessions. Usually an application has a single SessionFactory. Threads servicing client requests obtain Sessions from the factory.

Implementors must be threadsafe.

SessionFactorys are immutable. The behaviour of a SessionFactory is controlled by properties supplied at configuration time. These properties are defined on Environment.
See Also:   Session
See Also:   org.hibernate.cfg.Environment
See Also:   org.hibernate.cfg.Configuration
See Also:   org.hibernate.connection.ConnectionProvider
See Also:   org.hibernate.transaction.TransactionFactory
author:
   Gavin King




Method Summary
public  voidclose()
     Destroy this SessionFactory and release all resources (caches, connection pools, etc).
public  voidevict(Class persistentClass)
     Evict all entries from the second-level cache.
public  voidevict(Class persistentClass, Serializable id)
     Evict an entry from the second-level cache.
public  voidevictCollection(String roleName)
     Evict all entries from the second-level cache.
public  voidevictCollection(String roleName, Serializable id)
     Evict an entry from the second-level cache.
public  voidevictEntity(String entityName)
     Evict all entries from the second-level cache.
public  voidevictEntity(String entityName, Serializable id)
     Evict an entry from the second-level cache.
public  voidevictQueries()
     Evict any query result sets cached in the default query cache region.
public  voidevictQueries(String cacheRegion)
     Evict any query result sets cached in the named query cache region.
public  MapgetAllClassMetadata()
    
public  MapgetAllCollectionMetadata()
    
public  ClassMetadatagetClassMetadata(Class persistentClass)
    
public  ClassMetadatagetClassMetadata(String entityName)
    
public  CollectionMetadatagetCollectionMetadata(String roleName)
    
public  org.hibernate.classic.SessiongetCurrentSession()
     Obtains the current session.
public  SetgetDefinedFilterNames()
     Obtain a set of the names of all filters defined on this SessionFactory.
public  FilterDefinitiongetFilterDefinition(String filterName)
     Obtain the definition of a filter by name.
Parameters:
  filterName - The name of the filter for which to obtain the definition.
public  StatisticsgetStatistics()
    
public  booleanisClosed()
    
public  org.hibernate.classic.SessionopenSession(Connection connection)
     Open a Session on the given connection.

Note that the second-level cache will be disabled if you supply a JDBC connection.

public  org.hibernate.classic.SessionopenSession(Interceptor interceptor)
     Create database connection and open a Session on it, specifying an interceptor.
public  org.hibernate.classic.SessionopenSession(Connection connection, Interceptor interceptor)
     Open a Session on the given connection, specifying an interceptor.

Note that the second-level cache will be disabled if you supply a JDBC connection.

public  org.hibernate.classic.SessionopenSession()
     Create database connection and open a Session on it.
public  StatelessSessionopenStatelessSession()
     Get a new stateless session.
public  StatelessSessionopenStatelessSession(Connection connection)
     Get a new stateless session for the given JDBC connection.



Method Detail
close
public void close() throws HibernateException(Code)
Destroy this SessionFactory and release all resources (caches, connection pools, etc). It is the responsibility of the application to ensure that there are no open Sessions before calling close().



evict
public void evict(Class persistentClass) throws HibernateException(Code)
Evict all entries from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.



evict
public void evict(Class persistentClass, Serializable id) throws HibernateException(Code)
Evict an entry from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.



evictCollection
public void evictCollection(String roleName) throws HibernateException(Code)
Evict all entries from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.



evictCollection
public void evictCollection(String roleName, Serializable id) throws HibernateException(Code)
Evict an entry from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.



evictEntity
public void evictEntity(String entityName) throws HibernateException(Code)
Evict all entries from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.



evictEntity
public void evictEntity(String entityName, Serializable id) throws HibernateException(Code)
Evict an entry from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.



evictQueries
public void evictQueries() throws HibernateException(Code)
Evict any query result sets cached in the default query cache region.



evictQueries
public void evictQueries(String cacheRegion) throws HibernateException(Code)
Evict any query result sets cached in the named query cache region.



getAllClassMetadata
public Map getAllClassMetadata() throws HibernateException(Code)
Get all ClassMetadata as a Map from entityname String to metadata object
See Also:   org.hibernate.metadata.ClassMetadata a map from String an entity name to ClassMetaData
since:
   3.0 changed key from Class to String



getAllCollectionMetadata
public Map getAllCollectionMetadata() throws HibernateException(Code)
Get all CollectionMetadata as a Map from role name to metadata object
See Also:   org.hibernate.metadata.CollectionMetadata a map from String to CollectionMetadata



getClassMetadata
public ClassMetadata getClassMetadata(Class persistentClass) throws HibernateException(Code)
Get the ClassMetadata associated with the given entity class
See Also:   org.hibernate.metadata.ClassMetadata



getClassMetadata
public ClassMetadata getClassMetadata(String entityName) throws HibernateException(Code)
Get the ClassMetadata associated with the given entity name
See Also:   org.hibernate.metadata.ClassMetadata
since:
   3.0



getCollectionMetadata
public CollectionMetadata getCollectionMetadata(String roleName) throws HibernateException(Code)
Get the CollectionMetadata associated with the named collection role
See Also:   org.hibernate.metadata.CollectionMetadata



getCurrentSession
public org.hibernate.classic.Session getCurrentSession() throws HibernateException(Code)
Obtains the current session. The definition of what exactly "current" means controlled by the org.hibernate.context.CurrentSessionContext impl configured for use.

Note that for backwards compatibility, if a org.hibernate.context.CurrentSessionContext is not configured but a JTA org.hibernate.transaction.TransactionManagerLookup is configured this will default to the org.hibernate.context.JTASessionContext impl. The current session.
throws:
  HibernateException - Indicates an issue locating a suitable current session.




getDefinedFilterNames
public Set getDefinedFilterNames()(Code)
Obtain a set of the names of all filters defined on this SessionFactory. The set of filter names.



getFilterDefinition
public FilterDefinition getFilterDefinition(String filterName) throws HibernateException(Code)
Obtain the definition of a filter by name.
Parameters:
  filterName - The name of the filter for which to obtain the definition. The filter definition.
throws:
  HibernateException - If no filter defined with the given name.



getStatistics
public Statistics getStatistics()(Code)
Get the statistics for this session factory



isClosed
public boolean isClosed()(Code)
Was this SessionFactory already closed?



openSession
public org.hibernate.classic.Session openSession(Connection connection)(Code)
Open a Session on the given connection.

Note that the second-level cache will be disabled if you supply a JDBC connection. Hibernate will not be able to track any statements you might have executed in the same transaction. Consider implementing your own ConnectionProvider.
Parameters:
  connection - a connection provided by the application. Session




openSession
public org.hibernate.classic.Session openSession(Interceptor interceptor) throws HibernateException(Code)
Create database connection and open a Session on it, specifying an interceptor.
Parameters:
  interceptor - a session-scoped interceptor Session
throws:
  HibernateException -



openSession
public org.hibernate.classic.Session openSession(Connection connection, Interceptor interceptor)(Code)
Open a Session on the given connection, specifying an interceptor.

Note that the second-level cache will be disabled if you supply a JDBC connection. Hibernate will not be able to track any statements you might have executed in the same transaction. Consider implementing your own ConnectionProvider.
Parameters:
  connection - a connection provided by the application.
Parameters:
  interceptor - a session-scoped interceptor Session




openSession
public org.hibernate.classic.Session openSession() throws HibernateException(Code)
Create database connection and open a Session on it. Session
throws:
  HibernateException -



openStatelessSession
public StatelessSession openStatelessSession()(Code)
Get a new stateless session.



openStatelessSession
public StatelessSession openStatelessSession(Connection connection)(Code)
Get a new stateless session for the given JDBC connection.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.