|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.idoox.wasp.serialization.xsdbuiltin.DateTimeBase
org.idoox.wasp.serialization.xsdbuiltin.DateTime
Class that represents xsd dateTime type.
Field Summary |
Fields inherited from class org.idoox.wasp.serialization.xsdbuiltin.DateTimeBase |
isNegative, timeZone |
Constructor Summary | |
DateTime(java.util.Date date)
Constructor, initializes object. |
|
DateTime(int year,
int month,
int day,
int hour,
int min,
java.math.BigDecimal sec,
TimeZone timeZone,
boolean isNegative)
Constructor. |
|
DateTime(java.lang.String dateTime)
Constructor that initializes this object. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Equals based on sec, day, hour, min, month, year and DateTimeBase values. |
int |
getDay()
Returns day member of this object. |
int |
getHour()
Returns hour member of this object. |
int |
getMin()
Returns value of minute of this object. |
int |
getMinute()
Returns value of minute of this object. |
int |
getMonth()
Returns month member of this object in the interval 0-11. |
java.math.BigDecimal |
getSec()
Returns second value of this object. |
java.math.BigDecimal |
getSecond()
Returns second value of this object. |
int |
getYear()
Returns year member of this object. |
int |
hashCode()
|
void |
setDay(int day)
Sets day to the given value. |
void |
setHour(int hour)
Sets hour to the given value. |
void |
setMinute(int min)
Sets minute to the given value. |
void |
setMonth(int month)
Sets month to the given value (1-12). |
void |
setParams(java.util.Date date)
Sets parameters of this object to the given java.util.Date object. |
void |
setParams(int year,
int month,
int day,
int hour,
int min,
java.math.BigDecimal sec,
TimeZone timeZone,
boolean isNegative)
Sets parameters of this object. |
void |
setSecond(java.math.BigDecimal sec)
Sets seconds to the given value. |
void |
setYear(int year)
Sets year to the given value. |
java.util.Date |
toJavaUtilDate()
Converts parameters of this object to the java.util.Date Object. |
java.lang.String |
toString()
Deserializes this object to XSD string that represents dateTime. |
Methods inherited from class org.idoox.wasp.serialization.xsdbuiltin.DateTimeBase |
getTimeZone, hasNegativeValue, inputMonth, outputMonth, setDefaultTimeZone, setParams |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DateTime(int year, int month, int day, int hour, int min, java.math.BigDecimal sec, TimeZone timeZone, boolean isNegative) throws DateTimeException
year
- a value of year.month
- a value of month in the interval 0-11.day
- a value of day.hour
- a value of hour.min
- a value of minute.sec
- a value of second.timeZone
- a value of time zone. It may be null.isNegative
- indicates that it is negative dateTime.
DateTimeException
- thrown when parameters are invalid.public DateTime(java.lang.String dateTime) throws DateTimeException
dateTime
- dateTime string in XMLSchema format.
DateTimeException
- thrown when parameters are invalid.public DateTime(java.util.Date date)
java.util.Date
object.
The DateTime object is being created with TimeZone 00:00 and other parameters
got from a given java.util.Date object.
date
- a date value to set.Method Detail |
public void setParams(int year, int month, int day, int hour, int min, java.math.BigDecimal sec, TimeZone timeZone, boolean isNegative) throws DateTimeException
year
- a value of year.month
- a value of month in the interval 0-11.day
- a value of day.hour
- a value of hour.min
- a value of minute.sec
- a value of second.timeZone
- a value of time zone. It may be null.isNegative
- indicates that it is negative dateTime.
DateTimeException
- thrown when parameters are invalid.public void setParams(java.util.Date date)
java.util.Date
object.
The object is being created with TimeZone 00:00 and other parameters
got from a given java.util.Date object.
date
- a date value to set.public java.util.Date toJavaUtilDate()
public java.lang.String toString()
public int getYear()
public void setYear(int year)
year
- the given year to set to.public void setMonth(int month)
month
- the given month to set to.public void setDay(int day)
day
- the given day to set to.public void setHour(int hour)
hour
- the given hour to set to.public void setMinute(int min)
min
- the given minute to set to.public void setSecond(java.math.BigDecimal sec)
sec
- the given seconds value to set to.public int getMonth()
public int getDay()
public int getHour()
public int getMin()
public int getMinute()
public java.math.BigDecimal getSec()
public java.math.BigDecimal getSecond()
public boolean equals(java.lang.Object o)
DateTimeBase
values.
All these values must be equal, for example no recalculation to different time zone is done.
public int hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |