Package lumis.doui.table.field
Class FileTableSourceField
- java.lang.Object
-
- lumis.doui.source.field.BaseSourceField
-
- lumis.doui.source.field.BaseTabularSourceField
-
- lumis.doui.table.field.BaseTableSourceField
-
- lumis.doui.table.field.GenericTableSourceField
-
- lumis.doui.table.field.FileTableSourceField
-
- All Implemented Interfaces:
ISourceField
,ITabularSourceField
,ITableSourceField
public class FileTableSourceField extends GenericTableSourceField
Field used for files- Since:
- 4.0.6
- Version:
- $Revision: 20857 $ $Date: 2017-12-27 13:27:30 -0200 (Wed, 27 Dec 2017) $
-
-
Field Summary
-
Fields inherited from class lumis.doui.table.field.GenericTableSourceField
localizeResourceQueryField, lookupQueryField
-
Fields inherited from class lumis.doui.source.field.BaseTabularSourceField
columnName, position, primaryKey, primaryName, sortable
-
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 FileTableSourceField()
-
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 Object
convertToQueryFieldValue(QueryField queryField, Object value)
Convert the value to the value to be assigned to the given query field.List<QueryAssignment>
getQueryAssignments(QueryInsert queryInsert, IParameters parameters)
Returns a list of query assignments to be used in the given query insert.List<QueryAssignment>
getQueryAssignments(QueryUpdate queryUpdate, IParameters parameters)
Returns a list of query assignments to be used in the given query update.TableSourceFieldMapping
getTableMapping(QueryBase queryBase)
Returns the table mapping for this field.void
preUpdate(SourcePreUpdateDataEvent event)
Method called for each source field before data is updated.-
Methods inherited from class lumis.doui.table.field.GenericTableSourceField
getAssignedValue, getDefaultInsertValue, getDisplayQueryField, getQueryField, getQueryField, getQueryFilter, getQuerySortOrders, init
-
Methods inherited from class lumis.doui.table.field.BaseTableSourceField
isLookupEnabled
-
Methods inherited from class lumis.doui.source.field.BaseTabularSourceField
getColumnName, isInsertable, isPosition, isPrimaryKey, isPrimaryName, isSortable, isUpdatable
-
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, isPrimaryName, isPublishStartDate, isReadOnly, isRequired, isRequiredWhenVisible, isSearchable, postAdd, postDelete, postUpdate, preAdd, preDelete
-
Methods inherited from interface lumis.doui.source.field.ITabularSourceField
isPosition, isPrimaryKey, isSortable
-
-
-
-
Method Detail
-
getTableMapping
public TableSourceFieldMapping getTableMapping(QueryBase queryBase) throws PortalException
Description copied from interface:ITableSourceField
Returns the table mapping for this field. This specifies how the field data is accessed.- Specified by:
getTableMapping
in interfaceITableSourceField
- Overrides:
getTableMapping
in classGenericTableSourceField
- Parameters:
queryBase
- the query the mapping will be used.- Returns:
- the field table mapping.
- Throws:
PortalException
-
convertRowToFieldData
public void convertRowToFieldData(ISourceData databaseRow, ISourceData sourceRow)
Description copied from class:BaseTabularSourceField
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
- Overrides:
convertRowToFieldData
in classGenericTableSourceField
- Parameters:
databaseRow
- a row containing the original data.sourceRow
- the row to be populated with this field's data.
-
convertToQueryFieldValue
protected Object convertToQueryFieldValue(QueryField queryField, Object value)
Description copied from class:GenericTableSourceField
Convert the value to the value to be assigned to the given query field.- Overrides:
convertToQueryFieldValue
in classGenericTableSourceField
- Parameters:
queryField
- the query field.value
- the original value.- Returns:
- the value converted.
-
getQueryAssignments
public List<QueryAssignment> getQueryAssignments(QueryInsert queryInsert, IParameters parameters) throws PortalException
Description copied from interface:ITableSourceField
Returns a list of query assignments to be used in the given query insert.- Specified by:
getQueryAssignments
in interfaceITableSourceField
- Overrides:
getQueryAssignments
in classGenericTableSourceField
- Parameters:
queryInsert
- the query insert.parameters
- the parameters with the values to be used.- Returns:
- the list of query assignments, never null.
- Throws:
PortalException
-
preUpdate
public void preUpdate(SourcePreUpdateDataEvent event) throws PortalException
Description copied from interface:ISourceField
Method called for each source field before data is updated.- Parameters:
event
- the event that contains information about the update operation.- Throws:
PortalException
-
getQueryAssignments
public List<QueryAssignment> getQueryAssignments(QueryUpdate queryUpdate, IParameters parameters) throws PortalException
Description copied from interface:ITableSourceField
Returns a list of query assignments to be used in the given query update.- Specified by:
getQueryAssignments
in interfaceITableSourceField
- Overrides:
getQueryAssignments
in classGenericTableSourceField
parameters
- the parameters with the values to be used.- Returns:
- the list of query assignments, never null.
- Throws:
PortalException
-
-