Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## superwaba.ext.xplat.sql
Class Date

    java.lang.Object
      |
      +--superwaba.ext.xplat.sql.Date

Direct Known Subclasses:
  Time

public class Date
extends Object

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

Field Summary
`protected Time` | `_date`
`protected String` | `_toString`

Constructor Summary
`protected` | `Date()`
`` | `Date(int year, int month, int day)` This method initializes a new instance of this class with the specified year, month, and day.
`protected` | `Date(String str, byte format)`
`protected` | `Date(Time time)`

Method Summary
`protected String` | `convertDateToString()`
`int` | `getDate()`
`int` | `getMonth()`
`int` | `getYear()`
`void` | `setDate(int date)`
`void` | `setMonth(int month)`
`void` | `setYear(int year)`
`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 date in JDBC format into a Java date.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, wait, wait`

Field Detail

### _toString

    protected String _toString

### _date

    protected Time _date

Constructor Detail

### Date

    public Date(int year,
                int month,
                int day)

  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:
    `year` - The year of this date minue 1900.
    `month` - The month of this date (0-11).
    `day` - The day of this date (1-31).

### Date

    protected Date(String str,
                   byte format)

### Date

    protected Date(Time time)

### Date

    protected Date()

Method Detail

### valueOf

    public static Date valueOf(String str)

  This method returns a new instance of this class by parsing a date in JDBC format into a Java date. JDBC format is DATE_YMD.
  Parameters:
    `str` - The string to parse.
  Returns:
    The resulting `java.sql.Date` value.

### getDate

    public int getDate()

### setDate

    public void setDate(int date)

### getMonth

    public int getMonth()

### setMonth

    public void setMonth(int month)

### getYear

    public int getYear()

### setYear

    public void setYear(int year)

### toString

    public String toString()

  This method returns this date in JDBC format. JDBC format is DATE_YMD.
  Overrides:
    toString in class Object
  Returns:
    This date as a string.

### convertDateToString

    protected String convertDateToString()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD