Class JobActionQuery


  • public class JobActionQuery
    extends Object

    Provides a job action value object query class.

    Examples

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

    Job Action Query First Example

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

     import com.avoka.tm.query.*
     import com.avoka.tm.vo.*
    
     JobAction jobAction = new JobActionQuery()
          .setId(123L)
          .firstValue();
    
     // In JSON format
     String jobActionJson = new JobActionQuery()
          .setJobActionKey('1234abcd5678efgh')
          .firstJson();
    Since:
    19.5.0
    See Also:
    JobAction
    • Method Detail

      • setId

        public JobActionQuery setId​(Long id)
        Set the job action id (PK) query parameter.
        Parameters:
        id - the job action id (PK) query parameter
        Returns:
        the job action query
      • setJobActionKey

        public JobActionQuery setJobActionKey​(String jobActionKey)
        Set the job action key query parameter.
        Parameters:
        jobActionKey - the job action key query parameter
        Returns:
        the job action query
      • setFetchLimit

        public JobActionQuery 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 action query
      • addOrderByAsc

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

        public JobActionQuery addOrderByDesc​(String orderProperty)
        Add the sort order by descending to the query.
        Parameters:
        orderProperty - the property to sort by (required)
        Returns:
        the job action 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<JobAction> listValues()
        Execute the job action query and return a list of JobAction value objects.
        Returns:
        execute the job action query and return a list of JobAction value objects
      • listJson

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

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

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