lumis.doui.table
Class TableSource

Package class diagram package TableSource
java.lang.Object
  extended by java.util.Observable
      extended by lumis.doui.source.Source<F>
          extended by lumis.doui.source.TabularSource<ITableSourceField>
              extended by lumis.doui.table.TableSource
All Implemented Interfaces:
Comparator<ISourceData>
Direct Known Subclasses:
ContentTableSource

@StableMinor(version="4.1",
             sinceVersion="4.0")
public class TableSource
extends TabularSource<ITableSourceField>

A source that is based on a database table.

Since:
4.0.0

Field Summary
 
Fields inherited from class lumis.doui.source.TabularSource
primaryKeySourceField, searchableSourceFields, tabularData
 
Fields inherited from class lumis.doui.source.Source
administrationInterfaceId, connectionId, fields, fieldsMap, id, introductionSourceField, load, metaDataSourceId, parameters, primaryNameSourceField, readData, SOURCE_READ_DATA_ALWAYS, SOURCE_READ_DATA_NEVER, SOURCE_READ_DATA_ON_DEMAND, sourceContext, sourceDefinitionNode
 
Constructor Summary
TableSource(Node sourceDefinitionNode, ISourceContext sourceContext)
          Creates a tabular source.
 
Method Summary
protected  ITableSourceFilter createDefaultCompositeFilterInstance()
          Creates and returns a source filter instance to be used as default to filters nodes.
protected  ITableSourceFilter createDefaultFilterInstance()
          Creates and returns a source filter instance to be used as default to filter nodes.
protected  ITableSourceField createSourceField(Node fieldNode)
          Factory method for creating a source field instance that corresponds to the field node given.
 ITableSourceFilter createSourceFilter(Node filterNode)
          Creates a source filter for the given filter definition node.
protected  String getDefaultProviderClass()
          Returns data provider class for the source.
 ITableSourceFilter getFilter()
          Returns the filter for this source.
 String getTableName()
          Returns the table name for this source.
 TabularData readData(String[] primaryKeyValues, ITransaction transaction)
          Reads the data with the given primary key values, and returns it.
 ISourceData readData(String primaryKeyValue, ITransaction transaction)
          Reads the data with the given primary key value, and returns it.
 
Methods inherited from class lumis.doui.source.TabularSource
applyPostLoadFilters, applyPostLoadPagination, compare, compareField, convertDataToDefinedDataTypes, getData, getDefaultSourceSearchContentFillerClassName, getDouiHyperlinkItemParameterField, getFieldClass, getFieldId, getFieldIds, getFieldName, getFieldsDefinitionNode, getIndexerEngineId, getIndexerId, getMaxRows, getPrimaryKeyField, getReindexerTabularDataProcessorClassName, getSearchableFields, getSearcherEngineId, getSearcherId, getSortedFieldIds, getSourceSearchContentFillerClassName, getStartAt, hasField, isSearchEnabled, readFieldsIntoFieldsMap, setData, setMaxRows, setStartAt
 
Methods inherited from class lumis.doui.source.Source
createCustomSourceField, getAdministrationInterfaceId, getDataProvider, getDefinitionNode, getDistinct, getDouiContext, getField, getFields, getFiltersNode, getId, getIntroductionField, getLoad, getMetaDataSourceId, getParameterClass, getParameterValue, getPrimaryNameField, getReadData, getSourceContainer, getSourceContext, getTransaction, isAdministrationInterface, load, postProcessSource, setLoad, setParameterValue, setReadData, valueChanged
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

TableSource

public TableSource(Node sourceDefinitionNode,
                   ISourceContext sourceContext)
            throws PortalException
Creates a tabular source.

Parameters:
sourceDefinitionNode - the source definition node.
sourceContext - the source context.
Throws:
PortalException
Since:
4.0.4
Method Detail

getTableName

public String getTableName()
Returns the table name for this source.

Returns:
the table name for this source.
Since:
4.0.5

createSourceFilter

public ITableSourceFilter createSourceFilter(Node filterNode)
                                      throws PortalException
Description copied from class: Source
Creates a source filter for the given filter definition node. The node may be a filters or filter node.

Overrides:
createSourceFilter in class Source<ITableSourceField>
Parameters:
filterNode - the filter definition node.
Returns:
the source filter.
Throws:
PortalException

createDefaultCompositeFilterInstance

protected ITableSourceFilter createDefaultCompositeFilterInstance()
Description copied from class: Source
Creates and returns a source filter instance to be used as default to filters nodes.

Overrides:
createDefaultCompositeFilterInstance in class Source<ITableSourceField>
Returns:
the created instance.

createDefaultFilterInstance

protected ITableSourceFilter createDefaultFilterInstance()
Description copied from class: Source
Creates and returns a source filter instance to be used as default to filter nodes.

Overrides:
createDefaultFilterInstance in class Source<ITableSourceField>
Returns:
the created instance.

getFilter

public ITableSourceFilter getFilter()
Description copied from class: Source
Returns the filter for this source. The filter must be initialized with the appropriated parameters before each use.

Overrides:
getFilter in class Source<ITableSourceField>
Returns:
the filter or null if this source has no filter.

createSourceField

protected ITableSourceField createSourceField(Node fieldNode)
                                       throws PortalException
Description copied from class: Source
Factory method for creating a source field instance that corresponds to the field node given. This method instantiate and returns the source field, without initializing it.

Overrides:
createSourceField in class TabularSource<ITableSourceField>
Parameters:
fieldNode - the field node.
Returns:
the ISourceField created, or null if no field should be created for this node.
Throws:
PortalException
See Also:
Source.createCustomSourceField(Node)

readData

public ISourceData readData(String primaryKeyValue,
                            ITransaction transaction)
                     throws PortalException
Reads the data with the given primary key value, and returns it.

Parameters:
primaryKeyValue - the primary key value of the desired data.
transaction - the transaction for persistence access.
Returns:
the data with the given primary key value.
Throws:
PortalException

readData

public TabularData readData(String[] primaryKeyValues,
                            ITransaction transaction)
                     throws PortalException
Reads the data with the given primary key values, and returns it.

Parameters:
primaryKeyValues - the primary key values of the desired data.
transaction - the transaction for persistence access.
Returns:
the data with the given primary key values.
Throws:
PortalException

getDefaultProviderClass

protected String getDefaultProviderClass()
                                  throws PortalException
Description copied from class: TabularSource
Returns data provider class for the source. Always throws an exceptions since this source does not have a default provider class.

Overrides:
getDefaultProviderClass in class TabularSource<ITableSourceField>
Returns:
Throws:
PortalException


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.