Class GatewayTaskRecord
- java.lang.Object
-
- simpleorm.dataset.SRecordInstance
-
- com.inductiveautomation.ignition.gateway.localdb.persistence.PersistentRecord
-
- com.inductiveautomation.ignition.gateway.tasks.GatewayTaskRecord
-
- All Implemented Interfaces:
java.io.Serializable
public class GatewayTaskRecord extends PersistentRecord
This record holds the definition of a task. A task might be scheduled for a single execution, or might execute repeatedly.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class simpleorm.dataset.SRecordInstance
SRecordInstance.BrokenOptimisticLockException
-
-
Field Summary
Fields Modifier and Type Field Description static IdentityField
ID
static BooleanField
IS_FORCED
static BooleanField
IS_SUSPENDED
static RecordMeta<GatewayTaskRecord>
META
static EnumField<ScheduleMode>
MODE
static StringField
NAME
static StringField
OWNERID
static LongField
PARENT_ID
static StringField
SCHEDULE
static StringField
TASKID
static StringField
Type
-
Fields inherited from class com.inductiveautomation.ignition.gateway.localdb.persistence.PersistentRecord
DEFAULT_VALUE, FORM_META_KEY, INDEXED, UNIQUE
-
-
Constructor Summary
Constructors Constructor Description GatewayTaskRecord()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Long
getId()
RecordMeta<GatewayTaskRecord>
getMeta()
This must be defined in every user record's definition to access the SRecord which provides the meta data for this instance.ScheduleMode
getMode()
java.lang.String
getName()
java.lang.String
getOwnerId()
java.lang.Long
getParentId()
Returns null if this record does not have a parent id.java.lang.String
getSchedule()
The meaning of this string is relative to the mode.java.lang.String
getTaskId()
java.lang.String
getType()
boolean
isForced()
Returns true if the user has hit the "run now" link on the page, forcing a scheduled task to run immediately.boolean
isSuspended()
Returns true if the this task is suspended, meaning that the scheduled task will not be executed at its schedule time.void
setForced(boolean isForced)
void
setMode(ScheduleMode mode)
void
setName(java.lang.String value)
void
setOwnerId(java.lang.String value)
void
setParentId(java.lang.Long parentId)
Use when a GatewayTaskRecord is duplicated, and the duplicate is executed immediately.void
setSchedule(java.lang.String value)
void
setSuspended(boolean isSuspended)
Set to true to suspend this task, meaning that the scheduled task will not be executed at its scheduled time.void
setTaskId(java.lang.String value)
-
Methods inherited from class com.inductiveautomation.ignition.gateway.localdb.persistence.PersistentRecord
getBoolean, getDoubleObj, getIntObj, getLongObj, getString, installDefaultValues
-
Methods inherited from class simpleorm.dataset.SRecordInstance
allFields, assertNewRow, assertNotNewRow, defineInitialValue, deleteRecord, doQueryRecord, doValidateRecord, equals, findReference, findReference, findReference, findReference, getBigDecimal, getBytes, getDataSet, getDate, getDouble, getEnum, getInitialValue, getInt, getLogger, getLong, getObject, getRawArrayValue, getReferenceNoQuery, getTime, getTimestamp, hashCode, isAttached, isDeleted, isDirty, isDirty, isEmpty, isNewRow, isNotDestroyed, isNull, isReadOnly, isValid, onQueryRecord, onValidateField, onValidateRecord, setBigDecimal, setBoolean, setBytes, setDate, setDirty, setDouble, setEmpty, setEnum, setInt, setLong, setNewRow, setNull, setObject, setObject, setRawArrayValue, setReadOnly, setReference, setString, setTime, setTimestamp, toString, validatePrimaryKeys, wasInCache
-
-
-
-
Field Detail
-
META
public static final RecordMeta<GatewayTaskRecord> META
-
ID
public static final IdentityField ID
-
NAME
public static final StringField NAME
-
Type
public static final StringField Type
-
OWNERID
public static final StringField OWNERID
-
TASKID
public static final StringField TASKID
-
IS_FORCED
public static final BooleanField IS_FORCED
-
IS_SUSPENDED
public static final BooleanField IS_SUSPENDED
-
MODE
public static final EnumField<ScheduleMode> MODE
-
SCHEDULE
public static final StringField SCHEDULE
-
PARENT_ID
public static final LongField PARENT_ID
-
-
Method Detail
-
getMeta
public RecordMeta<GatewayTaskRecord> getMeta()
Description copied from class:SRecordInstance
This must be defined in every user record's definition to access the SRecord which provides the meta data for this instance. It is normally defined as:-SRecord getMeta() { return meta; };
The actual
meta
variable is thus not Serialized, but it would not be anyway as it is usually static.- Specified by:
getMeta
in classPersistentRecord
-
getId
public java.lang.Long getId()
-
getType
public java.lang.String getType()
-
getName
public java.lang.String getName()
-
setName
public void setName(java.lang.String value)
-
getOwnerId
public java.lang.String getOwnerId()
-
setOwnerId
public void setOwnerId(java.lang.String value)
-
getTaskId
public java.lang.String getTaskId()
-
setTaskId
public void setTaskId(java.lang.String value)
-
getMode
public ScheduleMode getMode()
-
setMode
public void setMode(ScheduleMode mode)
-
getSchedule
public java.lang.String getSchedule()
The meaning of this string is relative to the mode. If mode=single, it is a date. If mode=repeat, it is a chron string. *
-
setSchedule
public void setSchedule(java.lang.String value)
-
getParentId
public java.lang.Long getParentId()
Returns null if this record does not have a parent id. Use when a GatewayTaskRecord is duplicated, and the duplicate is executed immediately. Modules can use this field to look up the original id in case they have their own records tied to the original record.
-
setParentId
public void setParentId(java.lang.Long parentId)
Use when a GatewayTaskRecord is duplicated, and the duplicate is executed immediately. Modules can use this field to look up the original id in case they have their own records tied to the original record.
-
isForced
public boolean isForced()
Returns true if the user has hit the "run now" link on the page, forcing a scheduled task to run immediately.
-
setForced
public void setForced(boolean isForced)
-
isSuspended
public boolean isSuspended()
Returns true if the this task is suspended, meaning that the scheduled task will not be executed at its schedule time.
-
setSuspended
public void setSuspended(boolean isSuspended)
Set to true to suspend this task, meaning that the scheduled task will not be executed at its scheduled time.
-
-