|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.marklogic.xdbc.XDBCDuration
A duration represents an XQuery duration primitive type.
| Field Summary | |
static int |
XDBC_DURATION_NEGATIVE
Indicates a negative duration. |
static int |
XDBC_DURATION_POSITIVE
Indicates a positive duration. |
| Constructor Summary | |
XDBCDuration()
Constructor for an empty duration object. |
|
XDBCDuration(int sign,
int years,
int months,
int days,
int hours,
int minutes,
int seconds,
double subseconds)
Constructor for a duration object which takes each individual value part and returns an duration object with the valuess set. |
|
XDBCDuration(String duration)
Constructor for a duration object which takes a duration string and parses it into the object representation. |
|
| Method Summary | |
boolean |
equals(XDBCDuration duration)
Compares this XDBCDuration object to the specified object. |
int |
getDays()
Returns the days value of this duration. |
int |
getHours()
Returns the hours value of this duration. |
int |
getMinutes()
Returns the minutes value of this duration. |
int |
getMonths()
Returns the months value of this duration. |
int |
getSeconds()
Returns the seconds value of this duration. |
int |
getSign()
Returns the sign of this duration, either positive or negative. |
double |
getSubSeconds()
Returns the fractional portion of the seconds value of this duration as a Java double. |
int |
getYears()
Returns the years value of this duration. |
void |
setDays(int days)
Sets the days value of this duration. |
void |
setHours(int hours)
Sets the hours value of this duration. |
void |
setMinutes(int minutes)
Sets the minutes value of this duration. |
void |
setMonths(int months)
Sets the months value of this duration. |
void |
setSeconds(int seconds)
Sets the seconds value of this duration. |
void |
setSign(int sign)
Sets the sign of this duration, either positive or negative. |
void |
setSubSeconds(double subseconds)
Sets the fractional portion of the seconds value of this duration as a Java double. |
void |
setYears(int years)
Sets the years value of this duration. |
String |
toString()
Formats this duration object as a String in the format prescribed in the W3C description of XML datatypes for a duration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int XDBC_DURATION_POSITIVE
public static final int XDBC_DURATION_NEGATIVE
| Constructor Detail |
public XDBCDuration()
public XDBCDuration(String duration)
public XDBCDuration(int sign,
int years,
int months,
int days,
int hours,
int minutes,
int seconds,
double subseconds)
| Method Detail |
public int getSign()
public int getYears()
public int getMonths()
public int getDays()
public int getHours()
public int getMinutes()
public int getSeconds()
public double getSubSeconds()
public void setSign(int sign)
sign - XDBC_DURATION_POSITIVE if the duration is a positive
value, or XDBC_DURATION_NEGATIVE if the duration is a negative value.public void setYears(int years)
years - the integer years value.public void setMonths(int months)
months - the integer months value.public void setDays(int days)
days - the integer days value.public void setHours(int hours)
hours - the integer hours value.public void setMinutes(int minutes)
minutes - the integer minutes value.public void setSeconds(int seconds)
seconds - the integer seconds value.public void setSubSeconds(double subseconds)
subseconds - the double representation of the fractional
seconds.public boolean equals(XDBCDuration duration)
duration - the XDBCDuration object to compare
public String toString()