public class Schedule extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DAILY |
static int |
DAYS_PER_WEEK |
String |
DEFAULT_DATE_FORMAT
Default TODO Move to constants or properties
|
static int |
HOURS_PER_DAY |
static int |
MILLISECONDS_PER_SECOND
Constants
|
static int |
MINUTES_PER_HOUR |
static int |
SECONDS_PER_MINUTE |
static int |
WEEKLY |
Constructor and Description |
---|
Schedule()
Public no-arg constructor.
|
Schedule(Date startTime,
long repeatInterval)
Public constructor
|
Schedule(String name,
String description,
Date startTime,
long repeatInterval)
Public constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getDateFormat()
Get the date format used to set the start time.
|
String |
getDescription()
Gets the description of the schedule.
|
Integer |
getId()
Gets the identifier of the schedule.
|
String |
getName()
Gets the name of the schedule.
|
long |
getRepeatInterval()
Gets the number of seconds until task is executed again.
|
Boolean |
getStartOnStartup()
Gets the flag that indicates whether we start on scheduler startup.
|
Date |
getStartTime()
Get the start time for when the task should be executed.
|
void |
setDateFormat(String dateFormat)
Sets the date format used to set the start time.
|
void |
setDescription(String description)
Sets the description of the schedule.
|
void |
setId(Integer id)
Sets the identifier of the schedule.
|
void |
setName(String name)
Sets the name of the schedule.
|
void |
setRepeatInterval(long repeatInterval)
Sets the number of seconds until task is executed again.
|
void |
setStartOnStartup(Boolean startOnStartup)
Sets the flag that indicates whether we start on scheduler startup.
|
void |
setStartTime(Date startTime)
Set the start time for when the task should be executed.
|
public final String DEFAULT_DATE_FORMAT
public static final int MILLISECONDS_PER_SECOND
public static final int SECONDS_PER_MINUTE
public static final int MINUTES_PER_HOUR
public static final int HOURS_PER_DAY
public static final int DAYS_PER_WEEK
public static final int DAILY
public static final int WEEKLY
public Schedule()
public Schedule(Date startTime, long repeatInterval)
startTime
- Date for when to start the task (does not need to be in the future if the
interval is specified).repeatInterval
- interval time in seconds to wait between executing task (<= 0 indicates
that it should only be run once)public Schedule(String name, String description, Date startTime, long repeatInterval)
name
- description
- startTime
- Date for when to start the task (does not need to be in the future if the
interval is specified).repeatInterval
- interval time in seconds to wait between executing task (<= 0 indicates
that it should only be run once)public Integer getId()
public void setId(Integer id)
id
- the identifier of the schedulepublic String getName()
public void setName(String name)
name
- the name of the schedulepublic String getDescription()
public void setDescription(String description)
description
- the description of the schedulepublic Date getStartTime()
public void setStartTime(Date startTime)
startTime
- start time for the taskpublic long getRepeatInterval()
public void setRepeatInterval(long repeatInterval)
repeatInterval
- public String getDateFormat()
public void setDateFormat(String dateFormat)
public Boolean getStartOnStartup()
public void setStartOnStartup(Boolean startOnStartup)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.