Class BillQuery

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

public class BillQuery extends Object

Provides a Bill value object query class.

Examples

Please find the bill query examples of listValues and listJson below.

Bill Query List Example

This Groovy example shows how to list bills sorted by name, with the result set limited to a maximum of 50 records.

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

 List<Bill> bills = new BillQuery()
     .addOrderByAsc("billingScore")
     .setFetchLimit(50)
     .listValues()

 // In JSON format
 String billsJson = new BillQuery()
     .addOrderByAsc("billingScore")
     .setFetchLimit(50)
     .listJson()  

Bill Query First Example

This Groovy example shows how to get first bill matching certain criteria.

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

 Bill bill = new BillQuery()
     .setId(1L)
     .firstValue()

 //By journey id criteria
 Bill bill = new BillQuery()
      .setJourneyId(1)
      .firstValue() 

Bill Query Count Example

This Groovy example shows how to count all bills.

 import com.avoka.tm.query.*

 int billCount = new BillQuery()
     .count()  
Since:
24.10.0
See Also:
  • Constructor Details

  • Method Details

    • setId

      public BillQuery setId(Long id)
      Set the bill id (PK) query parameter.
      Parameters:
      id - the bill id (PK) query parameter
      Returns:
      the bill query
    • setBillType

      public BillQuery setBillType(String billType)
      Set the bill type query parameter.
      Parameters:
      billType - the bill type query parameter
      Returns:
      the bill query
    • setBillingScore

      public BillQuery setBillingScore(String billingScore)
      Set the billing score query parameter.
      Parameters:
      billingScore - the billing score query parameter
      Returns:
      the bill query
    • setClientCode

      public BillQuery setClientCode(String clientCode)
      Set the client code query parameter.
      Parameters:
      clientCode - the client code query parameter
      Returns:
      the bill query
    • setFormCode

      public BillQuery setFormCode(String formCode)
      Set the form code query parameter.
      Parameters:
      formCode - the form code query parameter
      Returns:
      the bill query
    • setFormVersion

      public BillQuery setFormVersion(String formVersion)
      Set the form version query parameter.
      Parameters:
      formVersion - the form version query parameter
      Returns:
      the bill query
    • setJourneyId

      public BillQuery setJourneyId(Number journeyId)
      Set the journey id query parameter.
      Parameters:
      journeyId - the journey id query parameter
      Returns:
      the bill query
    • setSvcName

      public BillQuery setSvcName(String svcName)
      Set the service name query parameter.
      Parameters:
      svcName - the service name query parameter
      Returns:
      the bill query
    • setSvcVersion

      public BillQuery setSvcVersion(String svcVersion)
      Set the service version query parameter.
      Parameters:
      svcVersion - the service version query parameter
      Returns:
      the bill query
    • setSubmissionId

      public BillQuery setSubmissionId(Number submissionId)
      Set the submission id query parameter.
      Parameters:
      submissionId - the submission id query parameter
      Returns:
      the bill query
    • setFetchLimit

      public BillQuery 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 bill query
    • addOrderByAsc

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

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

      public String listJson()
      Execute the query and return a bill JSON array list.
      Returns:
      execute the query and return a bill JSON array list
    • firstValue

      public Bill firstValue()
      Execute the query and return the first bill value object for the query.
      Returns:
      execute the query and return the first bill value object for the query
    • firstJson

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