Package com.avoka.tm.query
Class TxnHistoryQuery
- java.lang.Object
-
- com.avoka.tm.query.TxnHistoryQuery
-
public class TxnHistoryQuery extends Object
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
Nested Classes Modifier and Type Class Description static class
TxnHistoryQuery.Time
The startDate and endDate filter time type.
-
Constructor Summary
Constructors Constructor Description TxnHistoryQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TxnHistoryQuery
addOrderByAsc(String orderProperty)
Add the sort order by ascending to the query.TxnHistoryQuery
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.Map<String,Object>
firstRow()
Execute the query and return the first transaction history row for the query.String
listCsv()
Execute the query and return an transaction history rows in CSV (Comma Separated Value) format list.String
listJson()
Execute the query and return an transaction history rows JSON array list.List<Map<String,Object>>
listRows()
Execute the transaction history query and return a list of row map objects.TxnHistoryQuery
setAbandonFormStatus(String abandonFormStatus)
TxnHistoryQuery
setClientCode(String clientCode)
TxnHistoryQuery
setDeviceType(String deviceType)
TxnHistoryQuery
setEndDate(Date endDate)
TxnHistoryQuery
setFetchLimit(int fetchLimit)
Set the query fetch limit to limit the maximum number of records returned.TxnHistoryQuery
setFormAbandonType(String formAbandonType)
TxnHistoryQuery
setFormCode(String formCode)
TxnHistoryQuery
setFormStatus(String formStatus)
TxnHistoryQuery
setJobName(String jobName)
TxnHistoryQuery
setMilestone(String milestone)
TxnHistoryQuery
setPortalName(String portalName)
TxnHistoryQuery
setStartDate(Date startDate)
TxnHistoryQuery
setTime(TxnHistoryQuery.Time time)
TxnHistoryQuery
setTrackingCode(String trackingCode)
TxnHistoryQuery
setTxnRefNumber(String transRefNumber)
TxnHistoryQuery
setVersionNumber(String versionNumber)
-
-
-
Method Detail
-
setPortalName
public TxnHistoryQuery setPortalName(String portalName)
- Parameters:
portalName
- the portalName to set- Returns:
- the transaction history query
-
setClientCode
public TxnHistoryQuery setClientCode(String clientCode)
- Parameters:
clientCode
- the clientCode to set- Returns:
- the transaction history query
-
setFormCode
public TxnHistoryQuery setFormCode(String formCode)
- Parameters:
formCode
- the formCode to set- Returns:
- the transaction history query
-
setVersionNumber
public TxnHistoryQuery setVersionNumber(String versionNumber)
- Parameters:
versionNumber
- the versionNumber to set- Returns:
- the transaction history query
-
setJobName
public TxnHistoryQuery setJobName(String jobName)
- Parameters:
jobName
- the jobName to set- Returns:
- the transaction history query
-
setFormStatus
public TxnHistoryQuery setFormStatus(String formStatus)
- Parameters:
formStatus
- the formStatus to set- Returns:
- the transaction history query
-
setAbandonFormStatus
public TxnHistoryQuery setAbandonFormStatus(String abandonFormStatus)
- Parameters:
abandonFormStatus
- the abandonFormStatus to set- Returns:
- the transaction history query
-
setFormAbandonType
public TxnHistoryQuery setFormAbandonType(String formAbandonType)
- Parameters:
formAbandonType
- the formAbandonType to set- Returns:
- the transaction history query
-
setMilestone
public TxnHistoryQuery setMilestone(String milestone)
- Parameters:
milestone
- the transaction milestone to set- Returns:
- the transaction history query
- Since:
- 17.10.0
-
setTxnRefNumber
public TxnHistoryQuery setTxnRefNumber(String transRefNumber)
- Parameters:
transRefNumber
- the txn reference number to set- Returns:
- the transaction history query
- Since:
- 18.11.0
-
setTrackingCode
public TxnHistoryQuery setTrackingCode(String trackingCode)
- Parameters:
trackingCode
- the trackingCode (tracking number) to set- Returns:
- the transaction history query
-
setStartDate
public TxnHistoryQuery setStartDate(Date startDate)
- Parameters:
startDate
- the startDate to set (defaults to time completed)- Returns:
- the transaction history query
-
setEndDate
public TxnHistoryQuery setEndDate(Date endDate)
- Parameters:
endDate
- the endDate to set (defaults to time completed)- Returns:
- the transaction history query
-
setTime
public TxnHistoryQuery setTime(TxnHistoryQuery.Time time)
- Parameters:
time
- the time to set (defaults to time completed)- Returns:
- the transaction history query
-
setDeviceType
public TxnHistoryQuery setDeviceType(String deviceType)
- Parameters:
deviceType
- the deviceType to set- Returns:
- the transaction history query
-
setFetchLimit
public TxnHistoryQuery setFetchLimit(int fetchLimit)
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
public TxnHistoryQuery addOrderByAsc(String orderProperty)
Add the sort order by ascending to the query.- Parameters:
orderProperty
- the property to sort by (required)- Returns:
- the transaction query
-
addOrderByDesc
public TxnHistoryQuery addOrderByDesc(String orderProperty)
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
public List<Map<String,Object>> 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
public String 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
public String 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
-
-