The Configuration type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| Configuration()()()() |
Create a new Configuration object.
| |
| Configuration(SettingsFactory) | Initializes a new instance of the Configuration class | |
| Configuration(SerializationInfo, StreamingContext) | Initializes a new instance of the Configuration class |
Methods
| Name | Description | |
|---|---|---|
| AddAssembly(Assembly) |
Adds all of the assembly's embedded resources whose names end with .hbm.xml.
| |
| AddAssembly(String) |
Adds all of the assembly's embedded resources whose names end with .hbm.xml.
| |
| AddAuxiliaryDatabaseObject | ||
| AddClass |
Read a mapping from an embedded resource, using a convention.
| |
| AddDeserializedMapping |
Add mapping data using deserialized class.
| |
| AddDirectory |
Read all mapping documents from a directory tree. Assume that any
file named *.hbm.xml is a mapping document.
| |
| AddDocument(XmlDocument) | ||
| AddDocument(XmlDocument, String) |
Read mappings from an XmlDocument.
| |
| AddFile(FileInfo) | ||
| AddFile(String) |
Read mappings from a particular XML file. This method is equivalent
to AddXmlFile(String).
| |
| AddFilterDefinition | ||
| AddInputStream(Stream) |
Read mappings from a Stream.
| |
| AddInputStream(Stream, String) |
Read mappings from a Stream.
| |
| AddMapping | ||
| AddProperties |
Adds an IDictionary of configuration properties. The
Key is the name of the Property and the Value is the String
value of the Property.
| |
| AddResource |
Adds the mappings in the resource of the assembly.
| |
| AddResources |
Adds the mappings from embedded resources of the assembly.
| |
| AddSqlFunction | ||
| AddUrl(String) |
Read mappings from a URL.
| |
| AddUrl(Uri) |
Read mappings from a URL.
| |
| AddXml(String) | ||
| AddXml(String, String) |
Read mappings from a String. This method is equivalent to
AddXmlString(String).
| |
| AddXmlFile |
Read mappings from a particular XML file.
| |
| AddXmlReader(XmlReader) |
Adds the Mappings in the XmlReader after validating it
against the nhibernate-mapping-2.2 schema.
| |
| AddXmlReader(XmlReader, String) |
Adds the Mappings in the XmlReader after validating it
against the nhibernate-mapping-2.2 schema.
| |
| AddXmlString |
Read mappings from a String.
| |
| AppendListeners |
Append the listeners to the end of the currently configured
listeners
| |
| BuildMapping | ||
| BuildMappings |
Call this to ensure the mappings are fully compiled/built. Usefull to ensure getting
access to all information in the metamodel when calling e.g. getClassMappings().
| |
| BuildSessionFactory |
Instantiate a new ISessionFactory, using the properties and mappings in this
configuration. The ISessionFactory will be immutable, so changes made to the
configuration after building the ISessionFactory will not affect it.
| |
| Configure()()()() |
Configure NHibernate using the <hibernate-configuration> section
from the application config file, if found, or the file hibernate.cfg.xml if the
<hibernate-configuration> section not include the session-factory configuration.
| |
| Configure(String) |
Configure NHibernate using the file specified.
| |
| Configure(XmlReader) |
Configure NHibernate using the specified XmlReader.
| |
| Configure(Assembly, String) |
Configure NHibernate using a resource contained in an Assembly.
| |
| ConfigureProxyFactoryFactory | ||
| CreateMappings |
Create a new Mappings to add classes and collection
mappings to.
| |
| DoConfigure | ||
| Equals | (Inherited from Object.) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
| GenerateDropSchemaScript |
Generate DDL for dropping tables
| |
| GenerateSchemaCreationScript |
Generate DDL for creating tables
| |
| GenerateSchemaUpdateScript |
Generate DDL for altering tables
| |
| GetClassMapping(String) | Get the mapping for a particular entity | |
| GetClassMapping(Type) |
Get the mapping for a particular class
| |
| GetCollectionMapping |
Get the mapping for a particular collection role
| |
| GetDefaultConfigurationFilePath | ||
| GetDerivedProperties |
Returns the set of properties computed from the default properties in the dialect combined with the other properties in the configuration.
| |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetObjectData | ||
| GetProperty |
Gets the value of the configuration property.
| |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IncludeAction | ||
| LoadMappingDocument |
Load and validate the mappings in the XmlReader against
the nhibernate-mapping-2.2 schema, without adding them to the configuration.
| |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| Reset |
Clear the internal state of the Configuration object.
| |
| SetCacheConcurrencyStrategy(String, String) |
Set up a cache for an entity class
| |
| SetCacheConcurrencyStrategy(String, String, String) | ||
| SetCollectionCacheConcurrencyStrategy |
Set up a cache for a collection role
| |
| SetDefaultAssembly |
Set the default assembly to use for the mappings added to the configuration
afterwards.
| |
| SetDefaultNamespace |
Set the default namespace to use for the mappings added to the configuration
afterwards.
| |
| SetInterceptor |
Sets the default interceptor for use by all sessions.
| |
| SetListener |
Set or clear listener for a given ListenerType.
| |
| SetListeners(ListenerType, array<Object>[]()[][]) |
Set or clear listeners for a given ListenerType.
| |
| SetListeners(ListenerType, array<String>[]()[][]) |
Set or clear listener for a given ListenerType.
| |
| SetNamingStrategy |
Set a custom naming strategy
| |
| SetProperties |
Specify a completely new set of properties
| |
| SetProperty |
Sets the value of the configuration property.
| |
| ToString | Returns a string that represents the current object. (Inherited from Object.) | |
| ValidateSchema |
Extension Methods
Fields
| Name | Description | |
|---|---|---|
| auxiliaryDatabaseObjects | ||
| classes | ||
| collections | ||
| columnNameBindingPerTable | ||
| DefaultHibernateCfgFileName | Default name for hibernate configuration file. | |
| extendsQueue | ||
| filtersSecondPasses | ||
| propertyReferences | ||
| secondPasses | ||
| settingsFactory | ||
| tableNameBinding | ||
| tables | ||
| typeDefs |
Properties
| Name | Description | |
|---|---|---|
| ClassMappings |
The class mappings
| |
| CollectionMappings |
The collection mappings
| |
| EntityNotFoundDelegate |
Retrieve the user-supplied delegate to handle non-existent entity scenarios.
| |
| EventListeners | ||
| FilterDefinitions | ||
| Imports |
Get the query language imports (entityName/className -> AssemblyQualifiedName)
| |
| Interceptor |
Gets or sets the IInterceptor to use.
| |
| NamedQueries |
The named queries
| |
| NamedSQLQueries |
The named SQL queries
| |
| NamingStrategy |
Naming strategy for tables and columns
| |
| Properties |
Gets or sets the IDictionary that contains the configuration
properties and their values.
| |
| SqlFunctions | ||
| SqlResultSetMappings |
Events
| Name | Description | |
|---|---|---|
| AfterBindMapping | ||
| BeforeBindMapping |