C# Class Castle.ActiveRecord.ActiveRecordBaseQuery

Base class for all ActiveRecord queries.
Inheritance: IActiveRecordQuery, ICloneable
Show file Open project: nats/castle-1.0.3-mono Class Usage Examples

Protected Properties

Property Type Description
queryModifiers IList

Public Methods

Method Description
Clone ( ) : object

Just a default clone implementation...

GetModifiers ( ActiveRecordBaseQuery query ) : IList

Gets the internal list of modifiers used by the specified query. NOT INTENTED FOR NORMAL USE.

Protected Methods

Method Description
ActiveRecordBaseQuery ( Type rootType ) : System

Initializes a new instance of the ActiveRecordBaseQuery class.

AddModifier ( IQueryModifier modifier ) : void

Adds a query modifier, to be applied with ApplyModifiers.

ApplyModifiers ( IQuery query ) : void

Applies the modifiers added with AddModifier.

This method is not called automatically by ActiveRecordBaseQuery, but is called from HqlBasedQuery.

CreateQuery ( ISession session ) : IQuery

Creates the IQuery instance.

InternalEnumerate ( ISession session ) : IEnumerable

Simply creates the query and then call its IQuery.Enumerable() method. Note: Only use when you expect most of the results to be in the second level cache

InternalExecute ( ISession session ) : object

Simply creates the query and then call its IQuery.List() method.

Private Methods

Method Description
AddQuery ( ISession session, IMultiQuery multiquery ) : void

Add this query to a multiquery

GetResultsArray ( Type t, IList list, bool distinct ) : Array
GetResultsArray ( Type t, IList list, int entityIndex, bool distinct ) : Array
IActiveRecordQuery ( ISession session ) : IEnumerable

Enumerates over the result of the query. Note: Only use if you expect most of your values to already exist in the second level cache!

IActiveRecordQuery ( ISession session ) : object

Executes the specified query and return the results

Method Details

ActiveRecordBaseQuery() protected method

Initializes a new instance of the ActiveRecordBaseQuery class.
protected ActiveRecordBaseQuery ( Type rootType ) : System
rootType System.Type The type.
return System

AddModifier() protected method

Adds a query modifier, to be applied with ApplyModifiers.
protected AddModifier ( IQueryModifier modifier ) : void
modifier IQueryModifier The modifier
return void

ApplyModifiers() protected method

Applies the modifiers added with AddModifier.
This method is not called automatically by ActiveRecordBaseQuery, but is called from HqlBasedQuery.
protected ApplyModifiers ( IQuery query ) : void
query IQuery The query in which to apply the modifiers
return void

Clone() public method

Just a default clone implementation...
public Clone ( ) : object
return object

CreateQuery() protected abstract method

Creates the IQuery instance.
protected abstract CreateQuery ( ISession session ) : IQuery
session ISession
return IQuery

GetModifiers() public static method

Gets the internal list of modifiers used by the specified query. NOT INTENTED FOR NORMAL USE.
public static GetModifiers ( ActiveRecordBaseQuery query ) : IList
query ActiveRecordBaseQuery
return IList

InternalEnumerate() protected method

Simply creates the query and then call its IQuery.Enumerable() method. Note: Only use when you expect most of the results to be in the second level cache
protected InternalEnumerate ( ISession session ) : IEnumerable
session ISession The NHibernate's
return IEnumerable

InternalExecute() protected method

Simply creates the query and then call its IQuery.List() method.
protected InternalExecute ( ISession session ) : object
session ISession The NHibernate's
return object

Property Details

queryModifiers protected property

list of modifiers for the query
protected IList queryModifiers
return IList