F
- the source field class for this source.@StableMinor(version="12.4", sinceVersion="4.0") public class TabularSource<F extends ITabularSourceField> extends Source<F> implements Comparator<ISourceData>
Modifier and Type | Field and Description |
---|---|
protected F |
positionSourceField
The position field of this source.
|
protected F |
primaryKeySourceField |
protected List<F> |
searchableSourceFields
Deprecated.
Since 8.1.0, lumis.search is deprecated and this field is no longer used.
|
protected TabularData |
tabularData |
addInterfaceId, administrationInterfaceId, connectionId, detailsInterfaceId, editInterfaceId, fields, fieldsMap, id, introductionSourceField, keywordsSourceField, load, metaDataSourceId, parameters, primaryNameSourceField, readData, SOURCE_READ_DATA_ALWAYS, SOURCE_READ_DATA_NEVER, SOURCE_READ_DATA_ON_DEMAND, sourceContext, sourceDefinitionNode
Constructor and Description |
---|
TabularSource(Node sourceDefinitionNode,
ISourceContext sourceContext)
Creates a tabular source.
|
Modifier and Type | Method and Description |
---|---|
void |
applyPostLoadFilters()
Apply the filters specified in this source to its data.
|
void |
applyPostLoadPagination()
Adjusts the data of this source for pagination.
|
int |
compare(ISourceData row1,
ISourceData row2)
Compares two rows based on the
DouiContext.DOUI_ORDER_BY_FIELD parameter value. |
protected int |
compareField(ISourceData row1,
ISourceData row2,
String fieldId,
String direction)
Returns an integer that represents the comparason between the same field value
of two different rows.
|
protected void |
convertDataToDefinedDataTypes()
Converts the data in this source to the values that should be used according to
its fields definitions.
|
protected TabularData |
convertDataToDefinedDataTypes(TabularData originalData)
Converts the given data to another data with the values that should be
used according to this source's fields definitions.
|
protected F |
createSourceField(Node fieldNode)
Factory method for creating a source field instance that corresponds
to the field node given.
|
int |
evaluateMaxRows(int maxRows)
Helper Method for evaluating which will be the value returned by
getMaxRows() after calling
setMaxRows(int) with this parameter. |
TabularData |
getData()
Returns this source's data.
|
protected <S extends Source<?>> |
getDefaultBigDataPersister()
Returns the default ISourceBigDataPersister implementation to be used for this source if the big data persisting
is not disabled and no specific persister class is configured for this source.
|
protected String |
getDefaultProviderClass()
Returns data provider class for the source.
|
protected String |
getDefaultSourceSearchContentFillerClassName()
Deprecated.
Since 8.1.0 this method is no longer used and remains only for binary compatibility, due
to lumis.search being replaced by lumis.portal.bigdata. Consider using
getDefaultBigDataPersister() instead. |
DouiHyperlinkItemParameterField |
getDouiHyperlinkItemParameterField()
Returns the information about the field that is associated with the item id page parameter.
|
Class |
getFieldClass(String fieldId)
Returns the class object of the field.
|
String |
getFieldId(String fieldCriteria)
Deprecated.
This method may be removed in the future, because it is
public and references field xml definition.
|
Set<String> |
getFieldIds(String fieldCriteria)
Deprecated.
This method may be removed in the future, because it is
public and references field xml definition.
|
String |
getFieldName(String fieldId)
Returns the field name given a field id.
|
Node |
getFieldsDefinitionNode()
Returs the fields node of the source.
|
Collection<String> |
getHyperlinkDefaultParameters()
Returns the default parameters that should be used when creating a
hyperlink url from this source.
|
String |
getIndexerEngineId()
Deprecated.
Since 8.1.0, lumis.search is deprecated and this method is no longer used.
|
String |
getIndexerId()
Deprecated.
Since 8.1.0, lumis.search is deprecated and this method is no longer used.
|
int |
getMaxRows()
Returns the maximum rows that data of this source shold contain.
|
F |
getPositionField()
Returns the position field of this source.
|
F |
getPrimaryKeyField()
Returns the field id of the primary key field.
|
String |
getReindexerTabularDataProcessorClassName()
Deprecated.
Since 8.1.0 this method is no longer used and remains only for binary compatibility, due
to lumis.search being replaced by lumis.portal.bigdata. Current implementation of this method throws
UnsupportedOperationException . |
List<F> |
getSearchableFields()
Deprecated.
Since 8.1.0, lumis.search is deprecated and this method is no longer used.
|
String |
getSearcherEngineId()
Deprecated.
Since 8.1.0, lumis.search is deprecated and this method is no longer used.
|
String |
getSearcherId()
Deprecated.
Since 8.1.0, lumis.search is deprecated and this method is no longer used.
|
SortedSet<String> |
getSortedFieldIds(String fieldCriteria)
Deprecated.
This method may be removed in the future, because it is
public and references field xml definition.
|
String |
getSourceSearchContentFillerClassName()
Deprecated.
Since 8.1.0 this method is no longer used and remains only for binary compatibility, due
to lumis.search being replaced by lumis.portal.bigdata. Consider using
Source.getBigDataPersister()
instead. |
int |
getStartAt()
Returns the row start position the data of this source shold be read
from.
|
boolean |
hasField(String fieldCriteria)
Deprecated.
This method may be removed in the future, because it is
public and references field xml definition.
|
boolean |
isSearchEnabled()
Deprecated.
Since 8.1.0, lumis.search is deprecated and this method is no longer used.
|
protected void |
readFieldsIntoFieldsMap()
Reads this source's fields into the
Source.fieldsMap . |
void |
setData(TabularData tabularData)
Sets the data in this source.
|
void |
setMaxRows(int maxRows)
Sets the maximum rows that data of this source shold contain.
|
void |
setStartAt(int startAt)
Sets the row start position the data of this source shold be read
from.
|
addData, createCustomSourceField, createDefaultCompositeFilterInstance, createDefaultFilterInstance, createRenderDataChangedEvent, createSourceFilter, deleteDataByItemIds, deleteDataByItemIds, doAddData, doDeleteDataByItemIds, doUpdateData, getAddInterfaceId, getAdministrationInterfaceId, getBigDataPersister, getDataProvider, getDefinitionNode, getDetailsInterfaceId, getDistinct, getDouiContext, getEditInterfaceId, getField, getFields, getFilter, getFiltersNode, getId, getIntroductionField, getIntroductionImageField, getKeywordsField, getLoad, getMetaDataSourceId, getParameterClass, getParameterValue, getPrimaryNameField, getPublishStartDateField, getReadData, getSourceContainer, getSourceContext, getTransaction, getUpdateDataItemId, isAdministrationInterface, isDetails, isRenderDataChangedNotificationEnabled, load, postAddFieldData, postDeleteFieldData, postProcessSource, postUpdateFieldData, preAddFieldData, preDeleteFieldData, preUpdateFieldData, readData, readData, scheduleIndexData, scheduleIndexData, sendPostAddDataNotification, sendPostDeleteDataNotification, sendPostUpdateDataNotification, sendPreAddDataNotification, sendPreDeleteDataNotification, sendPreUpdateDataNotification, sendRenderDataChangedNotification, sendRenderDataChangedNotification, setLoad, setParameterValue, setParameterValue, setReadData, setRenderDataChangedNotificationEnabled, updateData, valueChanged
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
protected TabularData tabularData
protected F extends ITabularSourceField primaryKeySourceField
protected F extends ITabularSourceField positionSourceField
readFieldsIntoFieldsMap()
and returned by
getPositionField()
.@Deprecated protected List<F extends ITabularSourceField> searchableSourceFields
public TabularSource(Node sourceDefinitionNode, ISourceContext sourceContext) throws PortalException
sourceDefinitionNode
- the source definition node.sourceContext
- the source context.PortalException
protected F createSourceField(Node fieldNode) throws PortalException
Source
createSourceField
in class Source<F extends ITabularSourceField>
fieldNode
- the field node.PortalException
Source.createCustomSourceField(Node)
protected void readFieldsIntoFieldsMap() throws PortalException
Source
Source.fieldsMap
.
The order the source fields are put in the map will define the
order the fields will be in the Source.fields
list. This
order may affect some field processing.readFieldsIntoFieldsMap
in class Source<F extends ITabularSourceField>
PortalException
- if an error was found while reading the
source's fields into the Source.fields
map.public F getPrimaryKeyField()
public F getPositionField()
null
if this source does not have a position field.@Deprecated public String getIndexerEngineId() throws PortalException
PortalException
@Deprecated public String getSearcherEngineId() throws PortalException
PortalException
@Deprecated public String getIndexerId() throws PortalException
PortalException
@Deprecated public String getSearcherId() throws PortalException
PortalException
@Deprecated public boolean isSearchEnabled()
@Deprecated public List<F> getSearchableFields()
public DouiHyperlinkItemParameterField getDouiHyperlinkItemParameterField()
Source
getDouiHyperlinkItemParameterField
in class Source<F extends ITabularSourceField>
PageConfig.PAGE_PARAMETER_ITEMID
,
DouiHyperlinkItemParameterField
public Collection<String> getHyperlinkDefaultParameters()
Source
getHyperlinkDefaultParameters
in class Source<F extends ITabularSourceField>
public Node getFieldsDefinitionNode() throws PortalException
PortalException
public Class getFieldClass(String fieldId) throws PortalException
fieldId
- PortalException
public TabularData getData() throws PortalException
Source
getData
in class Source<F extends ITabularSourceField>
PortalException
protected void convertDataToDefinedDataTypes() throws PortalException
Source
convertDataToDefinedDataTypes
in class Source<F extends ITabularSourceField>
PortalException
protected TabularData convertDataToDefinedDataTypes(TabularData originalData) throws PortalException
originalData
- the data to be converted.PortalException
public void setData(TabularData tabularData) throws PortalException
tabularData
- the data to set in this source.PortalException
protected int compareField(ISourceData row1, ISourceData row2, String fieldId, String direction)
0 signifies equality 1 signifies the first row is greater -1 signifies the second row is greater
If the direction is QuerySortOrder.DESCENDING
, the results are inverted.
row1
- row2
- fieldId
- direction
- QuerySortOrder.ASCENDING
or QuerySortOrder.DESCENDING
public int compare(ISourceData row1, ISourceData row2)
DouiContext.DOUI_ORDER_BY_FIELD
parameter value.
0 signifies equality 1 signifies the first row is greater -1 signifies the second row is greater
compare
in interface Comparator<ISourceData>
public String getFieldName(String fieldId) throws PortalException
fieldId
- PortalException
@Deprecated public SortedSet<String> getSortedFieldIds(String fieldCriteria) throws PortalException
fieldCriteria
- PortalException
@Deprecated public Set<String> getFieldIds(String fieldCriteria) throws PortalException
fieldCriteria
- PortalException
@Deprecated public String getFieldId(String fieldCriteria) throws PortalException
fieldCriteria
- PortalException
@Deprecated public boolean hasField(String fieldCriteria) throws PortalException
fieldCriteria
- PortalException
public void applyPostLoadFilters() throws PortalException
Data providers that may provide significant quantity of data should implement its own filtering during load instead of using this method, to prevent unnecessary use of server's memory and cpu.
Currently this implementation supports only simple filters, without grouping and of operator 'like'.
applyPostLoadFilters
in class Source<F extends ITabularSourceField>
PortalException
IDataProvider#loadData(lumis.portal.SessionConfig, Source, lumis.util.ITransaction)
public void applyPostLoadPagination()
The total rows of this data is set to its size, and then its rows are
trimmed, according to the
getStartAt()
and getMaxRows()
values.
For correct behavior, the rows presence or ordering may not be changed after this processing.
public void setStartAt(int startAt)
startAt
- public int getStartAt()
public void setMaxRows(int maxRows)
maxRows
- public int getMaxRows()
public int evaluateMaxRows(int maxRows)
getMaxRows()
after calling
setMaxRows(int)
with this parameter.maxRows
- The value to be used in the evaluation.getMaxRows()
.@Deprecated protected String getDefaultSourceSearchContentFillerClassName()
getDefaultBigDataPersister()
instead.The default value defined in this class is lumis.doui.search.DouiTabularSourceSearchContentFiller.
@Deprecated public String getSourceSearchContentFillerClassName()
Source.getBigDataPersister()
instead.@Deprecated public String getReindexerTabularDataProcessorClassName()
UnsupportedOperationException
.protected String getDefaultProviderClass() throws PortalException
getDefaultProviderClass
in class Source<F extends ITabularSourceField>
PortalException
protected <S extends Source<?>> ISourceBigDataPersister<S> getDefaultBigDataPersister()
Source
This method is called by Source.getBigDataPersister()
when the default is to be used.
getDefaultBigDataPersister
in class Source<F extends ITabularSourceField>
LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.