superwaba.ext.xplat.sql
Class Time

java.lang.Object
  |
  +--superwaba.ext.xplat.sql.Date
        |
        +--superwaba.ext.xplat.sql.Time
Direct Known Subclasses:
Timestamp

public class Time
extends Date

This class is a wrapper around java.util.Date to allow the JDBC driver to identify the value as a SQL Time.


Fields inherited from class superwaba.ext.xplat.sql.Date
_date, _toString
 
Constructor Summary
  Time(int hour, int minute, int second)
          This method initializes a new instance of this class with the specified year, month, and day.
protected Time(Time time)
           
 
Method Summary
protected  String convertTimeToString()
           
 int getHour()
           
 int getMinute()
           
 int getSecond()
           
protected static Time parseTime(String str, int begin)
           
 void setHour(int hour)
           
 void setMinute(int minute)
           
 void setSecond(int second)
           
 String toString()
          This method returns this date in JDBC format.
static Date valueOf(String str)
          This method returns a new instance of this class by parsing a time in JDBC format into a Java date.
 
Methods inherited from class superwaba.ext.xplat.sql.Date
convertDateToString, getDate, getMonth, getYear, setDate, setMonth, setYear
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, wait, wait
 

Constructor Detail

Time

public Time(int hour,
            int minute,
            int second)
This method initializes a new instance of this class with the specified year, month, and day. While this method is deprecated in the latest JDBC, it is the only way to do it for now in SW, as SW does not have a 'long' representation of time, and the conversion overhead is considered too great for small devices (this may change in the future).
Parameters:
hour - The hour for this Time (0-23)
minute - The minute for this time (0-59)
second - The second for this time (0-59)

Time

protected Time(Time time)
Method Detail

valueOf

public static Date valueOf(String str)
This method returns a new instance of this class by parsing a time in JDBC format into a Java date. JDBC format is HH:mm:ss
Parameters:
str - The string to parse.
Returns:
The resulting java.sql.Time value.

parseTime

protected static Time parseTime(String str,
                                int begin)

getHour

public int getHour()

setHour

public void setHour(int hour)

getMinute

public int getMinute()

setMinute

public void setMinute(int minute)

getSecond

public int getSecond()

setSecond

public void setSecond(int second)

toString

public String toString()
This method returns this date in JDBC format.
Overrides:
toString in class Date
Returns:
This date as a string.

convertTimeToString

protected String convertTimeToString()