Name

Time

Synopsis

Class Name: java.sql.Time

Superclass: java.util.Date

Immediate Subclasses: None

Interfaces Implemented: None

Availability: JDK 1.1

Description

This version of the java.util.Date class maps to a SQL TIME datatype.

Class Summary

public class Time extends java.util.Date {
    static public Time valueOf(String s);
    public Time(int hour, int minute, int second);
    public Time(long time);
    #public int getDate( );
    #public int getDay( );
    #public int getMonth( );
    #public int getYear( );
    #public int setDate(int i);
    #public int setMonth(int i);
    public void setTime(long time);
    #public void setYear(int i);
    public String toString( );
}

Object Constructors

Time( )

public Time(int hour, int minute, intsecond)
public Time(long time)
Description

This constructor creates a new Time object. The first prototype constructs a Time for the hour, minute, and seconds specified. The second constructs one based on the number of seconds since January 1, 1970 12:00:00 GMT.

Object Methods

getDate( ), setDate( ), getDay( ), getMonth( ), setMonth( ), getYear( ), and setYear( )

                        getDate( ), setDate( ), getDay( ), getMonth( ), setMonth( ), getYear( ), and setYear( )public int getDate( )
getDate( ), setDate( ), getDay( ), getMonth( ), setMonth( ), getYear( ), and setYear( )public int getDay( )
getDate( ), setDate( ), getDay( ), getMonth( ), setMonth( ), getYear( ), and setYear( )public int getMonth( )
public int getYear( )
public int setDate(int i)
public int setMonth(int i)
public ...

Get Database Programming with JDBC & Java, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.