Class TransactionSQL
java.lang.Object
me.playernguyen.opteco.OptEcoImplementation
me.playernguyen.opteco.transaction.TransactionSQL
- All Implemented Interfaces:
TransactionStorage
- Direct Known Subclasses:
TransactionMySQLStorage,TransactionSQLiteStorage
public abstract class TransactionSQL extends OptEcoImplementation implements TransactionStorage
-
Constructor Summary
Constructors Constructor Description TransactionSQL(SQLEstablish establish) -
Method Summary
Modifier and Type Method Description booleancreateStorageTransaction(Transaction transaction)Create an transactionSQLEstablishgetEstablish()java.util.ArrayList<TransactionResult>getList()Get the transaction listTransactionResultgetTransaction(java.lang.String id)Get the transaction storage in database via id.voidpush(Transaction transaction)Push the transaction into the database.booleanupdateTransaction(Transaction transaction)Update the transactionMethods inherited from class me.playernguyen.opteco.OptEcoImplementation
getAccountDatabase, getAccountManager, getConfigurationLoader, getDebugger, getLanguageLoader, getLogger, getPlugin, getStorageType, getTransactionManager
-
Constructor Details
-
Method Details
-
getEstablish
-
push
Description copied from interface:TransactionStoragePush the transaction into the database. If the transaction is available, callingTransactionStorage.updateTransaction(Transaction).- Specified by:
pushin interfaceTransactionStorage- Parameters:
transaction-Transactionthe transaction class
-
getList
Description copied from interface:TransactionStorageGet the transaction list- Specified by:
getListin interfaceTransactionStorage- Returns:
Transaction
-
getTransaction
Description copied from interface:TransactionStorageGet 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
Description copied from interface:TransactionStorageUpdate 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
-