de.esprit.appsuite.database.dbase

## Class DBTime

- java.lang.Object
- - java.util.Date
  - - java.sql.Time
    - - de.esprit.appsuite.database.dbase.DBTime

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<java.util.Date>

      public class DBTime
      extends java.sql.Time

  This is an extension of Time which automatically fills the non visible time fields to the current datetime values. It also has the before() and after() methods overridden such that only time relevant fields (hour, minute, second) are evaluated (date fields are ignored).
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DBTime()`
    `DBTime(java.util.Date time)` Sets the YEAR, MONTH, DAY to current date values
    `DBTime(int hour, int minute, int second)`
    `DBTime(long time)`
    `DBTime(java.lang.String timeStr)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `after(java.util.Date when)`
    `boolean` | `before(java.util.Date when)`
    `boolean` | `equals(java.lang.Object obj)` Compares the fields DAY_OF_WEEK, MONTH, YEAR, HOUR_OF_DAY, MINUTE, SECOND.
    `static java.text.DateFormat` | `getFormat()`
    `static java.lang.String` | `getFormatString()`
    `static DBTime` | `parseTimeValue(java.lang.String timeStr)` Parses the timeStr to create a java.util.Date instance with correct time information
    `static java.lang.String` | `toNeutralFormat(java.util.Date time)` Formats the time value according to 'HH:mm:ss'
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.sql.Time

      `getDate, getDay, getMonth, getYear, setDate, setMonth, setTime, setYear, valueOf`

    - ### Methods inherited from class java.util.Date

      `clone, compareTo, getHours, getMinutes, getSeconds, getTime, getTimezoneOffset, hashCode, parse, setHours, setMinutes, setSeconds, toGMTString, toLocaleString, UTC`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DBTime

          public DBTime(long time)

    - #### DBTime

          public DBTime()

    - #### DBTime

          public DBTime(java.util.Date time)

      Sets the YEAR, MONTH, DAY to current date values

    - #### DBTime

          public DBTime(int hour,
                int minute,
                int second)

    - #### DBTime

          public DBTime(java.lang.String timeStr)

  - ### Method Detail

    - #### equals

          public boolean equals(java.lang.Object obj)

      Compares the fields DAY_OF_WEEK, MONTH, YEAR, HOUR_OF_DAY, MINUTE, SECOND.
      Overrides:
        `equals` in class `java.util.Date`

    - #### before

          public boolean before(java.util.Date when)

      Overrides:
        `before` in class `java.util.Date`

    - #### after

          public boolean after(java.util.Date when)

      Overrides:
        `after` in class `java.util.Date`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.sql.Time`

    - #### getFormatString

          public static java.lang.String getFormatString()

    - #### getFormat

          public static java.text.DateFormat getFormat()

    - #### parseTimeValue

          public static DBTime parseTimeValue(java.lang.String timeStr)
                                       throws java.text.ParseException

      Parses the timeStr to create a java.util.Date instance with correct time information
      Throws:
        `java.text.ParseException`

    - #### toNeutralFormat

          public static java.lang.String toNeutralFormat(java.util.Date time)

      Formats the time value according to 'HH:mm:ss'

Copyright © 2014 EsprIT-Systems. All Rights Reserved.