planetj.database.field
Class BigDecimalField

java.lang.Object
  extended byplanetj.database.Field
      extended byplanetj.database.field.StringOrNumberField
          extended byplanetj.database.field.NumberField
              extended byplanetj.database.field.BigDecimalField
All Implemented Interfaces:
java.lang.Cloneable, IActionObject, ICSVField, IExternallyNamed, IFDFObject, IGuarded, INamed, IPDFField, IXMLObject, java.io.Serializable
Direct Known Subclasses:
BigDecimalNonNegativeField, NumericCurrencyField, ScaledBigDecimalField

public class BigDecimalField
extends NumberField
implements java.lang.Cloneable, java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class planetj.database.Field
Field.FieldLocation
 
Field Summary
 
Fields inherited from class planetj.database.Field
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_UNKNOWN
 
Fields inherited from interface planetj.dataengine.security.IGuarded
TYPE_ID_UNKNOWN, TYPE_NAME_FIELD, TYPE_NAME_SQLOPERATION, TYPE_SECURED_BY_LEVEL, TYPE_SECURED_BY_OPERATION, TYPE_UNSECURED
 
Constructor Summary
BigDecimalField()
           
 
Method Summary
 java.lang.Object createObject(java.lang.String pStringValue)
          Create an object for this Field type using the given String.
 short getAdjustedScale()
           
 java.lang.String getCSVField()
          Returns the String value of the Object, that will be written to the CSV file.
 java.lang.String getExternalValidationKey()
          Get the key that may be used to uniquely identify Field subclasses for external validation.
 int getMaxLength()
          Returns the max length of this field.
 java.lang.String getSQLValue(boolean pUseOriginalValue)
          Returns the Field's name and value in SQL format.
 java.lang.String getValidationInvalidValueString()
          Gets the long description of why this field's value is invalid and possible actions or examples we could put in this field.
 boolean isIntegersOnly()
          Test if this field can only contain integer values
 boolean isValidValue(ExecutingContext ec)
          Validate this Field value.
 void setValue(java.lang.Object value)
          Sets the current value of the Field to the specified value, and also sets the old value to the previous value.
 
Methods inherited from class planetj.database.field.NumberField
getDisplayValue, getDisplayValue, getScale, getValueAsBigDecimal, getValueAsBoolean, hasScale, isNumeric, isString, isValidLength, isValueEqual, isValueGreaterThan, isValueLessThan, scaleValue
 
Methods inherited from class planetj.database.field.StringOrNumberField
correctValue, getCopiedValue, getDefaultDatabaseValue
 
Methods inherited from class planetj.database.Field
addFieldClassForDataClass, addPropertyChangeListener, appendSQLColumnDefinition, appendSQLNameAndValue, appendSQLNameAndValue, clearTable, clearValidationExceptions, clearValue, cloneFD, cloneField, commitValue, concat, correctSQLLiteral, create, create, createAction, createFromDataType, createInternal, divide, equals, executeGetterMethod, executeSetterMethod, firePropertyChange, getActionDefaultLocation, getActionDescriptor, getActionRequest, getActionRequest, getActions, getAssociationOperation, getAttribute, getAutoUpdateValue, getBackgroundColor, getBackgroundColor, getColumnSpan, getConfigProperty, getCSVDisplayField, getCurrentValue, getCurrentValueAsString, getDataSQLOperation, getDate, getDefaultExternalName, getDefaultUsageId, getDefaultValue, getDisplayComponent, getDisplayHeight, getDisplayLength, getDisplayOrder, getDisplayWidth, getExternalName, getFDFData, getFieldClassForDataClass, getFieldClassParameters, getFieldDescriptor, getFieldDescriptorSource, getFieldHandledActionNames, getFieldIncrementor, getFieldSetName, getFormatter, getHorizontalAlignment, getIndex, getLibrary, getLibraryName, getMaxLength, getMetaDataSystemAlias, getName, getOldValue, getOldValueAsString, getPDFValue, getPossibleValueClass, getPossibleValues, getPossibleValues, getPossibleValuesKey, getPossibleValuesOperation, getPossibleValuesSQLOperation, getPreferredDisplayLength, getPreferredJavaDataType, getPVPage, getRow, getSearchDefaultValue, getSecuredTypeId, getSecuredTypeName, getSecurityType, getSQLColumnDefinition, getSQLColumnDefinition, getSQLNameAndDefaultValue, getSQLNameAndValue, getSQLNameAndValue, getSQLNullValue, getSQLObject, getSQLType, getSQLType, getSQLTypeName, getSQLTypeName, getSQLValue, getSQLValue, getStaticAttribute, getStaticAttributes, getStatusChange, getStyleClass, getStyleClass, getSystem, getSystemAlias, getSystemURL, getTable, getTableName, getUsageId, getUsageId, getUsageIds, getValidationExceptions, getValidationInvalidLengthString, getValidationInvalidMinLengthString, getValidationInvalidValueString, getValidationRequiredString, getValidValuesString, getValue, getValueAsByte, getValueAsDate, getValueAsDouble, getValueAsFloat, getValueAsFullLengthString, getValueAsInt, getValueAsLong, getValueAsNumber, getValueAsShort, getValueAsString, getXMLData, getXMLTag, guessFieldClassProbability, handleAction, handlePossibleValueOperation, hasAssociationOperation, hasMultipleStyleClasses, hasOldValue, hasPossibleValuesKeyClassOrOp, hasPossibleValuesOperation, hasPossibleValuesOperation, hasUsageId, hasUsageId, hasValue, incrementValue, isActionApplicable, isApplicable, isAuthorizedForEdit, isAuthorizedForRead, isAutoIncrement, isAutoIncrementDatabaseDriven, isAutoIncrementWOWDriven, isAutoUpdateValue, isBoolean, isChanged, isContainsValue, isCurrentValueField, isCurrentValueString, isDate, isDecimalSQLType, isDecimalSQLType, isDefaultValue, isDerived, isDisplayable, isFieldContentDisplayable, isFieldValueDatabaseDefault, isFieldValueNotBlank, isFieldValueNull, isFieldValuePossibleValue, isFieldValuesEqual, isFileUpload, isGuarded, isHelpTextPresent, isInitialized, isNumericSQLType, isNumericSQLType, isPassword, isPhysical, isPossibleValuesSearch, isPrepareFieldValue, isReadOnly, isReadOnly, isReadOnlyOnSearch, isRequired, isRequired, isRequiredOnSearch, isSkeleton, isStatusChange, isStringSQLType, isStringSQLType, isTime, isTimestamp, isUpdateable, isValidationRequiredForAutoPopulate, isValidLength, isValidMinLength, isValidRequired, isValidRequired, isValidValue, isValueEqualToString, lessThan, removePropertyChangeListener, resetDisplayValue, rollbackChanges, setAttribute, setChanged, setClonedValues, setDate, setFieldContentDisplayable, setFieldDescriptor, setHasValue, setIndex, setInitialValue, setInitialValueAsString, setMaxLength, setName, setPVPage, setRow, setSavepoint, setSkeleton, setSQLType, setSQLTypeName, setStaticAttribute, setTable, setValue, setValue, setValueAsString, setValueToDefault, statusChanged, toString, toUpperCase, validate, validate, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BigDecimalField

public BigDecimalField()
Method Detail

createObject

public java.lang.Object createObject(java.lang.String pStringValue)
                              throws java.lang.NumberFormatException
Create an object for this Field type using the given String.

Overrides:
createObject in class StringOrNumberField
Parameters:
pStringValue - String
Throws:
java.lang.NumberFormatException

getAdjustedScale

public short getAdjustedScale()

getCSVField

public java.lang.String getCSVField()
Returns the String value of the Object, that will be written to the CSV file. If the toString method of any Object already does this, then there is no need to implement this interface.

Character string in the format >>>>>>>>>>>9.99 where > means to suppress leading zeros and 9 means to always display a value, even if it is zero. The string is not enclosed by double quotation marks.

In a CMException was thrown, or there were problems, then [Invalid Field] will be returned Creation date: (4/22/2002 2:28:37 PM)

Specified by:
getCSVField in interface ICSVField
Overrides:
getCSVField in class Field
Returns:
String

getExternalValidationKey

public java.lang.String getExternalValidationKey()
Get the key that may be used to uniquely identify Field subclasses for external validation. That is validation outside the Field itself. e.g. Javascript.

Overrides:
getExternalValidationKey in class NumberField

getMaxLength

public int getMaxLength()
                 throws CMException
Returns the max length of this field.

Overrides:
getMaxLength in class Field
Throws:
CMException

getSQLValue

public java.lang.String getSQLValue(boolean pUseOriginalValue)
                             throws CMException
Returns the Field's name and value in SQL format.

This must check to see if we are using a BigDecimal for the value and ensure the number of digits after the decimal plase is valid

Overrides:
getSQLValue in class StringOrNumberField
Parameters:
pUseOriginalValue -
Returns:
String
Throws:
CMException

getValidationInvalidValueString

public java.lang.String getValidationInvalidValueString()
Gets the long description of why this field's value is invalid and possible actions or examples we could put in this field.

Overrides:
getValidationInvalidValueString in class Field

isIntegersOnly

public boolean isIntegersOnly()
Test if this field can only contain integer values

Specified by:
isIntegersOnly in class NumberField

isValidValue

public boolean isValidValue(ExecutingContext ec)
Validate this Field value. If the field value is valid, return true,

Overrides:
isValidValue in class NumberField
Returns:
boolean true if valid

setValue

public void setValue(java.lang.Object value)
              throws CMException
Description copied from class: NumberField
Sets the current value of the Field to the specified value, and also sets the old value to the previous value. If called and the Field is not updatable a CMException is thrown.

Overrides:
setValue in class NumberField
Parameters:
value -
Throws:
CMException