|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.Date
com.davisor.data.TimestampData
com.davisor.data.TimeData
TimeData represents the time of day, as opposed to date values that represent dates and timestamps that represent them both.
setTime(long),
TimeType,
Serialized Form| Field Summary |
| Fields inherited from class com.davisor.data.TimestampData |
M_type, NaT |
| Constructor Summary | |
TimeData()
Create a new time data object with the current time and default type. |
|
TimeData(DateFormatType type)
Create a new time data object with the current time and the given type. |
|
TimeData(DateFormatType type,
java.util.Date value)
Create a new time data object with the current time and the given type and value |
|
TimeData(DateFormatType type,
long milliseconds)
Create a new time data object with the current time and the given type and value. |
|
TimeData(DateFormatType type,
java.lang.String stringValue,
java.text.ParsePosition status)
Creates a time data value from a string value. |
|
TimeData(TimeData data,
boolean deep)
Deep or shallow copy constructor. |
|
| Method Summary | |
double |
deinterpolate(DataValue min,
DataValue max)
De-interpolates the current data value to a scalar value, in respect, with given data value range. |
com.davisor.core.Dupable |
dup()
Makes a deep copy of this object. |
void |
setTime(long milliseconds)
Sets the current time value, but enforcing time over date by stripping all the date information from the given timestamp value. |
void |
toStatement(java.sql.PreparedStatement statement,
int parameter)
Convert data to a prepared statement input parameter. |
| Methods inherited from class com.davisor.data.TimestampData |
abs, add, ceil, ceil, compareTo, compareTo, createCalendar, div, floor, floor, getFormat, getType, initTime, interpolate, isNull, max, min, mul, negate, setTime, setValue, sub, toString, toXML, unit |
| Methods inherited from class java.util.Date |
after, before, clone, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setYear, toGMTString, toLocaleString, UTC |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public TimeData()
public TimeData(TimeData data,
boolean deep)
data - source data (may be null)deep - determines if the copying is deep or shallowTimestampData.getType(),
Type.dup()public TimeData(DateFormatType type)
type - time type
public TimeData(DateFormatType type,
java.util.Date value)
type - time typevalue - time value (may be null)TimeData(DateFormatType,long)
public TimeData(DateFormatType type,
long milliseconds)
type - time typemilliseconds - time valueTimeData(DateFormatType,java.util.Date),
TimestampData.initTime(com.davisor.data.DateFormatType, long)
public TimeData(DateFormatType type,
java.lang.String stringValue,
java.text.ParsePosition status)
throws InvalidDataException
stringValue - string value to be parsedstatus - parse status (may be null)
InvalidDataException - if string value could not be parserTimestampData.setValue(String,ParsePosition)| Method Detail |
public void toStatement(java.sql.PreparedStatement statement,
int parameter)
throws java.sql.SQLException
toStatement in interface DataValuetoStatement in class TimestampDatajava.sql.SQLException - if a SQL error occurs.public void setTime(long milliseconds)
milliseconds - date time valueTimestampData.initTime(com.davisor.data.DateFormatType, long),
DateData.setTime(long)
public double deinterpolate(DataValue min,
DataValue max)
throws InvalidDataException
Timestamp values are de-interpolated with the equation:
(thisValue - minValue) / (maxValue - minValue)
deinterpolate in interface DataValuedeinterpolate in class TimestampDatamin - a data value representing a range's lower limitmax - a data value representing a range's higher limit
InvalidDataException - if the de-interpolation failspublic com.davisor.core.Dupable dup()
dup in interface com.davisor.core.Dupabledup in class TimestampData
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||