C# 클래스 Castle.MonoRail.ActiveRecordSupport.Pagination.AbstractPaginableQuery

Base class for all paginable queries, including custom ones.
Extenders should override the BuildHQL. Optionally, the methods SetQueryParameters and ExecuteQuery can also be overriden.
상속: Castle.ActiveRecord.ActiveRecordBaseQuery, IARPaginableDataSource
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono

보호된 프로퍼티들

프로퍼티 타입 설명
pageSize int

공개 메소드들

메소드 설명
AbstractPaginableQuery ( Type targetType ) : System
ListAll ( ) : IEnumerable
ObtainCount ( ) : int

Executes a query to return the record count

Paginate ( int pageSize, int currentPage ) : IEnumerable

Returns the page items. Actually, the implementation just sets the protected fields pageSize and currentPage, gets an ISession from SessionFactoryHolder and calls InternalExecute in order to execute the custom query and fetch only the page items.

보호된 메소드들

메소드 설명
BuildCountHQL ( ) : string
BuildHQL ( ) : string

Should be overriden to return the custom HQL to be ran.

CreateQuery ( ISession session ) : IQuery
ExecuteQuery ( IQuery query ) : IEnumerable

Override to provide a custom query execution. The default behaviour is to just call IQuery.List().

InternalEnumerate ( ISession session ) : IEnumerable

The implementation of the InternalEnumerate method, as required by ActiveRecordBaseQuery. Should not be overriden.

InternalExecute ( ISession session ) : object

The implementation of the InternalExecute method, as required by ActiveRecordBaseQuery. Should not be overriden.

SetQueryParameters ( IQuery query ) : void

May be overriden, in order to set custom query parameters.

비공개 메소드들

메소드 설명
InternalPaginate ( ISession session, bool skipPagination ) : IEnumerable
PrepareQueryForPagination ( IQuery query ) : void

For internal use only.

메소드 상세

AbstractPaginableQuery() 공개 메소드

public AbstractPaginableQuery ( Type targetType ) : System
targetType System.Type
리턴 System

BuildCountHQL() 보호된 메소드

protected BuildCountHQL ( ) : string
리턴 string

BuildHQL() 보호된 추상적인 메소드

Should be overriden to return the custom HQL to be ran.
protected abstract BuildHQL ( ) : string
리턴 string

CreateQuery() 보호된 최종 메소드

protected final CreateQuery ( ISession session ) : IQuery
session ISession
리턴 IQuery

ExecuteQuery() 보호된 메소드

Override to provide a custom query execution. The default behaviour is to just call IQuery.List().
protected ExecuteQuery ( IQuery query ) : IEnumerable
query IQuery The query
리턴 IEnumerable

InternalEnumerate() 보호된 최종 메소드

The implementation of the InternalEnumerate method, as required by ActiveRecordBaseQuery. Should not be overriden.
protected final InternalEnumerate ( ISession session ) : IEnumerable
session ISession The NHibernate Session
리턴 IEnumerable

InternalExecute() 보호된 최종 메소드

The implementation of the InternalExecute method, as required by ActiveRecordBaseQuery. Should not be overriden.
protected final InternalExecute ( ISession session ) : object
session ISession The NHibernate Session
리턴 object

ListAll() 공개 메소드

public ListAll ( ) : IEnumerable
리턴 IEnumerable

ObtainCount() 공개 메소드

Executes a query to return the record count
public ObtainCount ( ) : int
리턴 int

Paginate() 공개 메소드

Returns the page items. Actually, the implementation just sets the protected fields pageSize and currentPage, gets an ISession from SessionFactoryHolder and calls InternalExecute in order to execute the custom query and fetch only the page items.
public Paginate ( int pageSize, int currentPage ) : IEnumerable
pageSize int The page size
currentPage int The current page
리턴 IEnumerable

SetQueryParameters() 보호된 메소드

May be overriden, in order to set custom query parameters.
protected SetQueryParameters ( IQuery query ) : void
query IQuery The query
리턴 void

프로퍼티 상세

pageSize 보호되어 있는 프로퍼티

protected int pageSize
리턴 int