| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.quartz.impl.calendar.BaseCalendar
public class BaseCalendar
This implementation of the Calendar may be used (you don't have to) as a base class for more sophisticated one's. It merely implements the base functionality required by each Calendar.
Regarded as base functionality is the treatment of base calendars. Base calendar allow you to chain (stack) as much calendars as you may need. For example to exclude weekends you may use WeeklyCalendar. In order to exclude holidays as well you may define a WeeklyCalendar instance to be the base calendar for HolidayCalendar instance.
Calendar, 
Serialized Form| Field Summary | 
|---|
| Fields inherited from interface org.quartz.Calendar | 
|---|
| MONTH | 
| Constructor Summary | |
|---|---|
| BaseCalendar() | |
| BaseCalendar(Calendar baseCalendar) | |
| BaseCalendar(Calendar baseCalendar,
             TimeZone timeZone) | |
| BaseCalendar(TimeZone timeZone) | |
| Method Summary | |
|---|---|
|  Object | clone() | 
| protected  Calendar | createJavaCalendar()Build a with the current time. | 
| protected  Calendar | createJavaCalendar(long timeStamp)Build a for the given timeStamp. | 
|  Calendar | getBaseCalendar()Get the base calendar. | 
|  String | getDescription()Return the description given to the Calendarinstance by
 its creator (if any). | 
| protected  Calendar | getEndOfDayJavaCalendar(long timeInMillis)Returns the end of the given day . | 
|  long | getNextIncludedTime(long timeStamp)Determine the next time (in milliseconds) that is 'included' by the Calendar after the given time. | 
| protected  Calendar | getStartOfDayJavaCalendar(long timeInMillis)Returns the start of the given day as a . | 
|  TimeZone | getTimeZone()Returns the time zone for which this Calendarwill be
 resolved. | 
|  boolean | isTimeIncluded(long timeStamp)Check if date/time represented by timeStamp is included. | 
|  void | setBaseCalendar(Calendar baseCalendar)Set a new base calendar or remove the existing one | 
|  void | setDescription(String description)Set a description for the Calendarinstance - may be
 useful for remembering/displaying the purpose of the calendar, though
 the description has no meaning to Quartz. | 
|  void | setTimeZone(TimeZone timeZone)Sets the time zone for which this Calendarwill be resolved. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public BaseCalendar()
public BaseCalendar(Calendar baseCalendar)
public BaseCalendar(TimeZone timeZone)
timeZone - The time zone to use for this Calendar, null
 if TimeZone.getDefault()
public BaseCalendar(Calendar baseCalendar,
                    TimeZone timeZone)
timeZone - The time zone to use for this Calendar, null
 if TimeZone.getDefault()| Method Detail | 
|---|
public Object clone()
clone in interface Calendarclone in class Objectpublic void setBaseCalendar(Calendar baseCalendar)
Set a new base calendar or remove the existing one
setBaseCalendar in interface Calendarpublic Calendar getBaseCalendar()
Get the base calendar. Will be null, if not set.
getBaseCalendar in interface Calendarpublic String getDescription()
 Return the description given to the Calendar instance by
 its creator (if any).
 
getDescription in interface Calendarpublic void setDescription(String description)
 Set a description for the Calendar instance - may be
 useful for remembering/displaying the purpose of the calendar, though
 the description has no meaning to Quartz.
 
setDescription in interface Calendarpublic TimeZone getTimeZone()
Calendar will be
 resolved.
null if Calendar should
 use the TimeZone.getDefault()public void setTimeZone(TimeZone timeZone)
Calendar will be resolved.
timeZone - The time zone to use for this Calendar, null
 if TimeZone.getDefault()public boolean isTimeIncluded(long timeStamp)
Check if date/time represented by timeStamp is included. If included return true. The implementation of BaseCalendar simply calls the base calendars isTimeIncluded() method if base calendar is set.
isTimeIncluded in interface CalendarCalendar.isTimeIncluded(long)public long getNextIncludedTime(long timeStamp)
Determine the next time (in milliseconds) that is 'included' by the Calendar after the given time. Return the original value if timeStamp is included. Return 0 if all days are excluded.
getNextIncludedTime in interface CalendarCalendar.getNextIncludedTime(long)protected Calendar createJavaCalendar(long timeStamp)
CalendarBaseCalendar time zone if it
 is not null.
protected Calendar createJavaCalendar()
CalendarBaseCalendar time zone if
 it is not null.
protected Calendar getStartOfDayJavaCalendar(long timeInMillis)
CalendarBaseCalendar
 time zone into account if it is not null.
timeInMillis - A time containing the desired date for the
                     start-of-day time
Calendarprotected Calendar getEndOfDayJavaCalendar(long timeInMillis)
CalendarBaseCalendar
 time zone into account if it is not null.
timeInMillis - a time containing the desired date for the
                     end-of-day time.
Calendar| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||