com.ds.fw.types
Class FwValue

java.lang.Object
  |
  +--com.ds.fw.types.FwSimpleObject
        |
        +--com.ds.fw.types.FwValue
All Implemented Interfaces:
java.lang.Cloneable, FwCopyableIF, FwDisplayableIF, FwSimpleObjectIF, java.io.Serializable
Direct Known Subclasses:
FwDBField, FwDVValue

public class FwValue
extends FwSimpleObject

See Also:
Serialized Form

Field Summary
 int type
           
 java.lang.Object value
           
 
Constructor Summary
FwValue()
           
FwValue(java.lang.Object o, int t)
           
 
Method Summary
 java.lang.Object clone()
           
 java.lang.Object get()
          Gets the value of the field value of this FwDBField
 java.lang.Number getBigDecimal()
          Gets the value of the field value as BigDecimal
 java.util.Date getDate()
          Gets the value of the field value as java.util.Date
 java.lang.Double getDouble()
          Gets the value of the field value as Double
 java.lang.Float getFloat()
          Gets the value of the field value as Float
 int getInt()
          Gets the value of the field value as int
 long getLong()
          Gets the value of the field value as long
 java.lang.Number getNumber()
          Gets the value of the field value as Number
 java.lang.String getString()
          Gets the value of the field value as String
 int getType()
           
 void set(java.lang.Object o)
          Sets the value of the field value with new one
 void setBigDecimal(java.math.BigDecimal bd)
          Sets the value of the field value with new one
 void setDate(java.util.Date date)
          Sets the value of the field value with new one
 void setDouble(double i)
          Sets the value of the field value with new one (as double)
 void setFloat(float i)
          Sets the value of the field value with new one (which is a float)
 void setInt(int i)
          Sets the value of the field value with new one (which is an int)
 void setLong(long i)
          Sets the value of the field value with new one
 void setNumber(java.lang.Number n)
          Sets the value of the field value with new one
 void setObject(java.lang.Object o)
           
 void setObject1(java.lang.Object o)
           
 void setString(java.lang.String s)
          Sets the value of the field value with new one
 void setType(int n)
           
 java.lang.String toString()
          Gets the value of the field value as String
 
Methods inherited from class com.ds.fw.types.FwSimpleObject
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, printStackTrace, toStringValue
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public int type

value

public java.lang.Object value
Constructor Detail

FwValue

public FwValue()

FwValue

public FwValue(java.lang.Object o,
               int t)
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

setType

public void setType(int n)

getType

public int getType()

get

public java.lang.Object get()
Gets the value of the field value of this FwDBField

Returns:
the value of the field value

set

public void set(java.lang.Object o)
Sets the value of the field value with new one

Parameters:
o - - the new value

setObject

public void setObject(java.lang.Object o)

setObject1

public void setObject1(java.lang.Object o)

getString

public java.lang.String getString()
Gets the value of the field value as String

Returns:
the value of the field value as String

toString

public java.lang.String toString()
Gets the value of the field value as String

Specified by:
toString in interface FwSimpleObjectIF
Overrides:
toString in class FwSimpleObject
Returns:
the value of the field value as String

setString

public void setString(java.lang.String s)
Sets the value of the field value with new one

Parameters:
s - - the new value

getInt

public int getInt()
           throws java.lang.ClassCastException,
                  java.lang.NullPointerException
Gets the value of the field value as int

Returns:
the value of the field value as int
Throws:
java.lang.ClassCastException - - if the value of the field value does not represent an Integer object
java.lang.NullPointerException

setInt

public void setInt(int i)
Sets the value of the field value with new one (which is an int)

Parameters:
i - - the new value

getFloat

public java.lang.Float getFloat()
                         throws java.lang.ClassCastException
Gets the value of the field value as Float

Returns:
the value of the field value as Float
Throws:
java.lang.ClassCastException - if the value of the field value does not represent a Float object

setFloat

public void setFloat(float i)
Sets the value of the field value with new one (which is a float)

Parameters:
i - - the new value

getDouble

public java.lang.Double getDouble()
                           throws java.lang.ClassCastException
Gets the value of the field value as Double

Returns:
the value of the field value as Double
Throws:
java.lang.ClassCastException - if the value of the field value does not represent a Double object.

setDouble

public void setDouble(double i)
Sets the value of the field value with new one (as double)

Parameters:
i - the new value

getDate

public java.util.Date getDate()
                       throws java.lang.ClassCastException
Gets the value of the field value as java.util.Date

Returns:
the value of the field value as java.util.Date
Throws:
java.lang.ClassCastException - - if the value of the field value does not represent a java.util.Date object (cannot be cast to java.util.Date object)

setDate

public void setDate(java.util.Date date)
Sets the value of the field value with new one

Parameters:
date - - the new value

getLong

public long getLong()
             throws java.lang.ClassCastException
Gets the value of the field value as long

Returns:
the value of the field value as long
Throws:
java.lang.ClassCastException - if the field value cannot be cast to Long object

setLong

public void setLong(long i)
Sets the value of the field value with new one

Parameters:
i - - the new value

getNumber

public java.lang.Number getNumber()
                           throws java.lang.ClassCastException
Gets the value of the field value as Number

Returns:
the value of the field value as Number
Throws:
java.lang.ClassCastException - if the field value cannot be cast to Number object

setNumber

public void setNumber(java.lang.Number n)
Sets the value of the field value with new one

Parameters:
n - - the new value

getBigDecimal

public java.lang.Number getBigDecimal()
                               throws java.lang.ClassCastException
Gets the value of the field value as BigDecimal

Returns:
the value of the field value as BigDecimal
Throws:
java.lang.ClassCastException - if the field value cannot be cast to BigDecimal object

setBigDecimal

public void setBigDecimal(java.math.BigDecimal bd)
Sets the value of the field value with new one

Parameters:
bd - - the new value