|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.doui.source.field.BaseSourceField lumis.doui.source.field.BaseTabularSourceField lumis.doui.table.field.BaseTableSourceField lumis.doui.table.field.GenericTableSourceField
@StableMinor(version="6.2", sinceVersion="4.0") public class GenericTableSourceField
A generic table source field. This generic field maps to one column in a table and has the option to do a lookup on os taken from this field's definition node.
Field Summary | |
---|---|
protected QueryField |
localizeResourceQueryField
The localize resource field that is used for localizing the value of the field. |
protected QueryField |
lookupQueryField
The lookup query field that is used for this field. |
Fields inherited from class lumis.doui.source.field.BaseTabularSourceField |
---|
columnName, primaryKey, primaryName, searchable |
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, source |
Constructor Summary | |
---|---|
GenericTableSourceField()
|
Method Summary | |
---|---|
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. |
Object |
getAssignedValue(QueryBase queryBase)
Returns the value assigned as this field's value in the given query. |
protected Object |
getDefaultInsertValue()
|
QueryField |
getDisplayQueryField(QueryBase queryBase)
Returns the query field to be used for display purposes for this 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. |
protected QueryField |
getQueryField(QueryBase queryBase)
Returns the main query field for this source field. |
protected QueryField |
getQueryField(QueryBase queryBase,
boolean useLookupField)
Returns the query field for this field. |
IQueryFilter |
getQueryFilter(QueryBase queryBase,
TableSourceFilter filter)
Returns a query filter for this field. |
List<QuerySortOrder> |
getQuerySortOrders(QueryBase queryBase,
String direction)
Returns a list of sort orders to be applied when it is to be ordered by this field. |
TableSourceFieldMapping |
getTableMapping(QueryBase queryBase)
Returns the table mapping for this field. |
void |
init(Source source,
Node fieldNode)
Initializes this source field. |
Methods inherited from class lumis.doui.table.field.BaseTableSourceField |
---|
isLookupEnabled |
Methods inherited from class lumis.doui.source.field.BaseTabularSourceField |
---|
getColumnName, isInsertable, isPrimaryKey, isPrimaryName, isSearchable, isUpdatable |
Methods inherited from class lumis.doui.source.field.BaseSourceField |
---|
convertToFieldValueClass, createConverter, createDataType, getConverter, getDataType, getDefaultControlDefinition, getDefaultInputControlDefinition, getDefaultValue, getDefaultViewControlDefinition, getDefinitionNode, getId, getMaximumValue, getMinimumValue, getName, getValueClass, isDisplay, isExternalData, isGetData, isIntroduction, isKeywords, isLocalize, isParentId, isReadOnly, isRequired, isRequiredWhenVisible |
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.ITabularSourceField |
---|
isPrimaryKey, isSearchable |
Methods inherited from interface lumis.doui.source.field.ISourceField |
---|
getConverter, getDataType, getDefaultControlDefinition, getDefaultInputControlDefinition, getDefaultValue, getDefaultViewControlDefinition, getDefinitionNode, getId, getMaximumValue, getMinimumValue, getName, getValueClass, isDisplay, isExternalData, isGetData, isIntroduction, isKeywords, isParentId, isPrimaryName, isReadOnly, isRequired, isRequiredWhenVisible |
Field Detail |
---|
protected QueryField lookupQueryField
getTableMapping(QueryBase)
method.
protected QueryField localizeResourceQueryField
Constructor Detail |
---|
public GenericTableSourceField()
Method Detail |
---|
public void init(Source source, Node fieldNode) throws PortalException
ISourceField
init
in interface ISourceField
init
in class BaseTabularSourceField
source
- the source this field will belong to.fieldNode
- the xml node that contains this field's definition.
PortalException
- if this field could not be initialized.public TableSourceFieldMapping getTableMapping(QueryBase queryBase) throws PortalException
ITableSourceField
getTableMapping
in interface ITableSourceField
getTableMapping
in class BaseTableSourceField
queryBase
- the query the mapping will be used.
PortalException
public QueryField getDisplayQueryField(QueryBase queryBase) throws PortalException
ITableSourceField
lumis.util.IRenderable
.
queryBase
- the query base the query field will be used in.
PortalException
protected QueryField getQueryField(QueryBase queryBase, boolean useLookupField) throws PortalException
queryBase
- the query base where the query field will be used.useLookupField
-
PortalException
protected QueryField getQueryField(QueryBase queryBase) throws PortalException
queryBase
- the query base where the query field will be used.
PortalException
protected Object convertToQueryFieldValue(QueryField queryField, Object value)
queryField
- the query field.value
- the original value.
public IQueryFilter getQueryFilter(QueryBase queryBase, TableSourceFilter filter) throws PortalException
ITableSourceField
getQueryFilter
in interface ITableSourceField
getQueryFilter
in class BaseTableSourceField
queryBase
- the query where the filter will be applied to.filter
- the filter definition.
PortalException
public List<QuerySortOrder> getQuerySortOrders(QueryBase queryBase, String direction) throws PortalException
ITableSourceField
getQuerySortOrders
in interface ITableSourceField
getQuerySortOrders
in class BaseTableSourceField
queryBase
- the query where the sort orders will be applied to.direction
- the direction this field is to be sorted.
PortalException
protected Object getDefaultInsertValue()
public List<QueryAssignment> getQueryAssignments(QueryInsert queryInsert, IParameters parameters) throws PortalException
ITableSourceField
getQueryAssignments
in interface ITableSourceField
getQueryAssignments
in class BaseTableSourceField
queryInsert
- the query insert.parameters
- the parameters with the values to be used.
PortalException
public List<QueryAssignment> getQueryAssignments(QueryUpdate queryUpdate, IParameters parameters) throws PortalException
ITableSourceField
getQueryAssignments
in interface ITableSourceField
getQueryAssignments
in class BaseTableSourceField
parameters
- the parameters with the values to be used.
PortalException
public Object getAssignedValue(QueryBase queryBase) throws PortalException
ITableSourceField
getAssignedValue
in interface ITableSourceField
getAssignedValue
in class BaseTableSourceField
queryBase
- the query.
PortalException
public void convertRowToFieldData(ISourceData databaseRow, ISourceData sourceRow) throws PortalException
BaseTabularSourceField
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)
.
convertRowToFieldData
in interface ITabularSourceField
convertRowToFieldData
in class BaseTabularSourceField
databaseRow
- a row containing the original data.sourceRow
- the row to be populated with this field's data.
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |