|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.data.VoidData
com.davisor.data.VoidValue
com.davisor.data.GenericValue
GenericValue implements a generic base class for DataValue
classes. In particular, GenericValue provides usefull generic
implementations for all DataValue interface methods.
Type,
VoidType,
Serialized Form| Field Summary |
| Fields inherited from class com.davisor.data.VoidData |
M_type |
| Constructor Summary | |
|
GenericValue()
Default constructor. |
|
GenericValue(GenericValue data,
boolean deep)
Deep or shallow copy constructor. |
protected |
GenericValue(Type type)
Create a new data object. |
| Method Summary | |
int |
compareTo(java.lang.Object o)
Compares this generic value to other values. |
DataValue |
max(DataValue value)
Finds the larger of two data values. |
DataValue |
min(DataValue value)
Finds the smaller of two data values. |
void |
toStatement(java.sql.PreparedStatement statement,
int parameter)
Converts the data to a prepared statement input parameter. |
java.lang.String |
toXML()
Gets the XML string representation of this value. |
| Methods inherited from class com.davisor.data.VoidValue |
abs, add, ceil, deinterpolate, div, dup, floor, getFormat, interpolate, isNull, mul, negate, setValue, sub, unit |
| Methods inherited from class com.davisor.data.VoidData |
equals, getDataValue, getType, hashCode, setType, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.davisor.data.DataValue |
toString |
| Methods inherited from interface com.davisor.data.Data |
getType |
| Constructor Detail |
public GenericValue()
public GenericValue(GenericValue data,
boolean deep)
data - source data (may be null)deep - determines if the copying is deep or shallowVoidData.getType(),
Type.dup()protected GenericValue(Type type)
type - The type of data.| Method Detail |
public int compareTo(java.lang.Object o)
This default implementation compares the string values of this and given object.
compareTo in interface java.lang.ComparablecompareTo in class VoidValuemax(com.davisor.data.DataValue),
min(com.davisor.data.DataValue),
Compare.compareTo(Object,Object)
public DataValue max(DataValue value)
throws InvalidDataException
compareTo method, so it may well suit
the purposes of many sub-classes.
If the given value is null or an
instance of GenericValue, a reference to
this instance is returned.
max in interface DataValuemax in class VoidValuevalue - a data value to be compared with this data value
InvalidDataException - if the data value cannot be compared.compareTo(java.lang.Object)
public DataValue min(DataValue value)
throws InvalidDataException
compareTo method, so it may well suit the
purposes of many sub-classes.
If the given value is null or an
instance of GenericValue, a reference to
this instance is returned.
min in interface DataValuemin in class VoidValuevalue - a data value to be compared with this data value
InvalidDataException - if the data value cannot be compared.compareTo(java.lang.Object)
public void toStatement(java.sql.PreparedStatement statement,
int parameter)
throws java.sql.SQLException
This default impelementation sets statement parameter equal to
the string value of this object, if it is not null,
and null (java.sql.Types.OTHER)
otherwise.
toStatement in interface DataValuetoStatement in class VoidValuestatement - statement to be updatedparameter - index of the statement parameter to be updated
java.sql.SQLException - if a SQL error occurs.VoidData.toString()public java.lang.String toXML()
This default implementation takes the object string representation
and runs it through XMLUnicodeEncoder.
toXML in interface DataValuetoXML in class VoidValueVoidData.toString(),
XMLUnicodeEncoder.encode(java.lang.String, boolean)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||