net.sf.webmancer.db
Interface IFrontEndAttributeInformation

All Known Subinterfaces:
IAttribute
All Known Implementing Classes:
AbstractAttribute, DecimalAttribute, RegexAttribute, StringAttribute

public interface IFrontEndAttributeInformation

This interface represents the front-end meta-data about an attribute of a database table. The front-end attribute information provides methods of accessing attribute's meta-data to widgets. See IBackEndAttributeInformation for an interface defining methods needed by persistent layer. Usually, the classes do not implement this interface directly. Instead, the IAttribute interface is implemented.

Author:
Michal Burda

Method Summary
 java.lang.String convertInternalToInput(java.lang.Object internal)
           
 java.lang.String convertInternalToOutput(java.lang.Object internal)
           
 java.lang.String getDescription()
          Gets the description of the attribute.
 java.lang.String getId()
          Gets the identification string of the attribute (must be unique in DataSet).
 java.lang.String getInitialValue()
          Gets the value that is used as initial if a new record is edited by a user.
 int getMaximumInputLength()
          Returns the maximum allowed length of user input string.
 java.lang.String getName()
          Gets the human readable name of the attribute.
 IDataSet getParentDataSet()
          Gets IDataSet the attribute belongs to.
 boolean isMandatory()
          Determines whether the attribute is mandatory, i.e. it must always have a value assigned to it.
 boolean isPrimaryKey()
          Returns true if the attribute is a primary key of parent dataset.
 java.lang.String preProcessConditionInput(java.lang.String input)
           
 java.lang.String preProcessInput(java.lang.String input)
           
 java.util.Collection<java.lang.String> validateInput(java.lang.String input)
           
 

Method Detail

getName

java.lang.String getName()
Gets the human readable name of the attribute. This name appears in various widgets to describe attribute value (e.g. as header in DataTable, input-line label in input forms etc.).

Returns:
The human readable name of the attribute.

getDescription

java.lang.String getDescription()
Gets the description of the attribute. It contains some help text for users.

Returns:
The description of the attribute.

isMandatory

boolean isMandatory()
Determines whether the attribute is mandatory, i.e. it must always have a value assigned to it.

Returns:
true if the attribute is mandatory.

getInitialValue

java.lang.String getInitialValue()
Gets the value that is used as initial if a new record is edited by a user.

Returns:
the value used to initialize empty entries if a new record is edited by a user.

getMaximumInputLength

int getMaximumInputLength()
Returns the maximum allowed length of user input string. Negative value means unlimited length.

Returns:
the maximum allowed length of user input string or negative value for unlimited lenght.

convertInternalToOutput

java.lang.String convertInternalToOutput(java.lang.Object internal)
Parameters:
internal -
Returns:

convertInternalToInput

java.lang.String convertInternalToInput(java.lang.Object internal)
Parameters:
internal -
Returns:

preProcessInput

java.lang.String preProcessInput(java.lang.String input)
Parameters:
input -
Returns:

preProcessConditionInput

java.lang.String preProcessConditionInput(java.lang.String input)
Parameters:
input -
Returns:

validateInput

java.util.Collection<java.lang.String> validateInput(java.lang.String input)
Parameters:
input -
Returns:

getId

java.lang.String getId()
Gets the identification string of the attribute (must be unique in DataSet).

Returns:
The identification string of the attribute

getParentDataSet

IDataSet getParentDataSet()
Gets IDataSet the attribute belongs to.

Returns:
The IDataSet the attribute belongs to.

isPrimaryKey

boolean isPrimaryKey()
Returns true if the attribute is a primary key of parent dataset.

Returns:
true if the attribute is a primary key of parent dataset.


Copyright © 2006-2007. All Rights Reserved.