public class DecimalStoredField extends StoredFieldSchema<java.math.BigDecimal>
StoredFieldSchema.Visitor
Constructor and Description |
---|
DecimalStoredField(java.lang.String name,
StoredTableSchema parent,
int precision,
int scale) |
Modifier and Type | Method and Description |
---|---|
void |
accept(StoredFieldSchema.Visitor visitor)
gateway for a visitor
|
QueryCondition |
buildQueryCondition(QueryOperator<java.math.BigDecimal> operator,
java.math.BigDecimal value)
build a simple query condition with this field
|
java.math.BigDecimal |
castToType(java.lang.Object o) |
java.math.BigDecimal |
defaultValue() |
java.math.BigDecimal |
defaultValueAtColumnCreation()
returns default value of the field
|
int |
getPrecision() |
int |
getScale() |
Field<java.math.BigDecimal> |
initBlankField()
this method returns a subclass of Field appropriate for the field schema
|
getParent
toString
changeName, cleanName, equals, getName
public DecimalStoredField(java.lang.String name, StoredTableSchema parent, int precision, int scale)
name
- name of the field in the databseparent
- table in the databaseprecision
- precision in the sense of java BigDecimal (total number of
figures in the decimal, e.g. 5 for '332.55'scale
- scale in the sense of java BigDecimal (number of figures
after the dot, e.g. 2 for '332.55'public int getPrecision()
public int getScale()
public QueryCondition buildQueryCondition(QueryOperator<java.math.BigDecimal> operator, java.math.BigDecimal value)
StoredFieldSchema
buildQueryCondition
in class StoredFieldSchema<java.math.BigDecimal>
operator
- condition operator '='value
- value of the query conditionpublic void accept(StoredFieldSchema.Visitor visitor)
StoredFieldSchema
accept
in class StoredFieldSchema<java.math.BigDecimal>
visitor
- visitorpublic java.math.BigDecimal defaultValue()
defaultValue
in class StoredFieldSchema<java.math.BigDecimal>
public java.math.BigDecimal castToType(java.lang.Object o)
castToType
in class StoredFieldSchema<java.math.BigDecimal>
o
- an uncasted objectpublic Field<java.math.BigDecimal> initBlankField()
FieldSchema
initBlankField
in class FieldSchema<java.math.BigDecimal>
public java.math.BigDecimal defaultValueAtColumnCreation()
StoredFieldSchema
defaultValueAtColumnCreation
in class StoredFieldSchema<java.math.BigDecimal>