planetj.database.field
Class BigDecimalNonNegativeField

java.lang.Object
  |
  +--planetj.database.Field
        |
        +--planetj.database.field.StringOrNumberField
              |
              +--planetj.database.field.NumberField
                    |
                    +--planetj.database.field.BigDecimalField
                          |
                          +--planetj.database.field.BigDecimalNonNegativeField
All Implemented Interfaces:
Cloneable, ICSVField, IExternallyNamed, IFDFObject, IGuarded, INamed, IXMLObject, Serializable

public class BigDecimalNonNegativeField
extends BigDecimalField
implements Cloneable, Serializable

Same as a BigDecimalField except cannot hold a negative value and be valid.

Author:
PlanetJ Corporation
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class planetj.database.Field
Field.FieldLocation
 
Field Summary
 
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
BigDecimalNonNegativeField()
           
 
Method Summary
 String getValidationInvalidValueString(String givenValue)
          This method will return the long description of why this field's value is invalid and possible actions or examples we could put in this field.
 boolean isValidValue(ExecutingContext ec)
          Check is this fields BigDecimal value is greater than 0.
 
Methods inherited from class planetj.database.field.BigDecimalField
createObject, getCSVField, getExternalValidationKey, getMaxLength, getSQLValue, getValidationInvalidValueString, isIntegersOnly, setValue
 
Methods inherited from class planetj.database.field.NumberField
getDisplayValue, getValueAsBigDecimal, getValueAsBoolean, isNumeric, isString, isValidLength, isValueEqual, isValueGreaterThan, isValueLessThan
 
Methods inherited from class planetj.database.field.StringOrNumberField
getCopiedValue, getDefaultDatabaseValue
 
Methods inherited from class planetj.database.Field
addFieldClassForDataClass, addPropertyChangeListener, appendSQLColumnDefinition, appendSQLNameAndValue, appendSQLNameAndValue, clearValidationExceptions, cloneField, commitValue, concat, create, create, createFromDataType, divide, equals, executeGetterMethod, executeSetterMethod, getAssociationOperation, getAttribute, getAutoUpdateValue, getColumnSpan, getConfigProperty, getCurrentValue, getCurrentValueAsString, getDataSQLOperation, getDate, getDefaultExternalName, getDefaultUsageId, getDefaultValue, getDisplayHeight, getDisplayLength, getDisplayOrder, getDisplayWidth, getExternalName, getFDFData, getFieldClassForDataClass, getFieldDescriptor, getFieldDescriptorSource, getFieldIncrementor, getIndex, getLibrary, getLibraryName, getMaxLength, getMetaDataSystemAlias, getName, getOldValue, getOldValueAsString, getPossibleValues, getPossibleValues, getPreferredDisplayLength, getPreferredJavaDataType, getRow, getSecuredTypeId, getSecuredTypeName, getSecurityType, getSQLColumnDefinition, getSQLColumnDefinition, getSQLNameAndDefaultValue, getSQLNameAndValue, getSQLNameAndValue, getSQLObject, getSQLType, getSQLType, getSQLTypeName, getSQLTypeName, getSQLValue, getSQLValue, getStaticAttribute, getStyleClass, getStyleClass, getSystem, getSystemAlias, getSystemURL, getTable, getTableName, getValidationExceptions, getValidationInvalidLengthString, getValidationInvalidMinLengthString, getValidationRequiredString, getValidValuesString, getValue, getValueAsByte, getValueAsDate, getValueAsDouble, getValueAsFloat, getValueAsFullLengthString, getValueAsInt, getValueAsLong, getValueAsNumber, getValueAsShort, getValueAsString, getXMLData, getXMLTag, guessFieldClassProbability, handlePossibleValueOperation, hasMultipleStyleClasses, hasOldValue, hasPossibleValuesKeyClassOrOp, hasPossibleValuesSQLOperation, hasPossibleValuesSQLOperation, hasValue, isApplicable, isAuthorizedForEdit, isAuthorizedForRead, isAutoUpdateValue, isBoolean, isChanged, isContainsValue, isCurrentValueField, isCurrentValueString, isDate, isDecimalSQLType, isDecimalSQLType, isDefaultValue, isDerived, isDisplayable, isFieldContentDisplayable, isFieldValueDatabaseDefault, isFieldValueNotBlank, isFieldValueNull, isFileUpload, isGuarded, isHelpTextPresent, isInitialized, isNumericSQLType, isNumericSQLType, isPassword, isPhysical, isPossibleValuesSearch, isReadOnly, isReadOnly, isRequired, isRequired, isRequiredOnSearch, isSkeleton, isStringSQLType, isStringSQLType, isTime, isUpdateable, isValidationRequiredForAutoPopulate, isValidLength, isValidMinLength, isValidRequired, isValidRequired, isValidValue, isValueEqualToString, lessThan, removePropertyChangeListener, rollbackChanges, setAttribute, setChanged, setClonedValues, setDate, setFieldContentDisplayable, setFieldDescriptor, setInitialValue, setInitialValueAsString, setMaxLength, setName, setRow, setSavepoint, setSQLType, setSQLTypeName, setStaticAttribute, setTable, setValue, setValue, setValueAsString, setValueToDefault, toString, toUpperCase, validate, validate, validate
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BigDecimalNonNegativeField

public BigDecimalNonNegativeField()
Method Detail

getValidationInvalidValueString

public String getValidationInvalidValueString(String givenValue)
                                       throws CMException
This method will return the long description of why this field's value is invalid and possible actions or examples we could put in this field. Subclasses can overrride this if can better describe thier requrements Creation date: (5/16/2002 4:53:27 PM)

Overrides:
getValidationInvalidValueString in class Field
CMException

isValidValue

public boolean isValidValue(ExecutingContext ec)
Check is this fields BigDecimal value is greater than 0. Could put in method isLessThanZero but that would add unecessary conversions already performed in super.isValidValue(). If the field value is valid, return true,

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