return to;
}
@Override
public ListGridRecord copyValues(T from) {
ListGridRecord to = new ListGridRecord();
to.setAttribute(Field.ID, from.getId());
to.setAttribute(Field.JOB_NAME, from.getJobName());
to.setAttribute(Field.JOB_GROUP, from.getJobGroup());
to.setAttribute(Field.SUBJECT, from.getSubject().getName());
to.setAttribute(Field.SUBJECT_ID, from.getSubject().getId());
Configuration parameters = from.getParameters();
to.setAttribute(Field.PARAMETERS, parameters);
to.setAttribute(Field.OPERATION_NAME, from.getOperationName());
to.setAttribute(Field.OPERATION_DISPLAY_NAME, from.getOperationDisplayName());
to.setAttribute(Field.DESCRIPTION, from.getDescription());
to.setAttribute(Field.NEXT_FIRE_TIME, from.getNextFireTime());
to.setAttribute(Field.TIMEOUT, (parameters != null) ? parameters.getSimpleValue(
OperationDefinition.TIMEOUT_PARAM_NAME, null) : null);
JobTrigger jobTrigger = from.getJobTrigger();
Record jobTriggerRecord = new ListGridRecord();
jobTriggerRecord.setAttribute(Field.START_TIME, jobTrigger.getStartDate());
jobTriggerRecord.setAttribute(Field.REPEAT_INTERVAL, jobTrigger.getRepeatInterval());
jobTriggerRecord.setAttribute(Field.REPEAT_COUNT, jobTrigger.getRepeatCount());
jobTriggerRecord.setAttribute(Field.END_TIME, jobTrigger.getEndDate());
jobTriggerRecord.setAttribute(Field.CRON_EXPRESSION, jobTrigger.getCronExpression());
to.setAttribute("jobTrigger", jobTriggerRecord);
return to;
}