net.sf.farrago.type.runtime
Class EncodedSqlDecimal.AssignableDecimal

java.lang.Object
  extended by net.sf.farrago.type.runtime.NullablePrimitive
      extended by net.sf.farrago.type.runtime.NullablePrimitive.NullableLong
          extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.farrago.type.runtime.NullablePrimitive
NullablePrimitive.NullableBoolean, NullablePrimitive.NullableByte, NullablePrimitive.NullableDouble, NullablePrimitive.NullableFloat, NullablePrimitive.NullableInteger, NullablePrimitive.NullableLong, NullablePrimitive.NullableShort
 
Field Summary
private  long longOverflow
          The maximum LONG value that can be assigned to this decimal.
private  long longScaleFactor
          The scale factor applied to integers assigned to this decimal
private  EncodedSqlDecimal parent
           
 
Fields inherited from class net.sf.farrago.type.runtime.NullablePrimitive.NullableLong
value
 
Fields inherited from class net.sf.farrago.type.runtime.NullablePrimitive
FALSE_LITERAL, isNull, NULL_IND_FIELD_NAME, TRUE_LITERAL, UNKNOWN_LITERAL, VALUE_FIELD_NAME
 
Fields inherited from interface net.sf.farrago.type.runtime.NullableValue
NULL_IND_ACCESSOR_NAME, NULL_IND_MUTATOR_NAME
 
Fields inherited from interface net.sf.farrago.type.runtime.AssignableValue
ASSIGNMENT_METHOD_NAME
 
Constructor Summary
EncodedSqlDecimal.AssignableDecimal(EncodedSqlDecimal parent)
           
 
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.
 
Methods inherited from class net.sf.farrago.type.runtime.NullablePrimitive
getNullableData, isNull, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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

Constructor Detail

EncodedSqlDecimal.AssignableDecimal

public EncodedSqlDecimal.AssignableDecimal(EncodedSqlDecimal parent)
Method Detail

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