Package com.smartgwt.client.data

# Class RequestTransformer

java.lang.Object
com.smartgwt.client.data.RequestTransformer

public abstract class RequestTransformer extends Object
The RequestTransformer provides the equivalent functionality of overriding `DataSource.transformRequest(DSRequest)` when instantiating a DataSource on the client. However when obtaining a DataSource instance from the server using `DataSource.getDataSource(java.lang.String)`, `transformRequest(DSRequest)` and `#transformResponse(DSResponse, DSRequest, Object)` cannot be overridden and so the requestTransformer parameter can be passed to `DataSource.getDataSource(java.lang.String)` instead.

See Also:
  - `DataSource.getDataSource(java.lang.String)`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RequestTransformer()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `getDefaultTransformRequest(DSRequest dsRequest)`
  Return the result of the default transformed request.
  `protected abstract Object`
  `transformRequest(DSRequest dsRequest)`
  See the docs for `DataSource.transformRequest(DSRequest)`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### RequestTransformer

    public RequestTransformer()

- ## Method Details

  - ### transformRequest

    protected abstract Object transformRequest(DSRequest dsRequest)
    See the docs for `DataSource.transformRequest(DSRequest)`.
    Parameters:
      `dsRequest` - the DSRequest being processed
    Returns:
      data to be sent to the dataURL (JavaScriptObject, String or Record)

  - ### getDefaultTransformRequest

    public Object getDefaultTransformRequest(DSRequest dsRequest)
    Return the result of the default transformed request.
    Parameters:
      `dsRequest` - the request
    Returns:
      the default transformed request