Package com.smartgwt.client.docs
Interface OdataDataSource
public interface OdataDataSource
Server-side OData DataSource
ODataDataSource
is a built-in server-side DataSource
implementation that extends RestConnector
to add functionality for REST
webservices that follow the OData protocol. Everything
that applies to RestConnector
also applies to ODataDataSource
- it
is configured in the same way, provides the same support for pervasive Velocity templating,
etc. In addition to the regular RestConnector
facilities,
ODataDataSource
adds the following support, specifically for REST services that
follow the OData protocol
- Generate an OData-compliant
"$filter" query from standard Smart GWT criteria. Note, the generated filter query will
convert
textMatchStyle
to the corresponding OData function ("substring
" becomes "contains
" and "startsWith
" becomes "startswith
"; other textMatchStyles just generate straight equality checks), but there is no current support for trueAdvancedCriteria
- Generate an OData "$orderby" parameter from the Smart GWT sortBy information
- Generate an OData "$select" parameter from the Smart GWT "outputs" information
- Derive "$skip" and "$top" attributes from the Smart GWT startRow and endRow
- Derive and apply the necessary "maxpagesize" Prefer header to encourage the remote server to allow the page size we would like to use
- Request the OData "$count" property and make use of it to populate totalRows.
- Modify certain things to match the
OData defaults, where that differs from the normal
RestConnector
defaults - Apply all these generated and derived properties to the REST call