com.sap.scheduler.api

Class CronField

java.lang.Object
  extended by com.sap.scheduler.api.CronField
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CronDOMField, CronDOWField, CronHourField, CronMinuteField, CronMonthField, CronYearField

public abstract class CronField
extends Object
implements Serializable

This class is the base cron field class

See Also:
Serialized Form

Field Summary
static int FIELD_HOUR
           
static int FIELD_MINUTE
           
static int FIELD_MONTH
           
static int FIELD_MONTH_DAY
           
protected static int FIELD_OK
           
static int FIELD_WEEK_DAY
           
static int FIELD_YEAR
           
protected static com.sap.engine.lib.util.HashMapIntObject fieldCodesToErrMsgs
           
protected  int fldCode
           
static int INFINITY
           
protected static int INVALID_FIELD_CODE
           
protected  String strEntry
           
 
Constructor Summary
protected CronField(int fieldCode, int singleValue)
          Constructs and validates a cron field from given single value
protected CronField(int fieldCode, int start, int end)
          Constructs and validates a cron field from given value range, e.g.
protected CronField(int fieldCode, int start, int end, int step)
          Constructs and validates a cron field from given value range and step, e.g.
protected CronField(int fieldCode, String str)
          Constructs and validates a cron field from given cron
 
Method Summary
 int getMaxValue()
          Getter method
protected static int getMaxValue(int fieldCode)
          Getter method
 int getMinValue()
          Getter method
protected static int getMinValue(int fieldCode)
          Getter method
 String persistableValue()
          Returns the cron field a DB persistable
 String toString()
          Returns a string representation of the cron field
protected static int validate(String field, int fieldCode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INFINITY

public static final int INFINITY
See Also:
Constant Field Values

strEntry

protected String strEntry

fldCode

protected int fldCode

FIELD_OK

protected static int FIELD_OK

FIELD_YEAR

public static final int FIELD_YEAR
See Also:
Constant Field Values

FIELD_MONTH

public static final int FIELD_MONTH
See Also:
Constant Field Values

FIELD_MONTH_DAY

public static final int FIELD_MONTH_DAY
See Also:
Constant Field Values

FIELD_WEEK_DAY

public static final int FIELD_WEEK_DAY
See Also:
Constant Field Values

FIELD_HOUR

public static final int FIELD_HOUR
See Also:
Constant Field Values

FIELD_MINUTE

public static final int FIELD_MINUTE
See Also:
Constant Field Values

INVALID_FIELD_CODE

protected static final int INVALID_FIELD_CODE
See Also:
Constant Field Values

fieldCodesToErrMsgs

protected static final com.sap.engine.lib.util.HashMapIntObject fieldCodesToErrMsgs
Constructor Detail

CronField

protected CronField(int fieldCode,
                    String str)
Constructs and validates a cron field from given cron

Parameters:
fieldCode - the field type code
str - the cron

CronField

protected CronField(int fieldCode,
                    int singleValue)
Constructs and validates a cron field from given single value

Parameters:
fieldCode - the field type code
singleValue - the single value

CronField

protected CronField(int fieldCode,
                    int start,
                    int end)
Constructs and validates a cron field from given value range, e.g. [start - end]

Parameters:
fieldCode - the field type code
start - the start value
end - the end value

CronField

protected CronField(int fieldCode,
                    int start,
                    int end,
                    int step)
Constructs and validates a cron field from given value range and step, e.g. [start - end]/step

Parameters:
fieldCode - the field type code
start - the start value
end - the end value
step - the step
Method Detail

validate

protected static int validate(String field,
                              int fieldCode)

getMinValue

public int getMinValue()
Getter method

Returns:
the minimal value of the set's domain

getMaxValue

public int getMaxValue()
Getter method

Returns:
the maximal value of the set's domain

getMinValue

protected static int getMinValue(int fieldCode)
Getter method

Parameters:
fieldCode - the field type code
Returns:
the minimal value of the specified field type

getMaxValue

protected static int getMaxValue(int fieldCode)
Getter method

Parameters:
fieldCode - the field type code
Returns:
the maximal value of the specified field type

toString

public String toString()
Returns a string representation of the cron field

Overrides:
toString in class Object
Returns:
the string representation

persistableValue

public String persistableValue()
Returns the cron field a DB persistable

Returns:
the DB persistable cron field


Copyright 2009 SAP AG Complete Copyright Notice