Class TransactionStorageYaml
java.lang.Object
me.playernguyen.opteco.transaction.yaml.TransactionStorageYaml
- All Implemented Interfaces:
TransactionStorage
public class TransactionStorageYaml extends java.lang.Object implements TransactionStorage
-
Constructor Summary
Constructors Constructor Description TransactionStorageYaml() -
Method Summary
Modifier and Type Method Description booleancreateStorageTransaction(Transaction transaction)Create an transactionjava.util.ArrayList<TransactionResult>getList()Get the transaction listTransactionResultgetTransaction(java.lang.String id)Get the transaction storage in database via id.OptEcoTransactionLoadergetTransactionLoader()voidpush(Transaction transaction)Push the transaction into the database.booleanupdateTransaction(Transaction transaction)Update the transaction
-
Constructor Details
-
TransactionStorageYaml
public TransactionStorageYaml()
-
-
Method Details
-
getTransactionLoader
-
push
Push the transaction into the database. If the transaction is available, callingupdateTransaction(Transaction).- Specified by:
pushin interfaceTransactionStorage- Parameters:
transaction-Transactionthe transaction class
-
getList
Get the transaction list- Specified by:
getListin interfaceTransactionStorage- Returns:
Transaction
-
getTransaction
Get the transaction storage in database via id. It's work by find the first value and put it.- Specified by:
getTransactionin interfaceTransactionStorage- Parameters:
id- id of transaction- Returns:
- The transaction
-
updateTransaction
Update the transaction- Specified by:
updateTransactionin interfaceTransactionStorage- Parameters:
transaction-Transactionobject- Returns:
- the state are update or not
-
createStorageTransaction
Description copied from interface:TransactionStorageCreate an transaction- Specified by:
createStorageTransactionin interfaceTransactionStorage- Parameters:
transaction- the transaction to create- Returns:
- return state transaction
-