net.sf.webmancer.db
Class DecimalAttribute

java.lang.Object
  extended by net.sf.webmancer.db.AbstractAttribute
      extended by net.sf.webmancer.db.DecimalAttribute
All Implemented Interfaces:
IAttribute, IBackEndAttributeInformation, IFrontEndAttributeInformation

public class DecimalAttribute
extends AbstractAttribute

Author:
Michal Burda

Constructor Summary
DecimalAttribute(int digits, int scale)
           
 
Method Summary
 java.lang.Object convertDbToInternal(java.lang.Object dbValue)
           
 java.lang.String convertInternalToInput(java.lang.Object internal)
           
 java.lang.String convertInternalToOutput(java.lang.Object internal)
           
 int getDigits()
          Gets the digits.
 double getMaximum()
          Gets the maximum.
 int getMaximumInputLength()
          Returns -1, which means unlimited length of user input.
 double getMinimum()
          Gets the minimum.
 int getScale()
          Gets the scale.
 void setMaximum(double maximum)
          Sets the maximum.
 void setMinimum(double minimum)
          Sets the minimum.
 
Methods inherited from class net.sf.webmancer.db.AbstractAttribute
getDescription, getId, getInitialValue, getName, getParentDataSet, isDerived, isInDatabase, isMandatory, isPrimaryKey, preProcessConditionInput, preProcessInput, setDerived, setDescription, setId, setInDatabase, setInitialValue, setMandatory, setName, setParentDataSet, setPrimary, validateInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecimalAttribute

public DecimalAttribute(int digits,
                        int scale)
Parameters:
digits -
scale -
Method Detail

getDigits

public int getDigits()
Gets the digits.

Returns:
the digits

getMaximum

public double getMaximum()
Gets the maximum.

Returns:
the maximum

setMaximum

public void setMaximum(double maximum)
Sets the maximum.

Parameters:
maximum - the maximum to set

getMinimum

public double getMinimum()
Gets the minimum.

Returns:
the minimum

setMinimum

public void setMinimum(double minimum)
Sets the minimum.

Parameters:
minimum - the minimum to set

getScale

public int getScale()
Gets the scale.

Returns:
the scale

getMaximumInputLength

public int getMaximumInputLength()
Description copied from class: AbstractAttribute
Returns -1, which means unlimited length of user input.

Specified by:
getMaximumInputLength in interface IFrontEndAttributeInformation
Overrides:
getMaximumInputLength in class AbstractAttribute
Returns:
the maximum allowed length of user input string or negative value for unlimited lenght.
See Also:
AbstractAttribute.getMaximumInputLength()

convertDbToInternal

public java.lang.Object convertDbToInternal(java.lang.Object dbValue)
Specified by:
convertDbToInternal in interface IBackEndAttributeInformation
Specified by:
convertDbToInternal in class AbstractAttribute
Returns:
See Also:
AbstractAttribute.convertDbToInternal(java.lang.Object)

convertInternalToInput

public java.lang.String convertInternalToInput(java.lang.Object internal)
Specified by:
convertInternalToInput in interface IFrontEndAttributeInformation
Specified by:
convertInternalToInput in class AbstractAttribute
Returns:
See Also:
AbstractAttribute.convertInternalToInput(java.lang.Object)

convertInternalToOutput

public java.lang.String convertInternalToOutput(java.lang.Object internal)
Specified by:
convertInternalToOutput in interface IFrontEndAttributeInformation
Specified by:
convertInternalToOutput in class AbstractAttribute
Returns:
See Also:
AbstractAttribute.convertInternalToOutput(java.lang.Object)


Copyright © 2006-2007. All Rights Reserved.