Class ExecutionModel
java.lang.Object
com.gentics.contentnode.rest.model.scheduler.ExecutionModel
- All Implemented Interfaces:
Serializable
Model for a scheduler exection.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static ExecutionModel
fromDbResult
(String idField, ResultSet rs) Create a model instance from a database result set.static ExecutionModel
Create a model instance from a database result set.static ExecutionModel
Create a model instance from a database result set with the corresponding schedule.DurationEnd timegetId()
Execution IDgetLog()
Command outputResultThe corresponding scheduleSchedule IDStart timeint
hashCode()
boolean
Check whether the execution is still runningsetDuration
(Integer duration) Set the durationsetEndTime
(Integer endTime) Set the end timeSet the execution IDSet the command outputSet the resultsetSchedule
(ScheduleModel schedule) Set the schedulesetScheduleId
(Integer scheduleId) Set the schedule IDsetStartTime
(Integer startTime) Set the start time
-
Constructor Details
-
ExecutionModel
public ExecutionModel()
-
-
Method Details
-
fromDbResult
Create a model instance from a database result set.This method assumes that the cursor is correctly set at the element to convert.
- Parameters:
rs
- The database result- Returns:
- An execution model created from the database result
- Throws:
SQLException
- When the result set can not be read
-
fromDbResult
Create a model instance from a database result set.This method assumes that the cursor is correctly set at the element to convert.
The name of the ID field can be specified if the result is from a JOIN statement where
id
alone is ambiguous.- Parameters:
idField
- The name of the execution ID field.rs
- The database result- Returns:
- An execution model created from the database result
- Throws:
SQLException
- When the result set can not be read
-
fromDbResultWithSchedule
Create a model instance from a database result set with the corresponding schedule.This method assumes that the cursor is correctly set at the element to convert.
- Parameters:
rs
- The database result- Returns:
- An execution model created from the database result with the corresponding schedule.
- Throws:
SQLException
- When the result set can not be read
-
getId
Execution ID- Returns:
- The execution ID
-
setId
Set the execution ID- Parameters:
id
- The execution ID- Returns:
- fluent API
-
getScheduleId
Schedule ID- Returns:
- The schedule ID
-
setScheduleId
Set the schedule ID- Parameters:
scheduleId
- The schedule ID- Returns:
- fluent API
-
getSchedule
The corresponding schedule- Returns:
- schedule
-
setSchedule
Set the schedule- Parameters:
schedule
- The schedule- Returns:
- fluent API
-
getStartTime
Start time- Returns:
- The start time
-
setStartTime
Set the start time- Parameters:
startTime
- The start time- Returns:
- fluent API
-
getEndTime
End time- Returns:
- The end time
-
setEndTime
Set the end time- Parameters:
endTime
- The end time- Returns:
- fluent API
-
getDuration
Duration- Returns:
- The duration
-
setDuration
Set the duration- Parameters:
duration
- The duration- Returns:
- fluent API
-
getResult
Result- Returns:
- The result
-
setResult
Set the result- Parameters:
result
- The result- Returns:
- fluent API
-
getLog
Command output- Returns:
- The command output
-
setLog
Set the command output- Parameters:
log
- The command output- Returns:
- fluent API
-
isRunning
public boolean isRunning()Check whether the execution is still running- Returns:
- true if the execution is running
-
equals
-
hashCode
public int hashCode()
-