org.activiti.engine.runtime

## Interface JobQuery

- All Superinterfaces:
    Query<JobQuery,Job>

      public interface JobQuery
      extends Query<JobQuery,Job>

  Allows programmatic querying of `Job`s.
  Author:
    Joram Barrez, Falko Menge

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `JobQuery` | `duedateHigherThan(Date date)` Only select jobs where the duedate is higher then the given date.
    `JobQuery` | `duedateHigherThen(Date date)` Deprecated.
    `JobQuery` | `duedateHigherThenOrEquals(Date date)` Deprecated.
    `JobQuery` | `duedateLowerThan(Date date)` Only select jobs where the duedate is lower than the given date.
    `JobQuery` | `duedateLowerThen(Date date)` Deprecated.
    `JobQuery` | `duedateLowerThenOrEquals(Date date)` Deprecated.
    `JobQuery` | `exceptionMessage(String exceptionMessage)` Only select jobs that failed due to an exception with the given message.
    `JobQuery` | `executable()` Only select jobs which are executable, ie.
    `JobQuery` | `executionId(String executionId)` Only select jobs which exist for the given execution
    `JobQuery` | `jobId(String jobId)` Only select jobs with the given id
    `JobQuery` | `jobTenantId(String tenantId)` Only select jobs that have the given tenant id.
    `JobQuery` | `jobTenantIdLike(String tenantIdLike)` Only select jobs with a tenant id like the given one.
    `JobQuery` | `jobWithoutTenantId()` Only select jobs that do not have a tenant id.
    `JobQuery` | `messages()` Only select jobs that are messages.
    `JobQuery` | `noRetriesLeft()` Only select jobs which have no retries left
    `JobQuery` | `orderByExecutionId()` Order by execution id (needs to be followed by `Query.asc()` or `Query.desc()`).
    `JobQuery` | `orderByJobDuedate()` Order by duedate (needs to be followed by `Query.asc()` or `Query.desc()`).
    `JobQuery` | `orderByJobId()` Order by job id (needs to be followed by `Query.asc()` or `Query.desc()`).
    `JobQuery` | `orderByJobRetries()` Order by retries (needs to be followed by `Query.asc()` or `Query.desc()`).
    `JobQuery` | `orderByProcessInstanceId()` Order by process instance id (needs to be followed by `Query.asc()` or `Query.desc()`).
    `JobQuery` | `orderByTenantId()` Order by tenant id (needs to be followed by `Query.asc()` or `Query.desc()`).
    `JobQuery` | `processDefinitionId(String processDefinitionid)` Only select jobs which exist for the given process definition id
    `JobQuery` | `processInstanceId(String processInstanceId)` Only select jobs which exist for the given process instance.
    `JobQuery` | `timers()` Only select jobs that are timers.
    `JobQuery` | `withException()` Only select jobs that failed due to an exception.
    `JobQuery` | `withRetriesLeft()` Only select jobs which have retries left

    - ### Methods inherited from interface org.activiti.engine.query.Query

      `asc, count, desc, list, listPage, singleResult`

- - ### Method Detail

    - #### jobId

          JobQuery jobId(String jobId)

      Only select jobs with the given id

    - #### processInstanceId

          JobQuery processInstanceId(String processInstanceId)

      Only select jobs which exist for the given process instance.

    - #### executionId

          JobQuery executionId(String executionId)

      Only select jobs which exist for the given execution

    - #### processDefinitionId

          JobQuery processDefinitionId(String processDefinitionid)

      Only select jobs which exist for the given process definition id

    - #### withRetriesLeft

          JobQuery withRetriesLeft()

      Only select jobs which have retries left

    - #### noRetriesLeft

          JobQuery noRetriesLeft()

      Only select jobs which have no retries left

    - #### executable

          JobQuery executable()

      Only select jobs which are executable, ie. retries > 0 and duedate is null or duedate is in the past

    - #### timers

          JobQuery timers()

      Only select jobs that are timers. Cannot be used together with `messages()`

    - #### messages

          JobQuery messages()

      Only select jobs that are messages. Cannot be used together with `timers()`

    - #### duedateLowerThan

          JobQuery duedateLowerThan(Date date)

      Only select jobs where the duedate is lower than the given date.

    - #### duedateHigherThan

          JobQuery duedateHigherThan(Date date)

      Only select jobs where the duedate is higher then the given date.

    - #### duedateLowerThen

          JobQuery duedateLowerThen(Date date)

      Deprecated.
      Only select jobs where the duedate is lower then the given date.

    - #### duedateLowerThenOrEquals

          JobQuery duedateLowerThenOrEquals(Date date)

      Deprecated.
      Only select jobs where the duedate is lower then or equals the given date.

    - #### duedateHigherThen

          JobQuery duedateHigherThen(Date date)

      Deprecated.
      Only select jobs where the duedate is higher then the given date.

    - #### duedateHigherThenOrEquals

          JobQuery duedateHigherThenOrEquals(Date date)

      Deprecated.
      Only select jobs where the duedate is higher then or equals the given date.

    - #### withException

          JobQuery withException()

      Only select jobs that failed due to an exception.

    - #### exceptionMessage

          JobQuery exceptionMessage(String exceptionMessage)

      Only select jobs that failed due to an exception with the given message.

    - #### jobTenantId

          JobQuery jobTenantId(String tenantId)

      Only select jobs that have the given tenant id.

    - #### jobTenantIdLike

          JobQuery jobTenantIdLike(String tenantIdLike)

      Only select jobs with a tenant id like the given one.

    - #### jobWithoutTenantId

          JobQuery jobWithoutTenantId()

      Only select jobs that do not have a tenant id.

    - #### orderByJobId

          JobQuery orderByJobId()

      Order by job id (needs to be followed by `Query.asc()` or `Query.desc()`).

    - #### orderByJobDuedate

          JobQuery orderByJobDuedate()

      Order by duedate (needs to be followed by `Query.asc()` or `Query.desc()`).

    - #### orderByJobRetries

          JobQuery orderByJobRetries()

      Order by retries (needs to be followed by `Query.asc()` or `Query.desc()`).

    - #### orderByProcessInstanceId

          JobQuery orderByProcessInstanceId()

      Order by process instance id (needs to be followed by `Query.asc()` or `Query.desc()`).

    - #### orderByExecutionId

          JobQuery orderByExecutionId()

      Order by execution id (needs to be followed by `Query.asc()` or `Query.desc()`).

    - #### orderByTenantId

          JobQuery orderByTenantId()

      Order by tenant id (needs to be followed by `Query.asc()` or `Query.desc()`).

Copyright © 2016 Alfresco. All rights reserved.