lumis.doui.source.field
Class BaseTabularSourceField

Package class diagram package BaseTabularSourceField
java.lang.Object
  extended by lumis.doui.source.field.BaseSourceField
      extended by lumis.doui.source.field.BaseTabularSourceField
All Implemented Interfaces:
ISourceField, ITabularSourceField
Direct Known Subclasses:
BaseTableSourceField

@StableMinor(version="6.2",
             sinceVersion="4.0")
public abstract class BaseTabularSourceField
extends BaseSourceField
implements ITabularSourceField

Base implementation for a ITabularSourceField.

Since:
4.0.4

Field Summary
protected  String columnName
          The name of the column in the tabular structure that this field belongs to.
protected  boolean primaryKey
          Indicates if this field is a primary key.
protected  boolean primaryName
          Indicates if this field is a primary name.
protected  boolean searchable
          Indicates if this field is 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
BaseTabularSourceField()
           
 
Method Summary
 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 isPrimaryKey()
          Returns a boolean indicating if this field is a primary key.
 boolean isPrimaryName()
           
 boolean isSearchable()
          Returns a boolean indicating if this field is searchable.
protected  boolean isUpdatable()
          Indicates if the value this field represents is updatable.
 
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.ISourceField
getConverter, getDataType, getDefaultControlDefinition, getDefaultInputControlDefinition, getDefaultValue, getDefaultViewControlDefinition, getDefinitionNode, getId, getMaximumValue, getMinimumValue, getName, getValueClass, isDisplay, isExternalData, isGetData, isIntroduction, isKeywords, isParentId, isReadOnly, isRequired, isRequiredWhenVisible
 

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

searchable

protected boolean searchable
Indicates if this field is searchable.

Since:
4.0.6

columnName

protected String columnName
The name of the column in the tabular structure that this field belongs to.

Since:
4.0.4
Constructor Detail

BaseTabularSourceField

public BaseTabularSourceField()
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 interface ISourceField
Overrides:
init in class BaseSourceField
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 interface ITabularSourceField
Returns:
true if this field is a primary key, false otherwise.

isPrimaryName

public boolean isPrimaryName()
Specified by:
isPrimaryName in interface ISourceField
Overrides:
isPrimaryName in class BaseSourceField

isSearchable

public boolean isSearchable()
Description copied from interface: ITabularSourceField
Returns a boolean indicating if this field is searchable.

Specified by:
isSearchable in interface ITabularSourceField
Returns:
true if this field is a primary name, 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 interface ITabularSourceField
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


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.