Package com.avoka.tm.query
Class BillQuery
java.lang.Object
com.avoka.tm.query.BillQuery
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddOrderByAsc
(String orderProperty) Add the sort order by ascending to the query.addOrderByDesc
(String orderProperty) Add the sort order by descending to the query.int
count()
Execute a select count query and return the total number of records selected by the query.Execute the query and return the first bill JSON value.Execute the query and return the first bill value object for the query.listJson()
Execute the query and return a bill JSON array list.Execute the bill query and return a list of bill value objects.setBillingScore
(String billingScore) Set the billing score query parameter.setBillType
(String billType) Set the bill type query parameter.setClientCode
(String clientCode) Set the client code query parameter.setFetchLimit
(int fetchLimit) Set the query fetch limit to limit the maximum number of records returned.setFormCode
(String formCode) Set the form code query parameter.setFormVersion
(String formVersion) Set the form version query parameter.Set the bill id (PK) query parameter.setJourneyId
(Number journeyId) Set the journey id query parameter.setSubmissionId
(Number submissionId) Set the submission id query parameter.setSvcName
(String svcName) Set the service name query parameter.setSvcVersion
(String svcVersion) Set the service version query parameter.
-
Constructor Details
-
BillQuery
-
-
Method Details
-
setId
Set the bill id (PK) query parameter.- Parameters:
id
- the bill id (PK) query parameter- Returns:
- the bill query
-
setBillType
Set the bill type query parameter.- Parameters:
billType
- the bill type query parameter- Returns:
- the bill query
-
setBillingScore
Set the billing score query parameter.- Parameters:
billingScore
- the billing score query parameter- Returns:
- the bill query
-
setClientCode
Set the client code query parameter.- Parameters:
clientCode
- the client code query parameter- Returns:
- the bill query
-
setFormCode
Set the form code query parameter.- Parameters:
formCode
- the form code query parameter- Returns:
- the bill query
-
setFormVersion
Set the form version query parameter.- Parameters:
formVersion
- the form version query parameter- Returns:
- the bill query
-
setJourneyId
Set the journey id query parameter.- Parameters:
journeyId
- the journey id query parameter- Returns:
- the bill query
-
setSvcName
Set the service name query parameter.- Parameters:
svcName
- the service name query parameter- Returns:
- the bill query
-
setSvcVersion
Set the service version query parameter.- Parameters:
svcVersion
- the service version query parameter- Returns:
- the bill query
-
setSubmissionId
Set the submission id query parameter.- Parameters:
submissionId
- the submission id query parameter- Returns:
- the bill query
-
setFetchLimit
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
Add the sort order by ascending to the query.- Parameters:
orderProperty
- the property to sort by (required)- Returns:
- the bill query
-
addOrderByDesc
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
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
Execute the query and return a bill JSON array list.- Returns:
- execute the query and return a bill JSON array list
-
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
Execute the query and return the first bill JSON value.- Returns:
- execute the query and return the first bill JSON value
-