com.sap.scheduler.api

Class CronEntry

java.lang.Object
  extended by com.sap.scheduler.api.CronEntry
All Implemented Interfaces:
Serializable

public class CronEntry
extends Object
implements Serializable

This class represents a cron entry

See Also:
Serialized Form

Constructor Summary
CronEntry(CronYearField years, CronMonthField months, CronDOMField dom, CronDOWField dow, CronHourField hours, CronMinuteField minutes)
          Constructs a cron entry object from given fields and the default time zone
CronEntry(CronYearField years, CronMonthField months, CronDOMField dom, CronDOWField dow, CronHourField hours, CronMinuteField minutes, TimeZone tz)
          Constructs a cron entry object from given fields and specified time zone
CronEntry(String cron_entry)
          Constructs a cron entry object from given cron entry with the default time zone
CronEntry(String cron_entry, TimeZone tz)
          Constructs a cron entry object from given cron entry and specified time zone
 
Method Summary
 boolean compareCronEntry(CronEntry entry)
          Compares a CronEntry with this.
 CronDOMField getDays_of_month()
          Getter method
 CronDOWField getDays_of_week()
          Getter method
 CronHourField getHours()
          Getter method
 CronMinuteField getMinutes()
          Getter method
 CronMonthField getMonths()
          Getter method
 TimeZone getTimeZone()
          Getter method
 CronYearField getYears()
          Getter method
 String persistableValue()
          Returns the entry as a DB persistable
protected  void setDays_of_month(CronDOMField days_of_month)
          Setter method
protected  void setDays_of_week(CronDOWField days_of_week)
          Setter method
protected  void setHours(CronHourField hours)
          Setter method
protected  void setMinutes(CronMinuteField minutes)
          Setter method
protected  void setMonths(CronMonthField months)
          Setter method
protected  void setYears(CronYearField years)
          Setter method
 String toString()
          Returns a string representation of the entry
protected  int[] validate(String entry)
          Validates a cron entry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CronEntry

public CronEntry(String cron_entry)
Constructs a cron entry object from given cron entry with the default time zone

Parameters:
cron_entry - the cron entry

CronEntry

public CronEntry(String cron_entry,
                 TimeZone tz)
Constructs a cron entry object from given cron entry and specified time zone

Parameters:
cron_entry - the cron entry
tz - the time zone

CronEntry

public CronEntry(CronYearField years,
                 CronMonthField months,
                 CronDOMField dom,
                 CronDOWField dow,
                 CronHourField hours,
                 CronMinuteField minutes)
Constructs a cron entry object from given fields and the default time zone

Parameters:
years - the years field
months - the months field
dom - the days of month field
dow - the days of week field
hours - the hours field
minutes - the minutes field

CronEntry

public CronEntry(CronYearField years,
                 CronMonthField months,
                 CronDOMField dom,
                 CronDOWField dow,
                 CronHourField hours,
                 CronMinuteField minutes,
                 TimeZone tz)
Constructs a cron entry object from given fields and specified time zone

Parameters:
years - the years field
months - the months field
dom - the days of month field
dow - the days of week field
hours - the hours field
minutes - the minutes field
tz - the specified time zone
Method Detail

validate

protected int[] validate(String entry)
Validates a cron entry

Parameters:
entry - the cron entry
Returns:
integer array with results from all the fields

getTimeZone

public TimeZone getTimeZone()
Getter method

Returns:
the entry time zone

setYears

protected void setYears(CronYearField years)
Setter method

Parameters:
years - the years field

setMonths

protected void setMonths(CronMonthField months)
Setter method

Parameters:
months - the months fiels

setDays_of_month

protected void setDays_of_month(CronDOMField days_of_month)
Setter method

Parameters:
days_of_month - the days of month field

setDays_of_week

protected void setDays_of_week(CronDOWField days_of_week)
Setter method

Parameters:
days_of_week - the days of week field

setHours

protected void setHours(CronHourField hours)
Setter method

Parameters:
hours - the hours field

setMinutes

protected void setMinutes(CronMinuteField minutes)
Setter method

Parameters:
minutes - the minutes field

getYears

public CronYearField getYears()
Getter method

Returns:
the years field

getMonths

public CronMonthField getMonths()
Getter method

Returns:
the months field

getDays_of_month

public CronDOMField getDays_of_month()
Getter method

Returns:
the days of month field

getDays_of_week

public CronDOWField getDays_of_week()
Getter method

Returns:
the days of week field

getHours

public CronHourField getHours()
Getter method

Returns:
the hours field

getMinutes

public CronMinuteField getMinutes()
Getter method

Returns:
the minutes field

persistableValue

public String persistableValue()
Returns the entry as a DB persistable

Returns:
the DB persistable entry

toString

public String toString()
Returns a string representation of the entry

Overrides:
toString in class Object
Returns:
the string representation

compareCronEntry

public boolean compareCronEntry(CronEntry entry)
Compares a CronEntry with this.

Parameters:
entry - the CronEntry to compare
Returns:
true if the CronEntry are equals in case of its members otherwise false.
Access Rights

This class can be accessed from:


SC DC
[sap.com] ENGFACADE [sap.com] tc/je/scheduler/api


Copyright 2010 SAP AG Complete Copyright Notice