C# Class NHibernate.Impl.SessionFactoryImpl

Inheritance: ISessionFactory, ISessionFactoryImplementor, IObjectReference
Mostra file Open project: nhibernate/nhibernate-core Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Closes the session factory, releasing all held resources. cleans up used cache regions and "stops" the cache provider. close the ADO.NET connection

Dispose ( ) : void
Evict ( System persistentClass ) : void
Evict ( System persistentClass, object id ) : void
EvictCollection ( string roleName ) : void
EvictCollection ( string roleName, object id ) : void
EvictEntity ( string entityName ) : void
EvictEntity ( string entityName, object id ) : void
EvictQueries ( ) : void
EvictQueries ( string cacheRegion ) : void
GetAllClassMetadata ( ) : IClassMetadata>.IDictionary

GetAllCollectionMetadata ( ) : ICollectionMetadata>.IDictionary

GetAllSecondLevelCacheRegions ( ) : ICache>.IDictionary
GetClassMetadata ( System persistentClass ) : IClassMetadata
GetClassMetadata ( string entityName ) : IClassMetadata
GetCollectionMetadata ( string roleName ) : ICollectionMetadata
GetCollectionPersister ( string role ) : ICollectionPersister
GetCollectionRolesByEntityParticipant ( string entityName ) : ISet
GetCurrentSession ( ) : ISession
GetEntityPersister ( string entityName ) : IEntityPersister
GetFilterDefinition ( string filterName ) : NHibernate.Engine.FilterDefinition
GetIdentifierGenerator ( string rootEntityName ) : IIdentifierGenerator
GetIdentifierPropertyName ( string className ) : string
GetIdentifierType ( string className ) : IType
GetImplementors ( string entityOrClassName ) : string[]

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 ( string className ) : string
GetNamedQuery ( string queryName ) : NHibernate.Engine.NamedQueryDefinition

Gets the hql query identified by the name.

GetNamedSQLQuery ( string queryName ) : NHibernate.Engine.NamedSQLQueryDefinition
GetQueryCache ( string cacheRegion ) : IQueryCache
GetReferencedPropertyType ( string className, string propertyName ) : IType
GetResultSetMapping ( string resultSetName ) : NHibernate.Engine.ResultSetMappingDefinition
GetReturnAliases ( string queryString ) : string[]

Get the return aliases of a query

GetReturnTypes ( String queryString ) : IType[]
GetSecondLevelCacheRegion ( string regionName ) : ICache
HasNonIdentifierPropertyNamedId ( string className ) : bool
OpenSession ( ) : ISession
OpenSession ( IDbConnection connection ) : ISession
OpenSession ( IDbConnection connection, IInterceptor sessionLocalInterceptor ) : ISession
OpenSession ( IDbConnection connection, bool flushBeforeCompletionEnabled, bool autoCloseSessionEnabled, ConnectionReleaseMode connectionReleaseMode ) : ISession
OpenSession ( IInterceptor sessionLocalInterceptor ) : ISession
OpenStatelessSession ( ) : IStatelessSession

Get a new stateless session.

OpenStatelessSession ( IDbConnection connection ) : IStatelessSession

Get a new stateless session for the given ADO.NET connection.

SessionFactoryImpl ( NHibernate.Cfg.Configuration cfg, IMapping mapping, NHibernate.Cfg.Settings settings, EventListeners listeners ) : System
TryGetEntityPersister ( string entityName ) : IEntityPersister
TryGetGuessEntityName ( System implementor ) : string

Private Methods

Method Description
BuildCurrentSessionContext ( ) : ICurrentSessionContext
CheckNamedQueries ( ) : HibernateException>.IDictionary
GenerateCacheKeyForEvict ( object id, IType type, string entityOrRoleName ) : NHibernate.Cache.CacheKey
GetRealObject ( StreamingContext context ) : object
Init ( ) : void
IsMatchingImplementor ( string entityOrClassName, System entityClass, NHibernate.Persister.Entity.IQueryable implementor ) : bool
OpenSession ( IDbConnection connection, bool autoClose, long timestamp, IInterceptor sessionLocalInterceptor ) : NHibernate.Impl.SessionImpl

Method Details

Close() public method

Closes the session factory, releasing all held resources. cleans up used cache regions and "stops" the cache provider. close the ADO.NET connection
public Close ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

Evict() public method

public Evict ( System persistentClass ) : void
persistentClass System
return void

Evict() public method

public Evict ( System persistentClass, object id ) : void
persistentClass System
id object
return void

EvictCollection() public method

public EvictCollection ( string roleName ) : void
roleName string
return void

EvictCollection() public method

public EvictCollection ( string roleName, object id ) : void
roleName string
id object
return void

EvictEntity() public method

public EvictEntity ( string entityName ) : void
entityName string
return void

EvictEntity() public method

public EvictEntity ( string entityName, object id ) : void
entityName string
id object
return void

EvictQueries() public method

public EvictQueries ( ) : void
return void

EvictQueries() public method

public EvictQueries ( string cacheRegion ) : void
cacheRegion string
return void

GetAllClassMetadata() public method

public GetAllClassMetadata ( ) : IClassMetadata>.IDictionary
return IClassMetadata>.IDictionary

GetAllCollectionMetadata() public method

public GetAllCollectionMetadata ( ) : ICollectionMetadata>.IDictionary
return ICollectionMetadata>.IDictionary

GetAllSecondLevelCacheRegions() public method

public GetAllSecondLevelCacheRegions ( ) : ICache>.IDictionary
return ICache>.IDictionary

GetClassMetadata() public method

public GetClassMetadata ( System persistentClass ) : IClassMetadata
persistentClass System
return IClassMetadata

GetClassMetadata() public method

public GetClassMetadata ( string entityName ) : IClassMetadata
entityName string
return IClassMetadata

GetCollectionMetadata() public method

public GetCollectionMetadata ( string roleName ) : ICollectionMetadata
roleName string
return ICollectionMetadata

GetCollectionPersister() public method

public GetCollectionPersister ( string role ) : ICollectionPersister
role string
return ICollectionPersister

GetCollectionRolesByEntityParticipant() public method

public GetCollectionRolesByEntityParticipant ( string entityName ) : ISet
entityName string
return ISet

GetCurrentSession() public method

public GetCurrentSession ( ) : ISession
return ISession

GetEntityPersister() public method

public GetEntityPersister ( string entityName ) : IEntityPersister
entityName string
return IEntityPersister

GetFilterDefinition() public method

public GetFilterDefinition ( string filterName ) : NHibernate.Engine.FilterDefinition
filterName string
return NHibernate.Engine.FilterDefinition

GetIdentifierGenerator() public method

public GetIdentifierGenerator ( string rootEntityName ) : IIdentifierGenerator
rootEntityName string
return IIdentifierGenerator

GetIdentifierPropertyName() public method

public GetIdentifierPropertyName ( string className ) : string
className string
return string

GetIdentifierType() public method

public GetIdentifierType ( string className ) : IType
className string
return IType

GetImplementors() public method

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 GetImplementors ( string entityOrClassName ) : string[]
entityOrClassName string
return string[]

GetImportedClassName() public method

public GetImportedClassName ( string className ) : string
className string
return string

GetNamedQuery() public method

Gets the hql query identified by the name.
public GetNamedQuery ( string queryName ) : NHibernate.Engine.NamedQueryDefinition
queryName string The name of that identifies the query.
return NHibernate.Engine.NamedQueryDefinition

GetNamedSQLQuery() public method

public GetNamedSQLQuery ( string queryName ) : NHibernate.Engine.NamedSQLQueryDefinition
queryName string
return NHibernate.Engine.NamedSQLQueryDefinition

GetQueryCache() public method

public GetQueryCache ( string cacheRegion ) : IQueryCache
cacheRegion string
return IQueryCache

GetReferencedPropertyType() public method

public GetReferencedPropertyType ( string className, string propertyName ) : IType
className string
propertyName string
return IType

GetResultSetMapping() public method

public GetResultSetMapping ( string resultSetName ) : NHibernate.Engine.ResultSetMappingDefinition
resultSetName string
return NHibernate.Engine.ResultSetMappingDefinition

GetReturnAliases() public method

Get the return aliases of a query
public GetReturnAliases ( string queryString ) : string[]
queryString string
return string[]

GetReturnTypes() public method

public GetReturnTypes ( String queryString ) : IType[]
queryString String
return IType[]

GetSecondLevelCacheRegion() public method

public GetSecondLevelCacheRegion ( string regionName ) : ICache
regionName string
return ICache

HasNonIdentifierPropertyNamedId() public method

public HasNonIdentifierPropertyNamedId ( string className ) : bool
className string
return bool

OpenSession() public method

public OpenSession ( ) : ISession
return ISession

OpenSession() public method

public OpenSession ( IDbConnection connection ) : ISession
connection IDbConnection
return ISession

OpenSession() public method

public OpenSession ( IDbConnection connection, IInterceptor sessionLocalInterceptor ) : ISession
connection IDbConnection
sessionLocalInterceptor IInterceptor
return ISession

OpenSession() public method

public OpenSession ( IDbConnection connection, bool flushBeforeCompletionEnabled, bool autoCloseSessionEnabled, ConnectionReleaseMode connectionReleaseMode ) : ISession
connection IDbConnection
flushBeforeCompletionEnabled bool
autoCloseSessionEnabled bool
connectionReleaseMode ConnectionReleaseMode
return ISession

OpenSession() public method

public OpenSession ( IInterceptor sessionLocalInterceptor ) : ISession
sessionLocalInterceptor IInterceptor
return ISession

OpenStatelessSession() public method

Get a new stateless session.
public OpenStatelessSession ( ) : IStatelessSession
return IStatelessSession

OpenStatelessSession() public method

Get a new stateless session for the given ADO.NET connection.
public OpenStatelessSession ( IDbConnection connection ) : IStatelessSession
connection IDbConnection
return IStatelessSession

SessionFactoryImpl() public method

public SessionFactoryImpl ( NHibernate.Cfg.Configuration cfg, IMapping mapping, NHibernate.Cfg.Settings settings, EventListeners listeners ) : System
cfg NHibernate.Cfg.Configuration
mapping IMapping
settings NHibernate.Cfg.Settings
listeners EventListeners
return System

TryGetEntityPersister() public method

public TryGetEntityPersister ( string entityName ) : IEntityPersister
entityName string
return IEntityPersister

TryGetGuessEntityName() public method

public TryGetGuessEntityName ( System implementor ) : string
implementor System
return string