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.
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)
|
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)
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()