Save This Page
Home » hibernate-distribution-3.3.1.GA-dist » org.hibernate » impl » [javadoc | source]
org.hibernate.impl
public final class: SessionFactoryImpl [javadoc | source]
java.lang.Object
   org.hibernate.impl.SessionFactoryImpl

All Implemented Interfaces:
    SessionFactoryImplementor, org.hibernate.SessionFactory

Concrete implementation of the SessionFactory interface. Has the following responsibilites 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.
Constructor:
 public SessionFactoryImpl(Configuration cfg,
    Mapping mapping,
    Settings settings,
    EventListeners listeners,
    SessionFactoryObserver observer) throws HibernateException 
Method from org.hibernate.impl.SessionFactoryImpl Summary:
close,   deserialize,   evict,   evict,   evictCollection,   evictCollection,   evictEntity,   evictEntity,   evictQueries,   evictQueries,   getAllClassMetadata,   getAllCollectionMetadata,   getAllSecondLevelCacheRegions,   getBatcherFactory,   getClassMetadata,   getClassMetadata,   getCollectionMetadata,   getCollectionPersister,   getCollectionRolesByEntityParticipant,   getConnectionProvider,   getCurrentSession,   getDefinedFilterNames,   getDialect,   getEntityNotFoundDelegate,   getEntityPersister,   getEventListeners,   getFilterDefinition,   getIdentifierGenerator,   getIdentifierPropertyName,   getIdentifierType,   getImplementors,   getImportedClassName,   getInterceptor,   getNamedQuery,   getNamedSQLQuery,   getQueryCache,   getQueryCache,   getQueryPlanCache,   getReference,   getReferencedPropertyType,   getResultSetMapping,   getReturnAliases,   getReturnTypes,   getSQLExceptionConverter,   getSecondLevelCacheRegion,   getSettings,   getSqlFunctionRegistry,   getStatistics,   getStatisticsImplementor,   getTransactionFactory,   getTransactionManager,   getUpdateTimestampsCache,   isClosed,   openSession,   openSession,   openSession,   openSession,   openSession,   openStatelessSession,   openStatelessSession,   openTemporarySession,   serialize
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.impl.SessionFactoryImpl Detail:
 public  void close() throws HibernateException 
    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.
 static SessionFactoryImpl deserialize(ObjectInputStream ois) throws ClassNotFoundException, IOException 
    Custom deserialization hook used during Session deserialization.
 public  void evict(Class persistentClass) throws HibernateException 
 public  void evict(Class persistentClass,
    Serializable id) throws HibernateException 
 public  void evictCollection(String roleName) throws HibernateException 
 public  void evictCollection(String roleName,
    Serializable id) throws HibernateException 
 public  void evictEntity(String entityName) throws HibernateException 
 public  void evictEntity(String entityName,
    Serializable id) throws HibernateException 
 public  void evictQueries() throws HibernateException 
 public  void evictQueries(String cacheRegion) throws HibernateException 
 public Map getAllClassMetadata() throws HibernateException 
 public Map getAllCollectionMetadata() throws HibernateException 
 public Map getAllSecondLevelCacheRegions() 
 public BatcherFactory getBatcherFactory() 
 public ClassMetadata getClassMetadata(Class persistentClass) throws HibernateException 
 public ClassMetadata getClassMetadata(String entityName) throws HibernateException 
 public CollectionMetadata getCollectionMetadata(String roleName) throws HibernateException 
 public CollectionPersister getCollectionPersister(String role) throws MappingException 
 public Set getCollectionRolesByEntityParticipant(String entityName) 
 public ConnectionProvider getConnectionProvider() 
 public Session getCurrentSession() throws HibernateException 
 public Set getDefinedFilterNames() 
 public Dialect getDialect() 
 public EntityNotFoundDelegate getEntityNotFoundDelegate() 
 public EntityPersister getEntityPersister(String entityName) throws MappingException 
 public EventListeners getEventListeners() 
 public FilterDefinition getFilterDefinition(String filterName) throws HibernateException 
 public IdentifierGenerator getIdentifierGenerator(String rootEntityName) 
 public String getIdentifierPropertyName(String className) throws MappingException 
 public Type getIdentifierType(String className) throws MappingException 
 public String[] getImplementors(String className) throws MappingException 
    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 String getImportedClassName(String className) 
 public Interceptor getInterceptor() 
 public NamedQueryDefinition getNamedQuery(String queryName) 
 public NamedSQLQueryDefinition getNamedSQLQuery(String queryName) 
 public QueryCache getQueryCache() 
 public QueryCache getQueryCache(String regionName) throws HibernateException 
 public QueryPlanCache getQueryPlanCache() 
 public Reference getReference() throws NamingException 
 public Type getReferencedPropertyType(String className,
    String propertyName) throws MappingException 
 public ResultSetMappingDefinition getResultSetMapping(String resultSetName) 
 public String[] getReturnAliases(String queryString) throws HibernateException 
 public Type[] getReturnTypes(String queryString) throws HibernateException 
 public SQLExceptionConverter getSQLExceptionConverter() 
 public Region getSecondLevelCacheRegion(String regionName) 
 public Settings getSettings() 
 public SQLFunctionRegistry getSqlFunctionRegistry() 
 public Statistics getStatistics() 
 public StatisticsImplementor getStatisticsImplementor() 
 public TransactionFactory getTransactionFactory() 
 public TransactionManager getTransactionManager() 
 public UpdateTimestampsCache getUpdateTimestampsCache() 
 public boolean isClosed() 
 public Session openSession() throws HibernateException 
 public Session openSession(Interceptor sessionLocalInterceptor) throws HibernateException 
 public Session openSession(Connection connection) 
 public Session openSession(Connection connection,
    Interceptor sessionLocalInterceptor) 
 public Session openSession(Connection connection,
    boolean flushBeforeCompletionEnabled,
    boolean autoCloseSessionEnabled,
    ConnectionReleaseMode connectionReleaseMode) throws HibernateException 
 public StatelessSession openStatelessSession() 
 public StatelessSession openStatelessSession(Connection connection) 
 public Session openTemporarySession() throws HibernateException 
  void serialize(ObjectOutputStream oos) throws IOException 
    Custom serialization hook used during Session serialization.