Show / Hide Table of Contents

Class Pager

Data transfer object (DTO) used primarily within the SDK to easily specify various criteria supporting paging operations. This class follows the builder pattern and contains an inner static Builder class used to build this object with the various attributes/properties.

Inheritance
System.Object
Pager
Namespace: Ellucian.Ethos.Integration.Client.Proxy
Assembly: Ellucian.Ethos.Integration.dll
Syntax
public class Pager : object

Properties

CriteriaFilter

The optional request URL criteria used when paging.

Declaration
public string CriteriaFilter { get; }
Property Value
Type Description
System.String

EthosResponse

Ethos response.

Declaration
public EthosResponse EthosResponse { get; }
Property Value
Type Description
EthosResponse

FilterMap

The optional request URL filter map used when paging.

Declaration
public string FilterMap { get; }
Property Value
Type Description
System.String

HowToPage

The pagingType for how to page.

Declaration
public Pager.PagingType HowToPage { get; set; }
Property Value
Type Description
Pager.PagingType

NamedQueryFilter

The optional request URL named query used when paging.

Declaration
public string NamedQueryFilter { get; }
Property Value
Type Description
System.String

NumPages

The number of pages to page for.

Declaration
public int NumPages { get; }
Property Value
Type Description
System.Int32

NumRows

The number of rows to page for. Data is still returned in pages up to the number of rows when this is specified.

Declaration
public int NumRows { get; }
Property Value
Type Description
System.Int32

Offset

The offset to begin paging from.

Declaration
public int Offset { get; }
Property Value
Type Description
System.Int32

PageSize

The pageSize specified when paging.

Declaration
public int PageSize { get; }
Property Value
Type Description
System.Int32

QapiRequestBody

The optional QAPI request body used when making filter QAPI POST request.

Declaration
public string QapiRequestBody { get; }
Property Value
Type Description
System.String

ResourceName

The resource name used when paging.

Declaration
public string ResourceName { get; }
Property Value
Type Description
System.String

ShouldDoPaging

Indicator of whether paging should be done or not for a given request.

Declaration
public bool ShouldDoPaging { get; }
Property Value
Type Description
System.Boolean

TotalCount

The total count (of rows) for a given resource.

Declaration
public int TotalCount { get; }
Property Value
Type Description
System.Int32

Version

The version specified when paging.

Declaration
public string Version { get; }
Property Value
Type Description
System.String

Methods

Build(Action<Pager>)

An inner static Builder class used for building the Pager object with various criteria. This uses the builder fluent API pattern. All of the attributes in this Builder class correspond to the attributes in the containing Pager class.

Declaration
public static Pager Build(Action<Pager> action)
Parameters
Type Name Description
Action<Pager> action

Takes an Action delegate.

Returns
Type Description
Pager
Examples
Pager pager = Pager.Build(p =>
{
	p.ForResource("student-cohorts")
	.WithPageSize(5)
	.ForVersion("12")
	.ForNumPages(10)
	.ForNumRows(5);
});

ForNumPages(Int32)

Sets number of pages.

Declaration
public Pager ForNumPages(int forNumPages)
Parameters
Type Name Description
System.Int32 forNumPages
Returns
Type Description
Pager

ForNumRows(Int32)

Assigns the specified numRows and returns this builder for fluent API functionality.

Declaration
public Pager ForNumRows(int forNumRows)
Parameters
Type Name Description
System.Int32 forNumRows

The number of rows to page for. Data is returned in pages up to the specified number of rows.

Returns
Type Description
Pager

Pager object.

ForPagerType(Pager.PagingType)

Assigns the specified PagingType for how to page and returns this builder for fluent API functionality.

Declaration
public Pager ForPagerType(Pager.PagingType pagingType)
Parameters
Type Name Description
Pager.PagingType pagingType

Must be of the PagingType enumeration defined in the Pager class, and used to determine how to page.

Returns
Type Description
Pager

Pager object.

ForResource(String)

Assigns the given resourceName to the resourceName of Pager.

Declaration
public Pager ForResource(string resourceName)
Parameters
Type Name Description
System.String resourceName

Name of the resource e.g. student-cohorts

Returns
Type Description
Pager

Pager object.

ForVersion(String)

Assigns the specified version and returns this builder for fluent API functionality.

Declaration
public Pager ForVersion(string version)
Parameters
Type Name Description
System.String version

The version of the Ethos resource (A.K.A media type).

Returns
Type Description
Pager

Pager object.

FromOffSet(Int32)

Assigns the specified offset and returns this builder for fluent API functionality.

Declaration
public Pager FromOffSet(int forOffSet)
Parameters
Type Name Description
System.Int32 forOffSet

The offset (row number) to start paging from.

Returns
Type Description
Pager

Pager object.

WithCriteriaFilter(String)

Assigns the specified request URL criteria filter and returns this builder for fluent API functionality. Nulls out the namedQueryFilter and filterMap because there can only be one filter approach used at a time. Nulls out the namedQueryFilter, filterMap, and qapiRequestBody because there can only be one filter approach used at a time.

Declaration
public Pager WithCriteriaFilter(string criteriaFilter)
Parameters
Type Name Description
System.String criteriaFilter

The request URL criteria-based filter which can also be used when paging.

Returns
Type Description
Pager

The Builder with the criteria filter assigned.

WithFilterMap(String)

Assigns the specified request URL filter map and returns this builder for fluent API functionality. Nulls out the criteriaFilter, namedQueryFilter, and qapiRequestBody because there can only be one filter approach used at a time.

Declaration
public Pager WithFilterMap(string filterMap)
Parameters
Type Name Description
System.String filterMap

The request URL filter map which can also be used when paging.

Returns
Type Description
Pager

The Builder with the filter map assigned.

WithNamedQuery(String)

Assigns the specified request URL named query filter and returns this builder for fluent API functionality. Nulls out the criteriaFilter, filterMap, and qapiRequestBody because there can only be one filter approach used at a time.

Declaration
public Pager WithNamedQuery(string namedQuery)
Parameters
Type Name Description
System.String namedQuery

The request URL Named Query filter which can also be used when paging.

Returns
Type Description
Pager

The Builder with the criteria filter assigned.

WithPageSize(Int32)

Assigns the specified pageSize and returns this builder for fluent API functionality.

Declaration
public Pager WithPageSize(int pageSize)
Parameters
Type Name Description
System.Int32 pageSize

The pageSize (number of rows in each response) to page with.

Returns
Type Description
Pager

Pager object.

WithQAPIRequestBodyFilter(String)

Assigns the specified QAPI request request body and returns this builder for fluent API functionality. Nulls out the criteriaFilter, namedQueryFilter and filterMap because there can only be one filter approach used at a time.

Declaration
public void WithQAPIRequestBodyFilter(string qapiRequestBody)
Parameters
Type Name Description
System.String qapiRequestBody

The QAPI request body which can also be used when paging.

In This Article
Back to top Generated by DocFX