Class JobStepQuery

java.lang.Object
com.avoka.tm.query.JobStepQuery

public class JobStepQuery extends Object

Provides a job step value object query class.

Examples

Please find the job step query examples about list, get first and count below.

Job Step Query First Example

This Groovy example shows how to get first job step matching certain criteria

 import com.avoka.tm.query.*
 import com.avoka.tm.vo.*

 JobStep jobStep = new JobStepQuery()
      .setId(123L)
      .firstValue();

 JobStep jobStep2 = new JobStepQuery()
      .setJobActionId(123L)
      .firstValue();

 JobStep jobStep3 = new JobStepQuery()
      .setJobActionKey('ABCD123DEF4561234')
      .firstValue();

 // In JSON format
 String jobStepJson = new JobStepQuery()
     .setJobActionId(123L)
     .firstJson() 

Job Query Count Example

This Groovy example shows how to count all job steps matching certain criteria.

 import com.avoka.tm.query.*
 import com.avoka.tm.vo.*

 int jobStepCount = new JobStepQuery()
     .count() 
Since:
19.5.0
See Also:
  • Constructor Details

  • Method Details

    • setId

      public JobStepQuery setId(Long id)
      Set the job step id (PK) query parameter.
      Parameters:
      id - the job step id (PK) query parameter
      Returns:
      the job step query
    • setJobActionId

      public JobStepQuery setJobActionId(Long jobActionId)
      Set the job action id
      Parameters:
      jobActionId - the job action id query parameter
      Returns:
      the job step query
    • setJobActionKey

      public JobStepQuery setJobActionKey(String jobActionKey)
      Set the job action key
      Parameters:
      jobActionKey - the job action key query parameter
      Returns:
      the job step query
    • setFetchLimit

      public JobStepQuery setFetchLimit(int fetchLimit)
      Set the query fetch limit to limit the maximum number of records returned. The default query fetch limit is 100 records.
      Parameters:
      fetchLimit - the query fetch limit
      Returns:
      the job step query
    • addOrderByAsc

      public JobStepQuery addOrderByAsc(String orderProperty)
      Add the sort order by ascending to the query.
      Parameters:
      orderProperty - the property to sort by (required)
      Returns:
      the job step query
    • addOrderByDesc

      public JobStepQuery addOrderByDesc(String orderProperty)
      Add the sort order by descending to the query.
      Parameters:
      orderProperty - the property to sort by (required)
      Returns:
      the job step query
    • count

      public int count()
      Execute a select count query and return the total number of records selected by the query.
      Returns:
      the total number of records selected by the query
    • listValues

      public List<JobStep> listValues()
      Execute the job step query and return a list of Job value objects.
      Returns:
      execute the job step query and return a list of Job value objects
    • listJson

      public String listJson()
      Execute the query and return an job steps JSON array list.
      Returns:
      execute the query and return an job steps JSON array list
    • firstValue

      public JobStep firstValue()
      Execute the query and return the first job step value object for the query.
      Returns:
      execute the query and return the first job step value object for the query
    • firstJson

      public String firstJson()
      Execute the query and return the first job step JSON value.
      Returns:
      execute the query and return the first job step JSON value