public class RedshiftIntervalYearToMonth extends RedshiftInterval implements Serializable, Cloneable
type, value| Constructor and Description |
|---|
RedshiftIntervalYearToMonth()
required by the driver.
|
RedshiftIntervalYearToMonth(int month) |
RedshiftIntervalYearToMonth(int year,
int month) |
RedshiftIntervalYearToMonth(String value)
Initialize an interval with a given interval string representation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(RedshiftIntervalYearToMonth 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 |
setDays(int days)
Override the parent setDays method disallowing a non-zero value.
|
void |
setHours(int hours)
Override the parent setHours method disallowing a non-zero value.
|
void |
setMinutes(int minutes)
Override the parent setMinutes method disallowing a non-zero value.
|
void |
setSeconds(double seconds)
Override the parent setSeconds method disallowing a non-zero value.
|
void |
setValue(int month)
Set all values of this interval using just one specified value.
|
void |
setValue(int month,
long time)
Override the parent setValue method disallowing a non-zero value for time.
|
add, add, add, clone, getDays, getHours, getMicroSeconds, getMinutes, getMonths, getSeconds, getWholeSeconds, getYears, hashCode, scale, setMonths, setValue, setValue, setYears, totalMicroseconds, totalMonthsgetType, setType, toStringpublic RedshiftIntervalYearToMonth()
public RedshiftIntervalYearToMonth(String value) throws SQLException
value - String representated interval (e.g. '3 years 2 mons').SQLException - Is thrown if the string representation has an
unknown format.RedshiftInterval.setValue(String)public RedshiftIntervalYearToMonth(int year,
int month)
throws SQLException
SQLExceptionpublic RedshiftIntervalYearToMonth(int month)
throws SQLException
SQLExceptionpublic void setValue(int month)
month - Total number of months (assuming 12 months in a year)public void setValue(int month,
long time)
setValue in class RedshiftIntervalmonth - Total number of months (assuming 12 months in a year)time - Should be 0.public void setDays(int days)
setDays in class RedshiftIntervaldays - Should be 0.public void setHours(int hours)
setHours in class RedshiftIntervalhours - Should be 0.public void setMinutes(int minutes)
setMinutes in class RedshiftIntervalminutes - Should be 0.public void setSeconds(double seconds)
setSeconds in class RedshiftIntervalseconds - Should be 0.public String getValue()
getValue in class RedshiftIntervalpublic void add(RedshiftIntervalYearToMonth interval)
interval - intval to addpublic boolean equals(Object obj)
equals in class RedshiftIntervalobj - Object to compare withCopyright © 2024 Amazon.com Inc.. All rights reserved.