Class

# VMware_VCloud_SDK_Query_Params

class VMware_VCloud_SDK_Query_Params

## Methods

| __construct($params = null) Constructor |
array | getParams() Returns query parameters. |
| setParams(array $params) Sets query parameters. |
| setFilter(string $filter) Sets the query condition. |
| setFields(string $fields) Sets fields to retrieve. |
| setPageSize(int $pageSize) Sets the size of the page when displaying query output. |
| setPage(int $page) Sets the page number of the query output to retrieve. |
| setSortDesc(string $fields, string $pname = 'sortDesc') Sets the field(s) name by which to sort in the descending order. |
| setSortAsc(string $fields) Sets the field(s) name by which to sort in the ascending order. |

## Details

###
at line 23
`public __construct($params = null)`

Constructor

Initialize the query parameters.

#### Parameters

| $params |

###
at line 37
`public array getParams()`

Returns query parameters.

#### Return Value

array |

###
at line 48
`public setParams(array $params)`

Sets query parameters.

#### Parameters

array | $params |

###
at line 61
`public setFilter(string $filter)`

Sets the query condition.

For example: $params->setFilter('(name==vApp*;category==Catalog%20Item)');

#### Parameters

string | $filter | An FIQL statement.

#### See also

http://wattle.apnic.net/ietf/all-ids/draft-nottingham-atompub-fiql-00.txt |

###
at line 76
`public setFields(string $fields)`

Sets fields to retrieve.

For example: $params->setFields('name,category');

#### Parameters

string | $fields | A comma separeted fields string.

###
at line 90
`public setPageSize(int $pageSize)`

Sets the size of the page when displaying query output.

#### Parameters

int | $pageSize |

###
at line 104
`public setPage(int $page)`

Sets the page number of the query output to retrieve.

#### Parameters

int | $page | Maximum is 100.

###
at line 126
`public setSortDesc(string $fields, string $pname = 'sortDesc')`

Sets the field(s) name by which to sort in the descending order.

Field name comes first has higher priority in the sorting. For example, when $fields = 'LastName, FirstName', the records of the query result will be sorted first by the 'LastName' column, and then the 'FirstName' column. This parameter can only be used when the query output format is set as 'records'. For example: $params->setSortDesc('name,category');

#### Parameters

string | $fields | Comma separated field(s) name
string | $pname | Query sorting parameter names, allowed values are: 'sortDesc', 'sortAsc'.

###
at line 154
`public setSortAsc(string $fields)`

Sets the field(s) name by which to sort in the ascending order.

This parameter can only be used when the query output format is set as 'records'. For example: $params->setSortAsc('name,category');

#### Parameters

string | $fields | Comma separted field(s) name.