java.io.Serializable
RecurringDuration
public abstract class RecurringDurationBase
extends java.lang.Object
implements java.io.Serializable
This base class contains all the time fields (including the time zone ones) and also the facets period and duration
The validation of the time fields is done in the set methods and follows the ISO8601 Date and Time Format
RecurringDuration
,
Time
,
TimeInstant
,
TimePeriod
,
Serialized FormModifier | Constructor | Description |
---|---|---|
protected |
RecurringDurationBase() |
Deprecated.
No-arg constructor.
|
protected |
RecurringDurationBase(java.lang.String duration,
java.lang.String period) |
Deprecated.
returns a recurringDurationBase with the facets duration and period set
up
|
protected |
RecurringDurationBase(java.lang.String duration,
java.lang.String period,
short[] values) |
Deprecated.
returns a recurringDurationBase with the facets duration and period set
up but also the fields
|
protected |
RecurringDurationBase(TimeDuration duration,
TimeDuration period) |
Deprecated.
Returns a recurringDurationBase with the facets duration and period set.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equal(RecurringDurationBase reccD) |
Deprecated.
Returns true if the present instance of Recurring Duration Base is equal
to the parameter.
|
boolean |
equals(java.lang.Object object) |
Deprecated.
Override the java.lang.equals method
|
TimeDuration |
getDuration() |
Deprecated.
|
short |
getHour() |
Deprecated.
|
short |
getMilli() |
Deprecated.
|
short |
getMinute() |
Deprecated.
|
TimeDuration |
getPeriod() |
Deprecated.
|
short |
getSeconds() |
Deprecated.
|
short[] |
getValues() |
Deprecated.
returns an array of short with all the fields which describe a
RecurringDurationBase
|
short |
getZoneHour() |
Deprecated.
|
short |
getZoneMinute() |
Deprecated.
|
boolean |
isGreater(RecurringDurationBase reccD) |
Deprecated.
Returns true if the present instance of RecurringDurationBase is greater
than the parameter
|
boolean |
isNegative() |
Deprecated.
|
boolean |
isUTC() |
Deprecated.
return true if this recurring Duration type is UTC i.e if there is no time zone.
|
boolean |
isZoneNegative() |
Deprecated.
|
void |
setDuration(java.lang.String duration) |
Deprecated.
set the duration facet for this recurringDuration
|
void |
setDuration(TimeDuration duration) |
Deprecated.
set the duration facet for this recurringDuration
|
void |
setHour(short hour) |
Deprecated.
set the hour field for this recurringDuration
|
void |
setMinute(short minute) |
Deprecated.
set the minute field for this recurringDuration
|
void |
setNegative() |
Deprecated.
set the negative field to true
|
void |
setPeriod(java.lang.String period) |
Deprecated.
set the period facet for this recurringDuration
|
void |
setPeriod(TimeDuration period) |
Deprecated.
set the period facet for this recurringDuration
|
void |
setSecond(short second,
short millsecond) |
Deprecated.
set the second field for this recurringDuration
|
void |
setUTC() |
Deprecated.
set the UTC field to true
|
void |
setValues(short[] values) |
Deprecated.
set all the fields by reading the values in an array
|
void |
setZone(short hour,
short minute) |
Deprecated.
set the time zone fields for this recurringDuration
|
void |
setZoneNegative() |
Deprecated.
set the time zone negative field to true
|
protected RecurringDurationBase()
protected RecurringDurationBase(TimeDuration duration, TimeDuration period)
duration
- the TimeDuration representing the duration facetperiod
- the TimeDuration reprensenting the period facetprotected RecurringDurationBase(java.lang.String duration, java.lang.String period) throws java.lang.IllegalArgumentException
duration
- the String representing the duration facetperiod
- the String reprensenting the period facetjava.lang.IllegalArgumentException
- this exception is thrown when the parameter strings are not
corresponding to valid TimeDurationprotected RecurringDurationBase(java.lang.String duration, java.lang.String period, short[] values) throws javax.naming.OperationNotSupportedException
duration
- the String representing the duration facetperiod
- the String reprensenting the period facetvalues
- an array of shorts which contains the values of the fieldsjava.lang.IllegalArgumentException
- this exception is thrown when the values array is not of
length 6.javax.naming.OperationNotSupportedException
setValues(short[])
public void setPeriod(TimeDuration period) throws java.lang.UnsupportedOperationException
period
- the period to setjavax.naming.OperationNotSupportedException
- this exception is thrown when changing the value of the
period facet is not allowedjava.lang.UnsupportedOperationException
public void setPeriod(java.lang.String period) throws java.lang.UnsupportedOperationException
period
- the period to setjava.lang.UnsupportedOperationException
- this exception is thrown when changing the value of the
period facet is not allowedpublic void setDuration(TimeDuration duration) throws java.lang.UnsupportedOperationException
duration
- the period to setjava.lang.UnsupportedOperationException
- this exception is thrown when changing the value of the
duration facet is not allowedpublic void setDuration(java.lang.String duration) throws java.lang.UnsupportedOperationException
duration
- the period to setjava.lang.UnsupportedOperationException
- this exception is thrown when changing the value of the
duration facet is not allowedpublic void setHour(short hour) throws java.lang.UnsupportedOperationException
hour
- the hour to setjava.lang.UnsupportedOperationException
- this exception is thrown when changing the value of the hour
field is not allowedpublic void setMinute(short minute) throws java.lang.UnsupportedOperationException
minute
- the minute to setjava.lang.UnsupportedOperationException
- this exception is thrown when changing the value of the
minute field is not allowedpublic void setSecond(short second, short millsecond) throws java.lang.UnsupportedOperationException
second
- the second to setmillsecond
- the millisecond to setjava.lang.UnsupportedOperationException
- this exception is thrown when changing the value of the
second field is not allowedpublic void setZone(short hour, short minute) throws java.lang.UnsupportedOperationException
hour
- the time zone hour to setminute
- the time zone minute to setjava.lang.UnsupportedOperationException
- this exception is thrown when changing the value of the time
zone fields is not allowedpublic void setValues(short[] values) throws java.lang.UnsupportedOperationException
values
- an array of shorts with the values the array is supposed to be
of length 6 and ordered like that:
java.lang.UnsupportedOperationException
- this exception is thrown when changing the value of a time
related field is not allowedpublic void setNegative()
public void setZoneNegative() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
- this exception is thrown when changing the time zone fields
is not allowedpublic void setUTC()
public TimeDuration getPeriod()
public TimeDuration getDuration()
public short getHour()
public short getMinute()
public short getSeconds()
public short getMilli()
public short getZoneHour()
public short getZoneMinute()
public short[] getValues()
public boolean isUTC()
public boolean isNegative()
public boolean isZoneNegative()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
equal(org.exolab.castor.types.RecurringDurationBase)
public boolean equal(RecurringDurationBase reccD) throws ValidationException
The equals relation is the following : rd1 equals rd2 iff each field of rd1 is equal to the corresponding field of rd2
reccD
- the recurring duration to compare with the present instanceValidationException
public boolean isGreater(RecurringDurationBase reccD) throws ValidationException
Note : the order relation follows the W3C XML Schema draft i.e rd1 < rd2 iff rd2-rd1>0
reccD
- the recurring duration base to compare with the present
instanceValidationException
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com