jdk/src/share/classes/java/sql/Date.java
author lancea
Tue, 10 Aug 2010 10:07:33 -0400
changeset 6298 470b6c49fe5c
parent 5506 202f599c92aa
child 6540 a4ae668f6125
permissions -rw-r--r--
6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax Reviewed-by: minqi
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.sql;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * <P>A thin wrapper around a millisecond value that allows
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * JDBC to identify this as an SQL <code>DATE</code> value.  A
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * milliseconds value represents the number of milliseconds that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * have passed since January 1, 1970 00:00:00.000 GMT.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * To conform with the definition of SQL <code>DATE</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * millisecond values wrapped by a <code>java.sql.Date</code> instance
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * must be 'normalized' by setting the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * hours, minutes, seconds, and milliseconds to zero in the particular
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * time zone with which the instance is associated.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
public class Date extends java.util.Date {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
     * Constructs a <code>Date</code> object initialized with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
     * year, month, and day.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
     * The result is undefined if a given argument is out of bounds.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
     * @param year the year minus 1900; must be 0 to 8099. (Note that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
     *        8099 is 9999 minus 1900.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
     * @param month 0 to 11
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
     * @param day 1 to 31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
     * @deprecated instead use the constructor <code>Date(long date)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    public Date(int year, int month, int day) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
        super(year, month, day);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
     * Constructs a <code>Date</code> object using the given milliseconds
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
     * time value.  If the given milliseconds value contains time
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
     * information, the driver will set the time components to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
     * time in the default time zone (the time zone of the Java virtual
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
     * machine running the application) that corresponds to zero GMT.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     * @param date milliseconds since January 1, 1970, 00:00:00 GMT not
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     *        to exceed the milliseconds representation for the year 8099.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     *        A negative number indicates the number of milliseconds
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
     *        before January 1, 1970, 00:00:00 GMT.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    public Date(long date) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        // If the millisecond date value contains time info, mask it out.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        super(date);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     * Sets an existing <code>Date</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
     * using the given milliseconds time value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     * If the given milliseconds value contains time information,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     * the driver will set the time components to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
     * time in the default time zone (the time zone of the Java virtual
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
     * machine running the application) that corresponds to zero GMT.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     * @param date milliseconds since January 1, 1970, 00:00:00 GMT not
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     *        to exceed the milliseconds representation for the year 8099.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     *        A negative number indicates the number of milliseconds
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     *        before January 1, 1970, 00:00:00 GMT.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    public void setTime(long date) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        // If the millisecond date value contains time info, mask it out.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
        super.setTime(date);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
     * Converts a string in JDBC date escape format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     * a <code>Date</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
     * @param s a <code>String</code> object representing a date in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
     *        in the format "yyyy-mm-dd"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     * @return a <code>java.sql.Date</code> object representing the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     *         given date
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * @throws IllegalArgumentException if the date given is not in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     *         JDBC date escape format (yyyy-mm-dd)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    public static Date valueOf(String s) {
6298
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   106
        final int YEAR_LENGTH = 4;
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   107
        final int MONTH_LENGTH = 2;
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   108
        final int DAY_LENGTH = 2;
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   109
        final int MAX_MONTH = 12;
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   110
        final int MAX_DAY = 31;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        int firstDash;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        int secondDash;
6298
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   113
        Date d = null;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
6298
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   115
        if (s == null) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            throw new java.lang.IllegalArgumentException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
6298
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   119
        firstDash = s.indexOf('-');
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   120
        secondDash = s.indexOf('-', firstDash + 1);
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   121
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   122
        if ((firstDash > 0) && (secondDash > 0) && (secondDash < s.length() - 1)) {
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   123
            String yyyy = s.substring(0, firstDash);
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   124
            String mm = s.substring(firstDash + 1, secondDash);
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   125
            String dd = s.substring(secondDash + 1);
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   126
            if (yyyy.length() == YEAR_LENGTH && mm.length() == MONTH_LENGTH &&
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   127
                    dd.length() == DAY_LENGTH) {
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   128
                int year = Integer.parseInt(yyyy);
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   129
                int month = Integer.parseInt(mm);
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   130
                int day = Integer.parseInt(dd);
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   131
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   132
                if ((month >= 1 && month <= MAX_MONTH) && (day >= 1 && day <= MAX_DAY)) {
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   133
                    d = new Date(year - 1900, month - 1, day);
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   134
                }
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   135
            }
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   136
        }
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   137
        if (d == null) {
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   138
            throw new java.lang.IllegalArgumentException();
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   139
        }
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   140
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   141
        return d;
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   142
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
6298
470b6c49fe5c 6898593: java.sql.Date.valueOf no exception if date given is not in the JDBC date escape syntax
lancea
parents: 5506
diff changeset
   145
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * Formats a date in the date escape format yyyy-mm-dd.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     * @return a String in yyyy-mm-dd format
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
    public String toString () {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        int year = super.getYear() + 1900;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        int month = super.getMonth() + 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
        int day = super.getDate();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        char buf[] = "2000-00-00".toCharArray();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
        buf[0] = Character.forDigit(year/1000,10);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        buf[1] = Character.forDigit((year/100)%10,10);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        buf[2] = Character.forDigit((year/10)%10,10);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        buf[3] = Character.forDigit(year%10,10);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        buf[5] = Character.forDigit(month/10,10);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        buf[6] = Character.forDigit(month%10,10);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
        buf[8] = Character.forDigit(day/10,10);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
        buf[9] = Character.forDigit(day%10,10);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        return new String(buf);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    // Override all the time operations inherited from java.util.Date;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
    * This method is deprecated and should not be used because SQL Date
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    * values do not have a time component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    * @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
    * @exception java.lang.IllegalArgumentException if this method is invoked
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
    * @see #setHours
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    public int getHours() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
        throw new java.lang.IllegalArgumentException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
    * This method is deprecated and should not be used because SQL Date
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
    * values do not have a time component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
    * @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    * @exception java.lang.IllegalArgumentException if this method is invoked
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
    * @see #setMinutes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    public int getMinutes() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        throw new java.lang.IllegalArgumentException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
    * This method is deprecated and should not be used because SQL Date
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    * values do not have a time component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
    * @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    * @exception java.lang.IllegalArgumentException if this method is invoked
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
    * @see #setSeconds
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    public int getSeconds() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
        throw new java.lang.IllegalArgumentException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    * This method is deprecated and should not be used because SQL Date
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    * values do not have a time component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
    * @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    * @exception java.lang.IllegalArgumentException if this method is invoked
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
    * @see #getHours
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    public void setHours(int i) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        throw new java.lang.IllegalArgumentException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    * This method is deprecated and should not be used because SQL Date
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    * values do not have a time component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
    * @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
    * @exception java.lang.IllegalArgumentException if this method is invoked
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    * @see #getMinutes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    public void setMinutes(int i) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        throw new java.lang.IllegalArgumentException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    * This method is deprecated and should not be used because SQL Date
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
    * values do not have a time component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
    * @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
    * @exception java.lang.IllegalArgumentException if this method is invoked
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
    * @see #getSeconds
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    public void setSeconds(int i) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
        throw new java.lang.IllegalArgumentException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
    * Private serial version unique ID to ensure serialization
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    * compatibility.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
    static final long serialVersionUID = 1511598038487230103L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
}