C# 클래스 Castle.Facilities.NHibernateIntegration.Components.Dao.NHibernateGenericDao

Summary description for GenericDao.
Contributed by Steve Degosserie <[email protected]>
파일 보기 프로젝트 열기: hconceicao/Castle.Facilities.NHibernateIntegration3

공개 메소드들

메소드 설명
Create ( object instance ) : object

Creates (Saves) a new instance to the database.

CreateStateless ( object instance ) : object

Creates (saves or inserts) a new instance to the database using IStatelessSession.

Delete ( object instance ) : void

Deletes the instance from the database.

DeleteAll ( Type type ) : void

Deletes all rows for the specified type

DeleteAllStateless ( Type type ) : void

Deletes all rows for the specified type using IStatelessSession.

DeleteStateless ( object instance ) : void

Deletes the instance from the database using IStatelessSession.

FindAll ( Type type ) : Array

Returns all instances found for the specified type.

FindAll ( Type type, ICriterion criterias ) : Array

Returns all instances found for the specified type using criteria.

FindAll ( Type type, ICriterion criterias, NHibernate.Criterion.Order sortItems ) : Array

Returns all instances found for the specified type using criteria.

FindAll ( Type type, ICriterion criterias, NHibernate.Criterion.Order sortItems, int firstRow, int maxRows ) : Array

Returns all instances found for the specified type using criteria.

FindAll ( Type type, ICriterion criterias, int firstRow, int maxRows ) : Array

Returns all instances found for the specified type using criteria.

FindAll ( Type type, int firstRow, int maxRows ) : Array

Returns a portion of the query results (sliced)

FindAllStateless ( Type type ) : Array

Returns all instances found for the specified type using IStatelessSession.

FindAllStateless ( Type type, ICriterion criterias ) : Array

Returns all instances found for the specified type using criteria and IStatelessSession.

FindAllStateless ( Type type, ICriterion criterias, NHibernate.Criterion.Order sortItems ) : Array

Returns all instances found for the specified type using criteria and IStatelessSession.

FindAllStateless ( Type type, ICriterion criterias, NHibernate.Criterion.Order sortItems, int firstRow, int maxRows ) : Array

Returns all instances found for the specified type using criteria and IStatelessSession.

FindAllStateless ( Type type, ICriterion criterias, int firstRow, int maxRows ) : Array

Returns all instances found for the specified type using criteria and IStatelessSession.

FindAllStateless ( Type type, int firstRow, int maxRows ) : Array

Returns a portion of the query results (sliced) using IStatelessSession.

FindAllWithCustomQuery ( string queryString ) : Array

Finds all with custom query.

FindAllWithCustomQuery ( string queryString, int firstRow, int maxRows ) : Array

Finds all with custom HQL query.

FindAllWithCustomQueryStateless ( string queryString ) : Array

Finds all with custom query using IStatelessSession.

FindAllWithCustomQueryStateless ( string queryString, int firstRow, int maxRows ) : Array

Finds all with custom HQL query using IStatelessSession.

FindAllWithNamedQuery ( string namedQuery ) : Array

Finds all with named HQL query.

FindAllWithNamedQuery ( string namedQuery, int firstRow, int maxRows ) : Array

Finds all with named HQL query.

FindAllWithNamedQueryStateless ( string namedQuery ) : Array

Finds all with named HQL query using IStatelessSession.

FindAllWithNamedQueryStateless ( string namedQuery, int firstRow, int maxRows ) : Array

Finds all with named HQL query using IStatelessSession.

FindById ( Type type, object id ) : object

Finds an object instance by an unique ID

FindByIdStateless ( Type type, object id ) : object

Finds an object instance by an unique ID using IStatelessSession.

NHibernateGenericDao ( ISessionManager sessionManager ) : System

Initializes a new instance of the NHibernateGenericDao class.

NHibernateGenericDao ( ISessionManager sessionManager, string sessionFactoryAlias ) : System

Initializes a new instance of the NHibernateGenericDao class.

Save ( object instance ) : void

Saves the instance to the database. If the primary key is unitialized it creates the instance on the database. Otherwise it updates it.

If the primary key is assigned, then you must invoke Create or Update instead.

Update ( object instance ) : void

Persists the modification on the instance state to the database.

UpdateStateless ( object instance ) : void

Persists the modification on the instance state to the database using IStatelessSession.

비공개 메소드들

메소드 설명
GetSession ( ) : ISession
GetStatelessSession ( ) : IStatelessSession

메소드 상세

Create() 공개 메소드

Creates (Saves) a new instance to the database.
public Create ( object instance ) : object
instance object The instance to be created on the database
리턴 object

CreateStateless() 공개 메소드

Creates (saves or inserts) a new instance to the database using IStatelessSession.
public CreateStateless ( object instance ) : object
instance object The instance to be created on the database
리턴 object

Delete() 공개 메소드

Deletes the instance from the database.
public Delete ( object instance ) : void
instance object The instance to be deleted from the database
리턴 void

DeleteAll() 공개 메소드

Deletes all rows for the specified type
public DeleteAll ( Type type ) : void
type System.Type type on which the rows on the database should be deleted
리턴 void

DeleteAllStateless() 공개 메소드

Deletes all rows for the specified type using IStatelessSession.
public DeleteAllStateless ( Type type ) : void
type System.Type type on which the rows on the database should be deleted
리턴 void

DeleteStateless() 공개 메소드

Deletes the instance from the database using IStatelessSession.
public DeleteStateless ( object instance ) : void
instance object The instance to be deleted from the database
리턴 void

FindAll() 공개 메소드

Returns all instances found for the specified type.
public FindAll ( Type type ) : Array
type System.Type The target type.
리턴 System.Array

FindAll() 공개 메소드

Returns all instances found for the specified type using criteria.
public FindAll ( Type type, ICriterion criterias ) : Array
type System.Type The target type.
criterias ICriterion The criteria expression
리턴 System.Array

FindAll() 공개 메소드

Returns all instances found for the specified type using criteria.
public FindAll ( Type type, ICriterion criterias, NHibernate.Criterion.Order sortItems ) : Array
type System.Type The target type.
criterias ICriterion The criteria expression
sortItems NHibernate.Criterion.Order An of objects.
리턴 System.Array

FindAll() 공개 메소드

Returns all instances found for the specified type using criteria.
public FindAll ( Type type, ICriterion criterias, NHibernate.Criterion.Order sortItems, int firstRow, int maxRows ) : Array
type System.Type The target type.
criterias ICriterion The criteria expression
sortItems NHibernate.Criterion.Order An of objects.
firstRow int The number of the first row to retrieve.
maxRows int The maximum number of results retrieved.
리턴 System.Array

FindAll() 공개 메소드

Returns all instances found for the specified type using criteria.
public FindAll ( Type type, ICriterion criterias, int firstRow, int maxRows ) : Array
type System.Type The target type.
criterias ICriterion The criteria expression
firstRow int The number of the first row to retrieve.
maxRows int The maximum number of results retrieved.
리턴 System.Array

FindAll() 공개 메소드

Returns a portion of the query results (sliced)
public FindAll ( Type type, int firstRow, int maxRows ) : Array
type System.Type The target type.
firstRow int The number of the first row to retrieve.
maxRows int The maximum number of results retrieved.
리턴 System.Array

FindAllStateless() 공개 메소드

Returns all instances found for the specified type using IStatelessSession.
public FindAllStateless ( Type type ) : Array
type System.Type The target type.
리턴 System.Array

FindAllStateless() 공개 메소드

Returns all instances found for the specified type using criteria and IStatelessSession.
public FindAllStateless ( Type type, ICriterion criterias ) : Array
type System.Type The target type.
criterias ICriterion The criteria expression
리턴 System.Array

FindAllStateless() 공개 메소드

Returns all instances found for the specified type using criteria and IStatelessSession.
public FindAllStateless ( Type type, ICriterion criterias, NHibernate.Criterion.Order sortItems ) : Array
type System.Type The target type.
criterias ICriterion The criteria expression
sortItems NHibernate.Criterion.Order An of objects.
리턴 System.Array

FindAllStateless() 공개 메소드

Returns all instances found for the specified type using criteria and IStatelessSession.
public FindAllStateless ( Type type, ICriterion criterias, NHibernate.Criterion.Order sortItems, int firstRow, int maxRows ) : Array
type System.Type The target type.
criterias ICriterion The criteria expression
sortItems NHibernate.Criterion.Order An of objects.
firstRow int The number of the first row to retrieve.
maxRows int The maximum number of results retrieved.
리턴 System.Array

FindAllStateless() 공개 메소드

Returns all instances found for the specified type using criteria and IStatelessSession.
public FindAllStateless ( Type type, ICriterion criterias, int firstRow, int maxRows ) : Array
type System.Type The target type.
criterias ICriterion The criteria expression
firstRow int The number of the first row to retrieve.
maxRows int The maximum number of results retrieved.
리턴 System.Array

FindAllStateless() 공개 메소드

Returns a portion of the query results (sliced) using IStatelessSession.
public FindAllStateless ( Type type, int firstRow, int maxRows ) : Array
type System.Type The target type.
firstRow int The number of the first row to retrieve.
maxRows int The maximum number of results retrieved.
리턴 System.Array

FindAllWithCustomQuery() 공개 메소드

Finds all with custom query.
public FindAllWithCustomQuery ( string queryString ) : Array
queryString string The query string.
리턴 System.Array

FindAllWithCustomQuery() 공개 메소드

Finds all with custom HQL query.
public FindAllWithCustomQuery ( string queryString, int firstRow, int maxRows ) : Array
queryString string The query string.
firstRow int The number of the first row to retrieve.
maxRows int The maximum number of results retrieved.
리턴 System.Array

FindAllWithCustomQueryStateless() 공개 메소드

Finds all with custom query using IStatelessSession.
public FindAllWithCustomQueryStateless ( string queryString ) : Array
queryString string The query string.
리턴 System.Array

FindAllWithCustomQueryStateless() 공개 메소드

Finds all with custom HQL query using IStatelessSession.
public FindAllWithCustomQueryStateless ( string queryString, int firstRow, int maxRows ) : Array
queryString string The query string.
firstRow int The number of the first row to retrieve.
maxRows int The maximum number of results retrieved.
리턴 System.Array

FindAllWithNamedQuery() 공개 메소드

Finds all with named HQL query.
public FindAllWithNamedQuery ( string namedQuery ) : Array
namedQuery string The named query.
리턴 System.Array

FindAllWithNamedQuery() 공개 메소드

Finds all with named HQL query.
public FindAllWithNamedQuery ( string namedQuery, int firstRow, int maxRows ) : Array
namedQuery string The named query.
firstRow int The number of the first row to retrieve.
maxRows int The maximum number of results retrieved.
리턴 System.Array

FindAllWithNamedQueryStateless() 공개 메소드

Finds all with named HQL query using IStatelessSession.
public FindAllWithNamedQueryStateless ( string namedQuery ) : Array
namedQuery string The named query.
리턴 System.Array

FindAllWithNamedQueryStateless() 공개 메소드

Finds all with named HQL query using IStatelessSession.
public FindAllWithNamedQueryStateless ( string namedQuery, int firstRow, int maxRows ) : Array
namedQuery string The named query.
firstRow int The number of the first row to retrieve.
maxRows int The maximum number of results retrieved.
리턴 System.Array

FindById() 공개 메소드

Finds an object instance by an unique ID
public FindById ( Type type, object id ) : object
type System.Type The AR subclass type
id object ID value
리턴 object

FindByIdStateless() 공개 메소드

Finds an object instance by an unique ID using IStatelessSession.
public FindByIdStateless ( Type type, object id ) : object
type System.Type The AR subclass type
id object ID value
리턴 object

NHibernateGenericDao() 공개 메소드

Initializes a new instance of the NHibernateGenericDao class.
public NHibernateGenericDao ( ISessionManager sessionManager ) : System
sessionManager ISessionManager The session manager.
리턴 System

NHibernateGenericDao() 공개 메소드

Initializes a new instance of the NHibernateGenericDao class.
public NHibernateGenericDao ( ISessionManager sessionManager, string sessionFactoryAlias ) : System
sessionManager ISessionManager The session manager.
sessionFactoryAlias string The session factory alias.
리턴 System

Save() 공개 메소드

Saves the instance to the database. If the primary key is unitialized it creates the instance on the database. Otherwise it updates it.

If the primary key is assigned, then you must invoke Create or Update instead.

public Save ( object instance ) : void
instance object The instance to be saved
리턴 void

Update() 공개 메소드

Persists the modification on the instance state to the database.
public Update ( object instance ) : void
instance object The instance to be updated on the database
리턴 void

UpdateStateless() 공개 메소드

Persists the modification on the instance state to the database using IStatelessSession.
public UpdateStateless ( object instance ) : void
instance object The instance to be updated on the database
리턴 void