C# Class Spring.Data.Common.DbProviderFactoryObject

A Spring.Objects.Factory.IFactoryObject implementation that creates instances of the IDbProvider class.
Typically used as a convenience for retrieving shared IDbProvider in a Spring XML configuration file as compared to using explict factory method support.
Inheritance: IFactoryObject, IInitializingObject
Datei anzeigen Open project: spring-projects/spring-net

Public Methods

Method Description
AfterPropertiesSet ( ) : void

Validates that the provider name is specified.

Invoked by an Spring.Objects.Factory.IObjectFactory after it has injected all of an object's dependencies.

DbProviderFactoryObject ( ) : System

Creates a new instance of the DbProviderFactoryObject class.

GetObject ( ) : object

Return an instance of and IDbProvider as configured by this factory managed by this factory.

If this method is being called in the context of an enclosing IoC container and returns , the IoC container will consider this factory object as not being fully initialized and throw a corresponding (and most probably fatal) exception.

Protected Methods

Method Description
CreateProviderInstance ( ) : IDbProvider

Create the actual provider instance as specified by this factory's configuration properties.

Private Methods

Method Description
ValidateProperties ( ) : void

Validates the properties.

Method Details

AfterPropertiesSet() public method

Validates that the provider name is specified.
Invoked by an Spring.Objects.Factory.IObjectFactory after it has injected all of an object's dependencies.
/// In the event of not setting the ProviderName. ///
public AfterPropertiesSet ( ) : void
return void

CreateProviderInstance() protected method

Create the actual provider instance as specified by this factory's configuration properties.
protected CreateProviderInstance ( ) : IDbProvider
return IDbProvider

DbProviderFactoryObject() public method

Creates a new instance of the DbProviderFactoryObject class.
public DbProviderFactoryObject ( ) : System
return System

GetObject() public method

Return an instance of and IDbProvider as configured by this factory managed by this factory.
If this method is being called in the context of an enclosing IoC container and returns , the IoC container will consider this factory object as not being fully initialized and throw a corresponding (and most probably fatal) exception.
public GetObject ( ) : object
return object