Namespaces

Types

Type IQuery

Namespace NHibernate

Methods

Properties

Public instance methods

IEnumerable Enumerable()

Return the query results as an IEnumerable . If the query contains multiple results per row, the results are returned in an instance of object[] .
Parameters
return IEnumerable

IEnumerable<T> Enumerable<T>()

Strongly-typed version of Enumerable .
Parameters
return IEnumerable<T>

void List(IList results)

Return the query results an place them into the IList .
Parameters
IList results The IList to place the results in.

IList List()

Return the query results as an IList . If the query contains multiple results per row, the results are returned in an instance of object[] .
This is a good strategy to use if you expect few of the objects being returned are already loaded or if you want to fill the 2nd level cache.
Parameters
return IList The IList filled with the results.

IList<T> List<T>()

Strongly-typed version of List .
Parameters
return IList<T>

IQuery SetAnsiString(string name, string val)

Bind an instance of a String to a named parameter using an NHibernate AnsiStringType .
Parameters
return IQuery
string name The name of the parameter
string val A non-null instance of a String .

IQuery SetAnsiString(int position, string val)

Bind an instance of a String to an indexed parameter using an NHibernate AnsiStringType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
string val A non-null instance of a String .

IQuery SetBinary(string name, Byte[] val)

Parameters
return IQuery
string name
Byte[] val

IQuery SetBinary(int position, Byte[] val)

Parameters
return IQuery
int position
Byte[] val

IQuery SetBoolean(string name, bool val)

Bind an instance of a Boolean to a named parameter using an NHibernate BooleanType .
Parameters
return IQuery
string name The name of the parameter
bool val A non-null instance of a Boolean .

IQuery SetBoolean(int position, bool val)

Bind an instance of a Boolean to an indexed parameter using an NHibernate BooleanType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
bool val A non-null instance of a Boolean .

IQuery SetByte(string name, Byte val)

Bind an instance of a Byte to a named parameter using an NHibernate ByteType .
Parameters
return IQuery
string name The name of the parameter
Byte val A non-null instance of a Byte .

IQuery SetByte(int position, Byte val)

Bind an instance of a Byte to an indexed parameter using an NHibernate ByteType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
Byte val A non-null instance of a Byte .

IQuery SetCacheable(bool cacheable)

Enable caching of this query result set.
Parameters
return IQuery
bool cacheable Should the query results be cacheable?

IQuery SetCacheRegion(string cacheRegion)

Parameters
return IQuery
string cacheRegion ${WriteSummary(content)}

IQuery SetCharacter(string name, Char val)

Bind an instance of a Char to a named parameter using an NHibernate CharType .
Parameters
return IQuery
string name The name of the parameter
Char val A non-null instance of a Char .

IQuery SetCharacter(int position, Char val)

Bind an instance of a Char to an indexed parameter using an NHibernate CharType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
Char val A non-null instance of a Char .

IQuery SetDateTime(string name, DateTime val)

Bind an instance of a DateTime to a named parameter using an NHibernate DateTimeType .
Parameters
return IQuery
string name The name of the parameter
DateTime val A non-null instance of a DateTime .

IQuery SetDateTime(int position, DateTime val)

Bind an instance of a DateTime to an indexed parameter using an NHibernate DateTimeType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
DateTime val A non-null instance of a DateTime .

IQuery SetDecimal(string name, decimal val)

Bind an instance of a Decimal to a named parameter using an NHibernate DecimalType .
Parameters
return IQuery
string name The name of the parameter
decimal val A non-null instance of a Decimal .

IQuery SetDecimal(int position, decimal val)

Bind an instance of a Decimal to an indexed parameter using an NHibernate DecimalType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
decimal val A non-null instance of a Decimal .

IQuery SetDouble(string name, double val)

Bind an instance of a Double to a named parameter using an NHibernate DoubleType .
Parameters
return IQuery
string name The name of the parameter
double val A non-null instance of a Double .

IQuery SetDouble(int position, double val)

Bind an instance of a Double to an indexed parameter using an NHibernate DoubleType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
double val A non-null instance of a Double .

IQuery SetEntity(string name, object val)

Bind an instance of a mapped persistent class to a named parameter.
Parameters
return IQuery
string name The name of the parameter
object val A non-null instance of a persistent class

IQuery SetEntity(int position, object val)

Bind an instance of a mapped persistent class to an indexed parameter.
Parameters
return IQuery
int position Position of the parameter in the query string, numbered from 0
object val A non-null instance of a persistent class

IQuery SetEnum(string name, Enum val)

Bind an instance of a persistent enumeration class to a named parameter using an NHibernate PersistentEnumType .
Parameters
return IQuery
string name The name of the parameter
Enum val A non-null instance of a persistent enumeration

IQuery SetEnum(int position, Enum val)

Bind an instance of a persistent enumeration class to an indexed parameter using an NHibernate PersistentEnumType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
Enum val A non-null instance of a persistent enumeration

IQuery SetFirstResult(int firstResult)

Sets the first row to retrieve.
Parameters
return IQuery
int firstResult The first row to retreive.

IQuery SetFlushMode(FlushMode flushMode)

Override the current session flush mode, just for this query.
Parameters
return IQuery
FlushMode flushMode

IQuery SetForceCacheRefresh(bool forceCacheRefresh)

Parameters
return IQuery
bool forceCacheRefresh Should the query result in a forceable refresh of the query cache?

IQuery SetGuid(int position, Guid val)

Bind an instance of a Guid to a named parameter using an NHibernate GuidType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
Guid val An instance of a Guid .

IQuery SetGuid(string name, Guid val)

Bind an instance of a Guid to a named parameter using an NHibernate GuidType .
Parameters
return IQuery
string name The name of the parameter
Guid val An instance of a Guid .

IQuery SetInt16(string name, short val)

Bind an instance of a Int16 to a named parameter using an NHibernate Int16Type .
Parameters
return IQuery
string name The name of the parameter
short val A non-null instance of a Int16 .

IQuery SetInt16(int position, short val)

Bind an instance of a Int16 to an indexed parameter using an NHibernate Int16Type .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
short val A non-null instance of a Int16 .

IQuery SetInt32(int position, int val)

Bind an instance of a Int32 to an indexed parameter using an NHibernate Int32Type .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
int val A non-null instance of a Int32 .

IQuery SetInt32(string name, int val)

Bind an instance of a Int32 to a named parameter using an NHibernate Int32Type .
Parameters
return IQuery
string name The name of the parameter
int val A non-null instance of a Int32 .

IQuery SetInt64(int position, long val)

Bind an instance of a Int64 to an indexed parameter using an NHibernate Int64Type .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
long val A non-null instance of a Int64 .

IQuery SetInt64(string name, long val)

Bind an instance of a Int64 to a named parameter using an NHibernate Int64Type .
Parameters
return IQuery
string name The name of the parameter
long val A non-null instance of a Int64 .

void SetLockMode(string alias, LockMode lockMode)

Set the lockmode for the objects idententified by the given alias that appears in the FROM clause.
Parameters
string alias alias a query alias, or this for a collection filter
LockMode lockMode

IQuery SetMaxResults(int maxResults)

Set the maximum number of rows to retrieve.
Parameters
return IQuery
int maxResults The maximum number of rows to retreive.

IQuery SetParameter(string name, object val)

Bind a value to a named query parameter, guessing the NHibernate IType from the class of the given object.
Parameters
return IQuery
string name The name of the parameter
object val The non-null parameter value

IQuery SetParameter(string name, object val, IType type)

Bind a value to a named query parameter
Parameters
return IQuery
string name The name of the parameter
object val The possibly null parameter value
IType type The NHibernate IType .

IQuery SetParameter(int position, object val)

Bind a value to an indexed parameter, guessing the Hibernate type from the class of the given object.
Parameters
return IQuery
int position The position of the parameter in the query, numbered from 0
object val The non-null parameter value

IQuery SetParameter(int position, object val, IType type)

Bind a value to an indexed parameter.
Parameters
return IQuery
int position Postion of the parameter in the query, numbered from 0
object val The possibly null parameter value
IType type The Hibernate type

IQuery SetParameterList(string name, IEnumerable vals)

Bind multiple values to a named query parameter, guessing the Hibernate type from the class of the first object in the collection. This is useful for binding a list of values to an expression such as foo.bar in (:value_list)
Parameters
return IQuery
string name The name of the parameter
IEnumerable vals A collection of values to list

IQuery SetParameterList(string name, IEnumerable vals, IType type)

Bind multiple values to a named query parameter. This is useful for binding a list of values to an expression such as foo.bar in (:value_list)
Parameters
return IQuery
string name The name of the parameter
IEnumerable vals A collection of values to list
IType type The Hibernate type of the values

IQuery SetProperties(object obj)

Bind the property values of the given object to named parameters of the query, matching property names with parameter names and mapping property types to Hibernate types using heuristics.
Parameters
return IQuery
object obj Any PONO

IQuery SetResultTransformer(IResultTransformer resultTransformer)

Set a strategy for handling the query results. This can be used to change "shape" of the query result.
Parameters
return IQuery
IResultTransformer resultTransformer

IQuery SetSingle(int position, float val)

Bind an instance of a Single to an indexed parameter using an NHibernate SingleType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
float val A non-null instance of a Single .

IQuery SetSingle(string name, float val)

Bind an instance of a Single to a named parameter using an NHibernate SingleType .
Parameters
return IQuery
string name The name of the parameter
float val A non-null instance of a Single .

IQuery SetString(string name, string val)

Bind an instance of a String to a named parameter using an NHibernate StringType .
Parameters
return IQuery
string name The name of the parameter
string val A non-null instance of a String .

IQuery SetString(int position, string val)

Bind an instance of a String to an indexed parameter using an NHibernate StringType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
string val A non-null instance of a String .

IQuery SetTime(string name, DateTime val)

Bind an instance of a DateTime to a named parameter using an NHibernate DateTimeType .
Parameters
return IQuery
string name The name of the parameter
DateTime val A non-null instance of a DateTime .

IQuery SetTime(int position, DateTime val)

Bind an instance of a DateTime to an indexed parameter using an NHibernate DateTimeType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
DateTime val A non-null instance of a DateTime .

IQuery SetTimeout(int timeout)

The timeout for the underlying ADO query
Parameters
return IQuery
int timeout

IQuery SetTimestamp(string name, DateTime val)

Bind an instance of a DateTime to a named parameter using an NHibernate TimestampType .
Parameters
return IQuery
string name The name of the parameter
DateTime val A non-null instance of a DateTime .

IQuery SetTimestamp(int position, DateTime val)

Bind an instance of a DateTime to an indexed parameter using an NHibernate TimestampType .
Parameters
return IQuery
int position The position of the parameter in the query string, numbered from 0
DateTime val A non-null instance of a DateTime .

object UniqueResult()

Convenience method to return a single instance that matches the query, or null if the query returns no results.
Parameters
return object ${WriteSummary(content)}

T UniqueResult<T>()

Strongly-typed version of UniqueResult .
Parameters
return T

Public properties

String[] NamedParameters get;

The names of all named parameters of the query
return String[]

string QueryString get;

The query string
return string

IType[] ReturnTypes get;

The Hibernate types of the query result set.
return IType[]