Package com.avoka.tm.query
Class TxnHistoryQuery
java.lang.Object
com.avoka.tm.query.TxnHistoryQuery
Provides a Transaction History Query class.
Examples
Please find the transaction history query examples below.
Tracing Code Query
The query below returns a single transaction history record for the given tracking code.
import com.avoka.tm.query.* Map<String, Object> row = new TxnHistoryQuery() .setTrackingCode("L6THD27") .firstRow()
Completed Transactions CSV Export
The query below returns a CSV export of all the transaction history records for the given form code, form version number and completed status between the given date period.
import com.avoka.tm.query.* import org.joda.time.LocalDate Date startDate = new LocalDate().minusMonths(1).toDate() Date endDate = new LocalDate().minusDays(1).toDate() String csvExport = new TxnHistoryQuery() .setFormCode("Home Loan") .setVersionNumber("2.0") .setStartDate(startDate) .setFetchLimit(10000) .listCsv()
- Since:
- 17.10.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The startDate and endDate filter time type. -
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.firstRow()
Execute the query and return the first transaction history row for the query.listCsv()
Execute the query and return an transaction history rows in CSV (Comma Separated Value) format list.listJson()
Execute the query and return an transaction history rows JSON array list.listRows()
Execute the transaction history query and return a list of row map objects.setAbandonFormStatus
(String abandonFormStatus) setClientCode
(String clientCode) setDeviceType
(String deviceType) setEndDate
(Date endDate) setFetchLimit
(int fetchLimit) Set the query fetch limit to limit the maximum number of records returned.setFormAbandonType
(String formAbandonType) setFormCode
(String formCode) setFormStatus
(String formStatus) setJobName
(String jobName) setMilestone
(String milestone) setPortalName
(String portalName) setStartDate
(Date startDate) setTime
(TxnHistoryQuery.Time time) setTrackingCode
(String trackingCode) setTxnRefNumber
(String transRefNumber) setVersionNumber
(String versionNumber)
-
Constructor Details
-
TxnHistoryQuery
-
-
Method Details
-
setPortalName
- Parameters:
portalName
- the portalName to set- Returns:
- the transaction history query
-
setClientCode
- Parameters:
clientCode
- the clientCode to set- Returns:
- the transaction history query
-
setFormCode
- Parameters:
formCode
- the formCode to set- Returns:
- the transaction history query
-
setVersionNumber
- Parameters:
versionNumber
- the versionNumber to set- Returns:
- the transaction history query
-
setJobName
- Parameters:
jobName
- the jobName to set- Returns:
- the transaction history query
-
setFormStatus
- Parameters:
formStatus
- the formStatus to set- Returns:
- the transaction history query
-
setAbandonFormStatus
- Parameters:
abandonFormStatus
- the abandonFormStatus to set- Returns:
- the transaction history query
-
setFormAbandonType
- Parameters:
formAbandonType
- the formAbandonType to set- Returns:
- the transaction history query
-
setMilestone
- Parameters:
milestone
- the transaction milestone to set- Returns:
- the transaction history query
- Since:
- 17.10.0
-
setTxnRefNumber
- Parameters:
transRefNumber
- the txn reference number to set- Returns:
- the transaction history query
- Since:
- 18.11.0
-
setTrackingCode
- Parameters:
trackingCode
- the trackingCode (tracking number) to set- Returns:
- the transaction history query
-
setStartDate
- Parameters:
startDate
- the startDate to set (defaults to time completed)- Returns:
- the transaction history query
-
setEndDate
- Parameters:
endDate
- the endDate to set (defaults to time completed)- Returns:
- the transaction history query
-
setTime
- Parameters:
time
- the time to set (defaults to time completed)- Returns:
- the transaction history query
-
setDeviceType
- Parameters:
deviceType
- the deviceType to set- Returns:
- the transaction history query
-
setFetchLimit
Set the query fetch limit to limit the maximum number of records returned. The default query fetch limit is 1,000 records. The maximum fetch limit value is 100,000 records.- Parameters:
fetchLimit
- the query fetch limit- Returns:
- the transaction history query
-
addOrderByAsc
Add the sort order by ascending to the query.- Parameters:
orderProperty
- the property to sort by (required)- Returns:
- the transaction query
-
addOrderByDesc
Add the sort order by descending to the query.- Parameters:
orderProperty
- the property to sort by (required)- Returns:
- the transaction 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
-
listRows
Execute the transaction history query and return a list of row map objects.- Returns:
- execute the transaction history query and return a list of row map objects
-
listJson
Execute the query and return an transaction history rows JSON array list.- Returns:
- execute the query and return an transaction history rows JSON array list
-
listCsv
Execute the query and return an transaction history rows in CSV (Comma Separated Value) format list.- Returns:
- execute the query and return an transaction history rows in CSV (Comma Separated Value) format list
-
firstRow
Execute the query and return the first transaction history row for the query.- Returns:
- execute the query and return the first transaction history row for the query.
-