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