Class AbstractDataSourceComponentDataBuilder

java.lang.Object
com.ptc.mvc.components.ds.AbstractDataSourceComponentDataBuilder
All Implemented Interfaces:
ComponentDataBuilder, com.ptc.mvc.components.ConvertingComponentDataBuilder, com.ptc.mvc.ds.server.DataSourceSessionAware
Direct Known Subclasses:
AbstractJcaDataSourceComponentDataBuilder

public abstract class AbstractDataSourceComponentDataBuilder extends Object implements com.ptc.mvc.components.ConvertingComponentDataBuilder, com.ptc.mvc.ds.server.DataSourceSessionAware
A base class for ComponentDataBuilder implementations that use DataSources.

Supported API: true

Extendable: true
  • Constructor Details

    • AbstractDataSourceComponentDataBuilder

      public AbstractDataSourceComponentDataBuilder()


      Supported API: true
    • AbstractDataSourceComponentDataBuilder

      public AbstractDataSourceComponentDataBuilder(com.ptc.mvc.ds.server.DataSourceSession dataSourceSession, com.ptc.mvc.components.ComponentDataConverter componentDataConverter)
      Parameters:
      dataSourceSession -
      componentDataConverter -

      Supported API: true
  • Method Details

    • buildRawData

      protected abstract Object buildRawData(ComponentConfig config, ComponentParams params) throws Exception
      provide the raw data in case of dataSource disabled or synchronous.
      Parameters:
      config -
      params -
      Returns:
      Throws:
      Exception -
      Supported API: true

    • isDynamic

      protected abstract boolean isDynamic(ComponentConfig config, ComponentParams params) throws Exception
      Is the request dynamic or not.
      Parameters:
      config -
      params -
      Returns:
      Throws:
      Exception -
      Supported API: true

    • isComponentDataNeeded

      protected abstract boolean isComponentDataNeeded(ComponentConfig config, ComponentParams params) throws Exception
      Hook to allow data retrieval to be skipped, if necessary
      Parameters:
      config -
      params -
      Returns:
      Whether or not to retrieve data. If false, the internal builder is never called

      Supported API: true

      Throws:
      Exception
    • getComponentLimit

      protected abstract int getComponentLimit(ComponentConfig config, ComponentParams params)
      The maximum number of rows to be supplied to the component.
      Parameters:
      config -
      params -
      Returns:


      Supported API: true

    • getComponentOffSet

      protected abstract int getComponentOffSet(ComponentConfig config, ComponentParams params)
      Offset from which the data need to be supplied to the component
      Parameters:
      config -
      params -
      Returns:


      Supported API: true

    • buildRawDataAsync

      protected void buildRawDataAsync(ComponentResultProcessor processor) throws Exception
      Called when the data-source is being populated by an asynchronous background thread. The default implementation simply adds the data returned by buildRawData to the processor, but subclasses may choose to retrieve a result stream from their backing store and then add rows to the processor as they become available.
      Parameters:
      processor -
      Throws:
      Exception -

      Supported API: true