Package com.ptc.mvc.components.ds
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
Supported API: true
Extendable: true
-
Constructor Summary
ConstructorsConstructorDescription
Supported API: trueAbstractDataSourceComponentDataBuilder(com.ptc.mvc.ds.server.DataSourceSession dataSourceSession, com.ptc.mvc.components.ComponentDataConverter componentDataConverter) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ObjectbuildRawData(ComponentConfig config, ComponentParams params) provide the raw data in case of dataSource disabled or synchronous.protected voidbuildRawDataAsync(ComponentResultProcessor processor) Called when the data-source is being populated by an asynchronous background thread.protected abstract intgetComponentLimit(ComponentConfig config, ComponentParams params) The maximum number of rows to be supplied to the component.protected abstract intgetComponentOffSet(ComponentConfig config, ComponentParams params) Offset from which the data need to be supplied to the componentprotected abstract booleanisComponentDataNeeded(ComponentConfig config, ComponentParams params) Hook to allow data retrieval to be skipped, if necessaryprotected abstract booleanisDynamic(ComponentConfig config, ComponentParams params) Is the request dynamic or not.
-
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
The maximum number of rows to be supplied to the component.- Parameters:
config-params-- Returns:
Supported API: true
-
getComponentOffSet
Offset from which the data need to be supplied to the component- Parameters:
config-params-- Returns:
Supported API: true
-
buildRawDataAsync
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
-