* Get query object. * * @category Helper
()
| 393 | * @category Helper |
| 394 | */ |
| 395 | public getQueryObject(): ParamBag<any> { |
| 396 | const foo: ParamBag<any> = JSON.parse(JSON.stringify(this.data)); |
| 397 | |
| 398 | if (this.data.include.length > 0) { |
| 399 | foo.include = this.data.include.join(','); |
| 400 | } else { |
| 401 | delete foo.include; |
| 402 | } |
| 403 | |
| 404 | if (this.data.sort.length > 0) { |
| 405 | foo.sort = this.data.sort.join(','); |
| 406 | } else { |
| 407 | delete foo.sort; |
| 408 | } |
| 409 | |
| 410 | return foo; |
| 411 | } |
| 412 | |
| 413 | /** |
| 414 | * Get query string. |