Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

LocalSessionFactoryObject Members

LocalSessionFactoryObject overview

Protected Static (Shared) Fields

log The shared ILog instance for this class (and derived classes).

Public Instance Constructors

LocalSessionFactoryObject Constructor Initializes a new instance of the LocalSessionFactoryObject class.

Public Instance Properties

AdoExceptionTranslator Set the ADO.NET exception translator for this instance. Applied to System.Data.Common.DbException (or provider specific exception type in .NET 1.1) thrown by callback code, be it direct DbException or wrapped Hibernate ADOExceptions. The default exception translator is either a ErrorCodeExceptionTranslator if a DbProvider is available, or a FalbackExceptionTranslator otherwise
ConfigFilenames Sets the hibernate configuration files to load, i.e. hibernate.cfg.xml.
Configuration Return the Configuration object used to build the SessionFactory. Allows access to configuration metadata stored there (rarely needed).
DbProvider Get or set the DataSource to be used by the SessionFactory.
ExposeTransactionAwareSessionFactory Gets or sets a value indicating whether to expose a transaction aware session factory.
HibernateProperties Set NHibernate configuration properties, like "hibernate.dialect".
IsSingleton Returns true
MappingAssemblies Sets the assemblies to load that contain mapping files.
MappingResources Sets the locations of Spring IResources that contain mapping files.
ObjectType Return the type ISessionFactory or subclass.

Public Instance Methods

AfterPropertiesSet Initialize the SessionFactory for the given or the default location.
Dispose Close the SessionFactory on application context shutdown.
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetObject Return the singleon session factory.
GetType (inherited from Object)Gets the Type of the current instance.
ToString (inherited from Object)Returns a String that represents the current Object.
TranslateExceptionIfPossible Implementation of the PersistenceExceptionTranslator interface, as autodetected by Spring's PersistenceExceptionTranslationPostProcessor. Converts the exception if it is a HibernateException; else returns
to indicate an unknown exception. translate the given exception thrown by a persistence framework to a corresponding exception from Spring's generic DataAccessException hierarchy, if possible.

Protected Instance Methods

ConvertAdoAccessException Converts the ADO.NET access exception to an appropriate exception from the
hierarchy. Can be overridden in subclasses.
ConvertHibernateException Convert the given HibernateException to an appropriate exception from the Spring's DAO Exception hierarchy. Will automatically apply a specified IAdoExceptionTranslator to a Hibernate ADOException, else rely on Hibernate's default translation.
Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.
NewConfiguration Subclasses can override this method to perform custom initialization of the Configuration instance used for ISessionFactory creation.
NewSessionFactory Subclasses can override this method to perform custom initialization of the SessionFactory instance, creating it via the given Configuration object that got prepared by this LocalSessionFactoryObject.
PostProcessConfiguration To be implemented by subclasses that want to to perform custom post-processing of the Configuration object after this FactoryObject performed its default initialization.

See Also

LocalSessionFactoryObject Class | Spring.Data.NHibernate Namespace