public class RedshiftIntervalDayToSecond extends RedshiftInterval implements Serializable, Cloneable
type, value| Constructor and Description |
|---|
RedshiftIntervalDayToSecond()
required by the driver.
|
RedshiftIntervalDayToSecond(int days,
int hours,
int minutes,
double seconds) |
RedshiftIntervalDayToSecond(long time) |
RedshiftIntervalDayToSecond(String value)
Initialize an interval with a given interval string representation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(RedshiftIntervalDayToSecond interval)
Add this interval's value to the passed interval.
|
boolean |
equals(Object obj)
Returns whether an object is equal to this one or not.
|
String |
getValue()
Returns the stored interval information as a string.
|
void |
setMonths(int months)
Override the parent setMonths method disallowing a non-zero value.
|
void |
setValue(int month,
long time)
Override the parent setValue method disallowing a non-zero value for month.
|
void |
setValue(long time)
Set all values of this interval using just one specified value.
|
void |
setYears(int years)
Override the parent setYears method disallowing a non-zero value.
|
add, add, add, clone, getDays, getHours, getMicroSeconds, getMinutes, getMonths, getSeconds, getWholeSeconds, getYears, hashCode, scale, setDays, setHours, setMinutes, setSeconds, setValue, setValue, totalMicroseconds, totalMonthsgetType, setType, toStringpublic RedshiftIntervalDayToSecond()
public RedshiftIntervalDayToSecond(String value) throws SQLException
value - String representated interval
(e.g. '3 days 4 hours 1 mins 4.30 seconds').SQLException - Is thrown if the string representation has an
unknown format.RedshiftInterval.setValue(String)public RedshiftIntervalDayToSecond(int days,
int hours,
int minutes,
double seconds)
throws SQLException
SQLExceptionpublic RedshiftIntervalDayToSecond(long time)
throws SQLException
SQLExceptionpublic void setValue(long time)
time - Total number of microseconds
(assuming 1day = 24hrs = 1440mins = 86400secs = 8.64e10microsecs)public void setValue(int month,
long time)
setValue in class RedshiftIntervalmonth - Should be 0.time - Total number of microseconds
(assuming 1day = 24hrs = 1440mins = 86400secs = 8.64e10microsecs)public void setYears(int years)
setYears in class RedshiftIntervalyears - Should be 0.public void setMonths(int months)
setMonths in class RedshiftIntervalmonths - Should be 0.public String getValue()
getValue in class RedshiftIntervalpublic void add(RedshiftIntervalDayToSecond interval)
interval - intval to addpublic boolean equals(Object obj)
equals in class RedshiftIntervalobj - Object to compare withCopyright © 2024 Amazon.com Inc.. All rights reserved.