|
Oracle Fusion Applications Java API Reference for Oracle Enterprise Scheduler Service 11g Release 1 (11.1.1.6) E20742-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.as.scheduler.ExplicitDate
public class ExplicitDate
Defines a date and time for use in a Schedule
or
Exclusion
.
While the Recurrence
defines a repetition rule,
instances of this class can be used for specifying explicit
date/times within Schedule
and Exclusion
definitions. ExplicitDate
can be constructed by using
appropriate fields defined in the RecurrenceFields
class.
The class provides the ability to define partial date
(when compared with java.util.Calendar
where the time
part may or may not be specified. Also all other fields such as
TimeZone
are not defined for this class. Such explicit
dates are required for defining partial dates to be included or
excluded from a Schedule
or an Exclusion
definition.
When the time is not specified in an ExplicitDate
, the
containing Schedule
and/or Exclusion
computes it appropriately.
Example:
Consider an example Schedule that
indicates every Monday plus on the 17th of August
2006
. Here the 17th of August 2006 is a partial
date since it does not have the time part specified. This should
typically be defined via an instance of
ExplicitDate
class.
RecurrenceFields
,
Recurrence
,
Schedule
,
Exclusion
,
ExclusionsDefinition
,
Serialized FormConstructor Summary | |
---|---|
ExplicitDate(RecurrenceFields.YEAR year,
RecurrenceFields.MONTH_OF_YEAR month,
RecurrenceFields.DAY_OF_MONTH day)
Constructs a new ExplicitDate with a year, a month and a day. |
|
ExplicitDate(RecurrenceFields.YEAR year,
RecurrenceFields.MONTH_OF_YEAR month,
RecurrenceFields.DAY_OF_MONTH day,
RecurrenceFields.TIME_OF_DAY time)
Constructs a new ExplicitDate with a year, month, day and a time. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Compares an object for equality with this ExplicitDate object. |
static ExplicitDate |
fromCalendar(java.util.Calendar cal,
boolean useTime)
Constructs a new instance of ExplicitDate from a
given Calendar instance. |
RecurrenceFields.DAY_OF_MONTH |
getDay()
Returns the day part of this ExplicitDate object. |
RecurrenceFields.MONTH_OF_YEAR |
getMonth()
Returns the month part of this ExplicitDate object. |
RecurrenceFields.TIME_OF_DAY |
getTime()
Returns the time part of this ExplicitDate object. |
RecurrenceFields.YEAR |
getYear()
Returns the year part of this ExplicitDate object. |
int |
hashCode()
Returns the hash code value of this ExplicitDate object. |
void |
setDay(RecurrenceFields.DAY_OF_MONTH day)
Sets the day of this ExplicitDate object to the given value. |
void |
setMonth(RecurrenceFields.MONTH_OF_YEAR month)
Sets the month of this ExplicitDate object to the given value. |
void |
setTime(RecurrenceFields.TIME_OF_DAY time)
Sets the time of this ExplicitDate object to the given value. |
void |
setYear(RecurrenceFields.YEAR year)
Sets the year of this ExplicitDate object to the given value. |
java.util.Calendar |
toCalendar()
Populates this instance of ExplicitDate into an instance
of Calendar. |
java.util.Calendar |
toCalendar(java.util.Calendar cal)
Populates this instance of ExplicitDate into the
given instance of Calendar. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExplicitDate(RecurrenceFields.YEAR year, RecurrenceFields.MONTH_OF_YEAR month, RecurrenceFields.DAY_OF_MONTH day)
null
year
- - the year part for this new instance.month
- - the month part for this new instance.day
- - the day part for this new instance.public ExplicitDate(RecurrenceFields.YEAR year, RecurrenceFields.MONTH_OF_YEAR month, RecurrenceFields.DAY_OF_MONTH day, RecurrenceFields.TIME_OF_DAY time)
year
- - the year part for this new instance.month
- - the month part for this new instance.day
- - the day part for this new instance.time
- - the time part for this new instance.Method Detail |
---|
public static ExplicitDate fromCalendar(java.util.Calendar cal, boolean useTime)
ExplicitDate
from a
given Calendar instance.
The new instance of ExplicitDate
has its year,
month, day parts extracted from the given Calender instance.
Optionally the hour, minute and second parts are also extracted
from the Calendar if specified.
All other fields such as time zone, milliseconds, etc of the Calendar instance are completely ignored.
cal
- - instance of Calendar from which a new instance of
ExplicitDate
will be constructed.useTime
- - flag indicating whether the hour, minute, and
second parts should also be consumed or not. If true, the new
instance of ExplicitDate
will have its time of day
part also set from the given Calendar instance. Otherwise only
year, month and day will be set.
ExplicitDate
.public java.util.Calendar toCalendar()
ExplicitDate
into an instance
of Calendar.
The method obtains an instance of Calendar via
Calendar.getInstance()
and sets only the fields
available in this instance of ExplicitDate
leaving
all other fields such as time zone of the Calendar unchanged to
their current values.
Therefore other fields of the Calendar will point to the values
as returned by the call to Calendar.getInstance()
method.
ExplicitDate
.public java.util.Calendar toCalendar(java.util.Calendar cal)
ExplicitDate
into the
given instance of Calendar.
The method sets all the fields available in this object into the given Calendar. Remaining fields are left unchanged. For example, if this object does not have TIME_OF_DAY set, then the time parts of the specified Calendar instance are left unchanged.
cal
- - the Calendar instance that will be modified with the
available fields of this object.
public RecurrenceFields.YEAR getYear()
public void setYear(RecurrenceFields.YEAR year)
year
- - the year to be set for this object.public RecurrenceFields.MONTH_OF_YEAR getMonth()
public void setMonth(RecurrenceFields.MONTH_OF_YEAR month)
month
- - the month to be set for this object.public RecurrenceFields.DAY_OF_MONTH getDay()
public void setDay(RecurrenceFields.DAY_OF_MONTH day)
day
- - the day to be set for this object.public RecurrenceFields.TIME_OF_DAY getTime()
public void setTime(RecurrenceFields.TIME_OF_DAY time)
time
- - the time to be set for this object.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- - the object to compare with this ExplicitDate.
public int hashCode()
hashCode
in class java.lang.Object
|
Oracle Fusion Applications Java API Reference for Oracle Enterprise Scheduler Service 11g Release 1 (11.1.1.6) E20742-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |