Java Doc for SessionFactoryImpl.java in  » Database-ORM » hibernate » org » hibernate » impl » 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.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.hibernate.impl.SessionFactoryImpl

SessionFactoryImpl
final public class SessionFactoryImpl implements SessionFactory,SessionFactoryImplementor(Code)
Concrete implementation of the SessionFactory interface. Has the following responsibilites
  • caches configuration settings (immutably)
  • caches "compiled" mappings ie. EntityPersisters and CollectionPersisters (immutable)
  • caches "compiled" queries (memory sensitive cache)
  • manages PreparedStatements
  • delegates JDBC Connection management to the ConnectionProvider
  • factory for instances of SessionImpl
This class must appear immutable to clients, even if it does all kinds of caching and pooling under the covers. It is crucial that the class is not only thread safe, but also highly concurrent. Synchronization must be used extremely sparingly.
See Also:   org.hibernate.connection.ConnectionProvider
See Also:   org.hibernate.classic.Session
See Also:   org.hibernate.hql.QueryTranslator
See Also:   org.hibernate.persister.entity.EntityPersister
See Also:   org.hibernate.persister.collection.CollectionPersister
author:
   Gavin King



Constructor Summary
public  SessionFactoryImpl(Configuration cfg, Mapping mapping, Settings settings, EventListeners listeners)
    

Method Summary
public  voidclose()
     Closes the session factory, releasing all held resources.
  1. cleans up used cache regions and "stops" the cache provider.
  2. close the JDBC connection
  3. remove the JNDI binding
Note: Be aware that the sessionfactory instance still can be a "heavy" object memory wise after close() has been called.
static  SessionFactoryImpldeserialize(ObjectInputStream ois)
     Custom deserialization hook used during Session deserialization.
public  voidevict(Class persistentClass, Serializable id)
    
public  voidevict(Class persistentClass)
    
public  voidevictCollection(String roleName, Serializable id)
    
public  voidevictCollection(String roleName)
    
public  voidevictEntity(String entityName, Serializable id)
    
public  voidevictEntity(String entityName)
    
public  voidevictQueries()
    
public  voidevictQueries(String cacheRegion)
    
public  MapgetAllClassMetadata()
    
public  MapgetAllCollectionMetadata()
    
public  MapgetAllSecondLevelCacheRegions()
    
public  BatcherFactorygetBatcherFactory()
    
public  ClassMetadatagetClassMetadata(Class persistentClass)
    
public  ClassMetadatagetClassMetadata(String entityName)
    
public  CollectionMetadatagetCollectionMetadata(String roleName)
    
public  CollectionPersistergetCollectionPersister(String role)
    
public  SetgetCollectionRolesByEntityParticipant(String entityName)
    
public  ConnectionProvidergetConnectionProvider()
    
public  org.hibernate.classic.SessiongetCurrentSession()
    
public  SetgetDefinedFilterNames()
    
public  DialectgetDialect()
    
public  EntityNotFoundDelegategetEntityNotFoundDelegate()
    
public  EntityPersistergetEntityPersister(String entityName)
    
public  EventListenersgetEventListeners()
    
public  FilterDefinitiongetFilterDefinition(String filterName)
    
public  IdentifierGeneratorgetIdentifierGenerator(String rootEntityName)
    
public  StringgetIdentifierPropertyName(String className)
    
public  TypegetIdentifierType(String className)
    
public  String[]getImplementors(String className)
     Return the names of all persistent (mapped) classes that extend or implement the given class or interface, accounting for implicit/explicit polymorphism settings and excluding mapped subclasses/joined-subclasses of other classes in the result.
public  StringgetImportedClassName(String className)
    
public  InterceptorgetInterceptor()
    
public  NamedQueryDefinitiongetNamedQuery(String queryName)
    
public  NamedSQLQueryDefinitiongetNamedSQLQuery(String queryName)
    
public  QueryCachegetQueryCache()
    
public  QueryCachegetQueryCache(String cacheRegion)
    
public  QueryPlanCachegetQueryPlanCache()
    
public  ReferencegetReference()
    
public  TypegetReferencedPropertyType(String className, String propertyName)
    
public  ResultSetMappingDefinitiongetResultSetMapping(String resultSetName)
    
public  String[]getReturnAliases(String queryString)
    
public  Type[]getReturnTypes(String queryString)
    
public  SQLExceptionConvertergetSQLExceptionConverter()
    
public  CachegetSecondLevelCacheRegion(String regionName)
    
public  SettingsgetSettings()
    
public  SQLFunctionRegistrygetSqlFunctionRegistry()
    
public  StatisticsgetStatistics()
    
public  StatisticsImplementorgetStatisticsImplementor()
    
public  TransactionFactorygetTransactionFactory()
    
public  TransactionManagergetTransactionManager()
    
public  UpdateTimestampsCachegetUpdateTimestampsCache()
    
public  booleanisClosed()
    
public  org.hibernate.classic.SessionopenSession(Connection connection, Interceptor sessionLocalInterceptor)
    
public  org.hibernate.classic.SessionopenSession(Interceptor sessionLocalInterceptor)
    
public  org.hibernate.classic.SessionopenSession(Connection connection)
    
public  org.hibernate.classic.SessionopenSession()
    
public  org.hibernate.classic.SessionopenSession(Connection connection, boolean flushBeforeCompletionEnabled, boolean autoCloseSessionEnabled, ConnectionReleaseMode connectionReleaseMode)
    
public  StatelessSessionopenStatelessSession()
    
public  StatelessSessionopenStatelessSession(Connection connection)
    
public  org.hibernate.classic.SessionopenTemporarySession()
    
 voidserialize(ObjectOutputStream oos)
     Custom serialization hook used during Session serialization.


Constructor Detail
SessionFactoryImpl
public SessionFactoryImpl(Configuration cfg, Mapping mapping, Settings settings, EventListeners listeners) throws HibernateException(Code)




Method Detail
close
public void close() throws HibernateException(Code)
Closes the session factory, releasing all held resources.
  1. cleans up used cache regions and "stops" the cache provider.
  2. close the JDBC connection
  3. remove the JNDI binding
Note: Be aware that the sessionfactory instance still can be a "heavy" object memory wise after close() has been called. Thus it is important to not keep referencing the instance to let the garbage collector release the memory.



deserialize
static SessionFactoryImpl deserialize(ObjectInputStream ois) throws IOException, ClassNotFoundException(Code)
Custom deserialization hook used during Session deserialization.
Parameters:
  ois - The stream from which to "read" the factory
throws:
  IOException -



evict
public void evict(Class persistentClass, Serializable id) throws HibernateException(Code)



evict
public void evict(Class persistentClass) throws HibernateException(Code)



evictCollection
public void evictCollection(String roleName, Serializable id) throws HibernateException(Code)



evictCollection
public void evictCollection(String roleName) throws HibernateException(Code)



evictEntity
public void evictEntity(String entityName, Serializable id) throws HibernateException(Code)



evictEntity
public void evictEntity(String entityName) throws HibernateException(Code)



evictQueries
public void evictQueries() throws HibernateException(Code)



evictQueries
public void evictQueries(String cacheRegion) throws HibernateException(Code)



getAllClassMetadata
public Map getAllClassMetadata() throws HibernateException(Code)



getAllCollectionMetadata
public Map getAllCollectionMetadata() throws HibernateException(Code)



getAllSecondLevelCacheRegions
public Map getAllSecondLevelCacheRegions()(Code)



getBatcherFactory
public BatcherFactory getBatcherFactory()(Code)



getClassMetadata
public ClassMetadata getClassMetadata(Class persistentClass) throws HibernateException(Code)



getClassMetadata
public ClassMetadata getClassMetadata(String entityName) throws HibernateException(Code)



getCollectionMetadata
public CollectionMetadata getCollectionMetadata(String roleName) throws HibernateException(Code)



getCollectionPersister
public CollectionPersister getCollectionPersister(String role) throws MappingException(Code)



getCollectionRolesByEntityParticipant
public Set getCollectionRolesByEntityParticipant(String entityName)(Code)



getConnectionProvider
public ConnectionProvider getConnectionProvider()(Code)



getCurrentSession
public org.hibernate.classic.Session getCurrentSession() throws HibernateException(Code)



getDefinedFilterNames
public Set getDefinedFilterNames()(Code)



getDialect
public Dialect getDialect()(Code)



getEntityNotFoundDelegate
public EntityNotFoundDelegate getEntityNotFoundDelegate()(Code)



getEntityPersister
public EntityPersister getEntityPersister(String entityName) throws MappingException(Code)



getEventListeners
public EventListeners getEventListeners()(Code)



getFilterDefinition
public FilterDefinition getFilterDefinition(String filterName) throws HibernateException(Code)



getIdentifierGenerator
public IdentifierGenerator getIdentifierGenerator(String rootEntityName)(Code)



getIdentifierPropertyName
public String getIdentifierPropertyName(String className) throws MappingException(Code)



getIdentifierType
public Type getIdentifierType(String className) throws MappingException(Code)



getImplementors
public String[] getImplementors(String className) throws MappingException(Code)
Return the names of all persistent (mapped) classes that extend or implement the given class or interface, accounting for implicit/explicit polymorphism settings and excluding mapped subclasses/joined-subclasses of other classes in the result.



getImportedClassName
public String getImportedClassName(String className)(Code)



getInterceptor
public Interceptor getInterceptor()(Code)



getNamedQuery
public NamedQueryDefinition getNamedQuery(String queryName)(Code)



getNamedSQLQuery
public NamedSQLQueryDefinition getNamedSQLQuery(String queryName)(Code)



getQueryCache
public QueryCache getQueryCache()(Code)



getQueryCache
public QueryCache getQueryCache(String cacheRegion) throws HibernateException(Code)



getQueryPlanCache
public QueryPlanCache getQueryPlanCache()(Code)



getReference
public Reference getReference() throws NamingException(Code)



getReferencedPropertyType
public Type getReferencedPropertyType(String className, String propertyName) throws MappingException(Code)



getResultSetMapping
public ResultSetMappingDefinition getResultSetMapping(String resultSetName)(Code)



getReturnAliases
public String[] getReturnAliases(String queryString) throws HibernateException(Code)



getReturnTypes
public Type[] getReturnTypes(String queryString) throws HibernateException(Code)



getSQLExceptionConverter
public SQLExceptionConverter getSQLExceptionConverter()(Code)



getSecondLevelCacheRegion
public Cache getSecondLevelCacheRegion(String regionName)(Code)



getSettings
public Settings getSettings()(Code)



getSqlFunctionRegistry
public SQLFunctionRegistry getSqlFunctionRegistry()(Code)



getStatistics
public Statistics getStatistics()(Code)



getStatisticsImplementor
public StatisticsImplementor getStatisticsImplementor()(Code)



getTransactionFactory
public TransactionFactory getTransactionFactory()(Code)



getTransactionManager
public TransactionManager getTransactionManager()(Code)



getUpdateTimestampsCache
public UpdateTimestampsCache getUpdateTimestampsCache()(Code)



isClosed
public boolean isClosed()(Code)



openSession
public org.hibernate.classic.Session openSession(Connection connection, Interceptor sessionLocalInterceptor)(Code)



openSession
public org.hibernate.classic.Session openSession(Interceptor sessionLocalInterceptor) throws HibernateException(Code)



openSession
public org.hibernate.classic.Session openSession(Connection connection)(Code)



openSession
public org.hibernate.classic.Session openSession() throws HibernateException(Code)



openSession
public org.hibernate.classic.Session openSession(Connection connection, boolean flushBeforeCompletionEnabled, boolean autoCloseSessionEnabled, ConnectionReleaseMode connectionReleaseMode) throws HibernateException(Code)



openStatelessSession
public StatelessSession openStatelessSession()(Code)



openStatelessSession
public StatelessSession openStatelessSession(Connection connection)(Code)



openTemporarySession
public org.hibernate.classic.Session openTemporarySession() throws HibernateException(Code)



serialize
void serialize(ObjectOutputStream oos) throws IOException(Code)
Custom serialization hook used during Session serialization.
Parameters:
  oos - The stream to which to write the factory
throws:
  IOException -



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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