Package lumis.doui.source.field
Class BaseTabularSourceField
- java.lang.Object
-
- lumis.doui.source.field.BaseSourceField
-
- lumis.doui.source.field.BaseTabularSourceField
-
- All Implemented Interfaces:
ISourceField
,ITabularSourceField
- Direct Known Subclasses:
BaseTableSourceField
@StableMinor(version="14.1", sinceVersion="4.0") public abstract class BaseTabularSourceField extends BaseSourceField implements ITabularSourceField
Base implementation for aITabularSourceField
.- Since:
- 4.0.4
- Version:
- $Revision: 24684 $ $Date: 2021-08-23 18:58:35 -0300 (Mon, 23 Aug 2021) $
-
-
Field Summary
Fields Modifier and Type Field Description protected String
columnName
The name of the column in the tabular structure that this field belongs to.protected boolean
position
Indicates if this field is a position field.protected boolean
primaryKey
Indicates if this field is a primary key.protected boolean
primaryName
Indicates if this field is a primary name.protected boolean
sortable
Indicates if this field may be used for sorting a query.-
Fields inherited from class lumis.doui.source.field.BaseSourceField
converter, dataType, defaultValue, definitionNode, display, doOptionLookup, externalData, getData, id, introduction, keywords, localize, maximumValue, minimumValue, name, parentId, pattern, readOnly, required, requiredWhenVisible, searchable, source
-
-
Constructor Summary
Constructors Constructor Description BaseTabularSourceField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
convertRowToFieldData(ISourceData databaseRow, ISourceData sourceRow)
Converts a row read from the data provider to this source field type.protected String
getColumnName()
Returns the column name attribute set for this field.void
init(Source<?> source, Node fieldNode)
Initializes this source field.protected boolean
isInsertable()
Indicates if the value this field represents may be inserted.boolean
isPosition()
Returns a boolean indicating if this field is a position field.boolean
isPrimaryKey()
Returns a boolean indicating if this field is a primary key.boolean
isPrimaryName()
boolean
isSortable()
Returns whether this field may be used to sort a query.protected boolean
isUpdatable()
Indicates if the value this field represents is updatable.-
Methods inherited from class lumis.doui.source.field.BaseSourceField
addDocumentFields, addDocumentTypeFields, convertToFieldValueClass, createConverter, createDataType, getConverter, getDataType, getDefaultControlDefinition, getDefaultInputControlDefinition, getDefaultValue, getDefaultViewControlDefinition, getDefinitionNode, getDocumentFieldBaseId, getId, getMaximumValue, getMinimumValue, getName, getValueClass, isBigDataEnabled, isDisplay, isExternalData, isGetData, isIntroduction, isIntroductionImage, isKeywords, isLocalize, isParentId, isPublishStartDate, isReadOnly, isRequired, isRequiredWhenVisible, isSearchable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface lumis.doui.source.field.ISourceField
addDocumentFields, addDocumentTypeFields, getConverter, getDataType, getDefaultControlDefinition, getDefaultInputControlDefinition, getDefaultValue, getDefaultViewControlDefinition, getDefinitionNode, getId, getMaximumValue, getMinimumValue, getName, getValueClass, isDisplay, isExternalData, isGetData, isIntroduction, isIntroductionImage, isKeywords, isParentId, isPublishStartDate, isReadOnly, isRequired, isRequiredWhenVisible, isSearchable, postAdd, postDelete, postUpdate, preAdd, preDelete, preUpdate
-
-
-
-
Field Detail
-
primaryKey
protected boolean primaryKey
Indicates if this field is a primary key.- Since:
- 4.0.4
-
primaryName
protected boolean primaryName
Indicates if this field is a primary name.- Since:
- 4.0.6
-
position
protected boolean position
Indicates if this field is a position field.- Since:
- 10.3.0
-
columnName
protected String columnName
The name of the column in the tabular structure that this field belongs to.- Since:
- 4.0.4
-
sortable
protected boolean sortable
Indicates if this field may be used for sorting a query.- Since:
- 9.0.0
-
-
Method Detail
-
init
public void init(Source<?> source, Node fieldNode) throws PortalException
Description copied from interface:ISourceField
Initializes this source field. This method is called by the source after the field is created and before it is used. The implementation of this method must initialize all of this instance's attributes.- Specified by:
init
in interfaceISourceField
- Overrides:
init
in classBaseSourceField
- Parameters:
source
- the source this field will belong to.fieldNode
- the xml node that contains this field's definition.- Throws:
PortalException
- if this field could not be initialized.
-
isPrimaryKey
public boolean isPrimaryKey()
Description copied from interface:ITabularSourceField
Returns a boolean indicating if this field is a primary key.- Specified by:
isPrimaryKey
in interfaceITabularSourceField
- Returns:
- true if this field is a primary key, false otherwise.
-
isPrimaryName
public boolean isPrimaryName()
- Specified by:
isPrimaryName
in interfaceISourceField
- Overrides:
isPrimaryName
in classBaseSourceField
-
isPosition
public boolean isPosition()
Description copied from interface:ITabularSourceField
Returns a boolean indicating if this field is a position field.- Specified by:
isPosition
in interfaceITabularSourceField
- Returns:
- true if this field is a position field, false otherwise.
-
isSortable
public boolean isSortable()
Description copied from interface:ITabularSourceField
Returns whether this field may be used to sort a query.- Specified by:
isSortable
in interfaceITabularSourceField
- Returns:
true
if this field may be used for sorting,false
otherwise.
-
getColumnName
protected String getColumnName()
Returns the column name attribute set for this field.- Returns:
- the column name attribute set for this field.
- Since:
- 4.0.4
-
isUpdatable
protected boolean isUpdatable()
Indicates if the value this field represents is updatable.- Returns:
- true if this field's value is updatable, false otherwise.
- Since:
- 4.0.4
-
isInsertable
protected boolean isInsertable()
Indicates if the value this field represents may be inserted.- Returns:
- true if this field's value may be inserted, false otherwise.
- Since:
- 4.0.4
-
convertRowToFieldData
public void convertRowToFieldData(ISourceData databaseRow, ISourceData sourceRow) throws PortalException
Converts a row read from the data provider to this source field type.This base implementation just copies the value in the database row relative to this field's id to the source row using the same id, converting it using
BaseSourceField.convertToFieldValueClass(Object, java.util.Locale, String)
.- Specified by:
convertRowToFieldData
in interfaceITabularSourceField
- Parameters:
databaseRow
- a row containing the original data.sourceRow
- the row to be populated with this field's data.- Throws:
PortalException
- Since:
- 4.0.10
-
-