TechTalk Genome v4.2

Set.GetRange Method (Int32, Int32, GetRangeMethod, String, Object[])

Returns a Set containing a range of elements in the source Set using element indexing order established by the specified OQL order clause.

public Set GetRange(
   int first,
   int count,
   GetRangeMethod hintedMethod,
   string orderBy,
   params object[] parameters
);

Parameters

first
The zero-based index in the source Set.
count
The number of elements in the range starting from first.
hintedMethod
A value specifying which query building method should be used to compute the query of the resulting Set.
orderBy
An OQL order clause consisting of comma-separated list of one or more OQL expressions and order specifications. The expression may contain zero or more literal parameter references and it can refer to the candidate element of the source Set using the this keyword.
parameters
An array of zero or more objects that can be used as literal argument values in orderBy.

Return Value

A Set representing a range of elements in the source Set.

Remarks

When the set is not ordered by unique fields or expression, items may appear duplicated or disappear from the result between pages.

Exceptions

Exception TypeCondition
OqlParserExceptionorderBy does not denote a valid OQL order clause.
SqlDomException

orderBy is not applicable to the element type of the source Set.

or

orderBy can not be translated to the target SQL language.

SchemaExceptionorderBy contains expressions or features that cannot be translated with the given DataDomainSchema.

Requirements

Namespace: TechTalk.Genome

Assembly: TechTalk.Genome (in TechTalk.Genome.dll)

Version: 4.2.11.59

Editions: Professional, Evaluation, Express

See Also

Set Class | TechTalk.Genome Namespace | Set.GetRange Overload List | OrderBy | GetRange