net.sf.farrago.type.runtime
Class EncodedSqlDecimal.AssignableDecimal
java.lang.Object
net.sf.farrago.type.runtime.NullablePrimitive
net.sf.farrago.type.runtime.NullablePrimitive.NullableLong
net.sf.farrago.type.runtime.EncodedSqlDecimal.AssignableDecimal
- All Implemented Interfaces:
- AssignableValue, DataValue, NullableValue
- Enclosing class:
- EncodedSqlDecimal
public class EncodedSqlDecimal.AssignableDecimal
- extends NullablePrimitive.NullableLong
Class which assigns a value to an EncodedSqlDecimal
. Note that
EncodedSqlDecimal cannot inherit from NullablePrimitive because
EncodedSqlDecimal supports "NOT NULL" data and NullablePrimitive tags
data as nullable.
Method Summary |
void |
assignFrom(Object obj)
Assigns value from an Object. |
protected void |
setLong(long n)
Assignment from non-null long value. |
void |
setNull(boolean b)
Sets whether or not the value is null. |
protected void |
setNumber(Number number)
Assignment from abstract Number object. |
parent
private EncodedSqlDecimal parent
longOverflow
private long longOverflow
- The maximum LONG value that can be assigned to this decimal. No
overflow check is performed when this value is set to Long.MAX_VALUE.
longScaleFactor
private long longScaleFactor
- The scale factor applied to integers assigned to this decimal
EncodedSqlDecimal.AssignableDecimal
public EncodedSqlDecimal.AssignableDecimal(EncodedSqlDecimal parent)
setNull
public void setNull(boolean b)
- Description copied from interface:
NullableValue
- Sets whether or not the value is null. Note that once a value has been
set to null, its data should not be updated until the null state has been
cleared with a call to setNull(false).
- Specified by:
setNull
in interface NullableValue
- Overrides:
setNull
in class NullablePrimitive
- Parameters:
b
- true to set a null value; false to indicate a non-null
value
setNumber
protected void setNumber(Number number)
- Description copied from class:
NullablePrimitive
- Assignment from abstract Number object.
- Overrides:
setNumber
in class NullablePrimitive.NullableLong
- Parameters:
number
- a new non-null value to be assigned
setLong
protected void setLong(long n)
- Description copied from class:
NullablePrimitive
- Assignment from non-null long value.
- Overrides:
setLong
in class NullablePrimitive.NullableLong
- Parameters:
n
- long value to assign
assignFrom
public void assignFrom(Object obj)
- Description copied from interface:
AssignableValue
- Assigns value from an Object.
- Specified by:
assignFrom
in interface AssignableValue
- Overrides:
assignFrom
in class NullablePrimitive.NullableLong
- Parameters:
obj
- value to assign, or null to set null