org.datamixer.values
Class Value

java.lang.Object
  extended byorg.datamixer.values.Value
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
DateValue, DoubleValue, IntValue, NullValue, ObjectValue, StringValue

public abstract class Value
extends java.lang.Object
implements java.lang.Cloneable


Field Summary
protected  int dataType_
          datatype
protected  boolean debugEnabled_
          true if logging is debug enabled
protected  org.apache.log4j.Logger logger_
          logger
protected  java.lang.String name_
          name
 
Constructor Summary
Value()
           
 
Method Summary
 java.lang.Object clone()
          Returns a deep copy.
protected abstract  Value doClone()
          Returns a deep copy.
 Value findValue(java.lang.String[] names)
          Find a nested value by path, a dot-separated list of names.
 java.math.BigDecimal getBigDecimal()
          Returns the current value as a BigDecimal.
 boolean getBoolean()
          Returns the current value as an boolean.
 byte getByte()
          Returns the current value as a byte.
 byte[] getBytes()
          Returns the current value as an array of bytes.
 java.util.Calendar getCalendar()
          Returns the current value as a Calendar.
 int getDataType()
          Returns the datatype of the current value.
 java.util.Date getDate()
          Returns the current value as a Date.
 double getDouble()
          Returns the current value as a double.
 float getFloat()
          Returns the current value as a float.
 java.text.Format getFormat()
          Returns the current format.
 int getInt()
          Returns the current value as an int.
 long getLong()
          Returns the current value as a long.
 java.lang.String getName()
          Returns the name.
 java.lang.Object getObject()
          Returns the current value as a Object.
 short getShort()
          Returns the current value as an short.
 java.lang.String getString()
          Returns the current value as a String.
 java.lang.StringBuffer getString(java.lang.StringBuffer buf)
          Constructs the current value as a String.
 java.sql.Time getTime()
          Returns the current value as a Time.
 java.sql.Timestamp getTimestamp()
          Returns the current value as a Timestamp.
 ValueList getValueList()
          Returns the current value as a ValueList.
 void setBigDecimal(java.math.BigDecimal value)
          Sets the current value as a BigDecimal.
 void setBoolean(boolean value)
          Sets the current value as an boolean.
 void setByte(byte value)
          Sets the current value as a byte.
 void setBytes(byte[] value)
          Sets the current value as an array of bytes.
 void setCalendar(java.util.Calendar value)
          Sets the current value as a Calendar.
protected  void setDataType(int value)
          Returns the datatype of the current value.
 void setDate(java.util.Date value)
          Sets the current value as a Date.
 void setDouble(double value)
          Sets the current value as a double.
 void setFloat(float value)
          Sets the current value as a float.
 void setFormat(java.text.Format value)
          Sets the current format.
 void setInt(int value)
          Sets the current value as an int.
 void setLong(long value)
          Sets the current value as a long.
 void setName(java.lang.String name)
          Set the name.
 void setObject(java.lang.Object value)
          Sets the current value as a Object.
 void setShort(short value)
          Sets the current value as an short.
 void setString(java.lang.String value)
          Sets the current value as a String.
 void setTime(java.sql.Time value)
          Sets the current value as a Time.
 void setTimestamp(java.sql.Timestamp value)
          Sets the current value as a Timestamp.
 void setValueList(ValueList value)
          Sets the current value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name_

protected java.lang.String name_
name


dataType_

protected int dataType_
datatype


logger_

protected org.apache.log4j.Logger logger_
logger


debugEnabled_

protected boolean debugEnabled_
true if logging is debug enabled

Constructor Detail

Value

public Value()
Method Detail

clone

public java.lang.Object clone()
Returns a deep copy.


doClone

protected abstract Value doClone()
Returns a deep copy.


toString

public java.lang.String toString()

getName

public java.lang.String getName()
Returns the name.


setName

public void setName(java.lang.String name)
Set the name.


findValue

public Value findValue(java.lang.String[] names)
                throws DatamixerException
Find a nested value by path, a dot-separated list of names.

Throws:
DatamixerException

getDataType

public int getDataType()
Returns the datatype of the current value.


setDataType

protected void setDataType(int value)
Returns the datatype of the current value.


getFormat

public java.text.Format getFormat()
Returns the current format.

Returns:
the current format.

setFormat

public void setFormat(java.text.Format value)
Sets the current format.


getBigDecimal

public java.math.BigDecimal getBigDecimal()
Returns the current value as a BigDecimal.

Returns:
the current value as a BigDecimal.

setBigDecimal

public void setBigDecimal(java.math.BigDecimal value)
Sets the current value as a BigDecimal.

Parameters:
value - a BigDecimal value.

getBoolean

public boolean getBoolean()
Returns the current value as an boolean.

Returns:
the current value as an boolean.

setBoolean

public void setBoolean(boolean value)
Sets the current value as an boolean.

Parameters:
value - a boolean value.

getByte

public byte getByte()
Returns the current value as a byte.

Returns:
the current value as a byte.

setByte

public void setByte(byte value)
Sets the current value as a byte.

Parameters:
value - a byte value.

getBytes

public byte[] getBytes()
Returns the current value as an array of bytes.

Returns:
the current value as an array of bytes.

setBytes

public void setBytes(byte[] value)
Sets the current value as an array of bytes.

Parameters:
value - a array value of bytes.

getCalendar

public java.util.Calendar getCalendar()
Returns the current value as a Calendar.

Returns:
the current value as a Calendar.

setCalendar

public void setCalendar(java.util.Calendar value)
Sets the current value as a Calendar.

Parameters:
value - a Calendar value.

getDate

public java.util.Date getDate()
Returns the current value as a Date.

Returns:
the current value as a Date.

setDate

public void setDate(java.util.Date value)
Sets the current value as a Date.

Parameters:
value - a Date value.

getDouble

public double getDouble()
Returns the current value as a double.

Returns:
the current value as a double.

setDouble

public void setDouble(double value)
Sets the current value as a double.

Parameters:
value - a double value.

getFloat

public float getFloat()
Returns the current value as a float.

Returns:
the current value as a float.

setFloat

public void setFloat(float value)
Sets the current value as a float.

Parameters:
value - a float value.

getInt

public int getInt()
Returns the current value as an int.

Returns:
the current value as an int.

setInt

public void setInt(int value)
Sets the current value as an int.

Parameters:
value - a int value.

getLong

public long getLong()
Returns the current value as a long.

Returns:
the current value as a long.

setLong

public void setLong(long value)
Sets the current value as a long.

Parameters:
value - a long value.

getObject

public java.lang.Object getObject()
Returns the current value as a Object.

Returns:
the current value as a Object.

setObject

public void setObject(java.lang.Object value)
Sets the current value as a Object.

Parameters:
value - a Object value.

getShort

public short getShort()
Returns the current value as an short.

Returns:
the current value as an short.

setShort

public void setShort(short value)
Sets the current value as an short.

Parameters:
value - a short value.

getString

public java.lang.String getString()
Returns the current value as a String.

Returns:
the current value as a String.

getString

public java.lang.StringBuffer getString(java.lang.StringBuffer buf)
Constructs the current value as a String.


setString

public void setString(java.lang.String value)
Sets the current value as a String.

Parameters:
value - a String value.

getTime

public java.sql.Time getTime()
Returns the current value as a Time.

Returns:
the current value as a Time.

setTime

public void setTime(java.sql.Time value)
Sets the current value as a Time.

Parameters:
value - a Time value.

getTimestamp

public java.sql.Timestamp getTimestamp()
Returns the current value as a Timestamp.

Returns:
the current value as a Timestamp.

setTimestamp

public void setTimestamp(java.sql.Timestamp value)
Sets the current value as a Timestamp.

Parameters:
value - a Timestamp value.

getValueList

public ValueList getValueList()
Returns the current value as a ValueList.


setValueList

public void setValueList(ValueList value)
Sets the current value.



Copyright © 2004-2006 datamixer.org. All Rights Reserved.