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 boolean
createStorageTransaction(Transaction transaction)
Create an transactionSQLEstablish
getEstablish()
java.util.ArrayList<TransactionResult>
getList()
Get the transaction listTransactionResult
getTransaction(java.lang.String id)
Get the transaction storage in database via id.void
push(Transaction transaction)
Push the transaction into the database.boolean
updateTransaction(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:TransactionStorage
Push the transaction into the database. If the transaction is available, callingTransactionStorage.updateTransaction(Transaction)
.- Specified by:
push
in interfaceTransactionStorage
- Parameters:
transaction
-Transaction
the transaction class
-
getList
Description copied from interface:TransactionStorage
Get the transaction list- Specified by:
getList
in interfaceTransactionStorage
- Returns:
Transaction
-
getTransaction
Description copied from interface:TransactionStorage
Get the transaction storage in database via id. It's work by find the first value and put it.- Specified by:
getTransaction
in interfaceTransactionStorage
- Parameters:
id
- id of transaction- Returns:
- The transaction
-
updateTransaction
Description copied from interface:TransactionStorage
Update the transaction- Specified by:
updateTransaction
in interfaceTransactionStorage
- Parameters:
transaction
-Transaction
object- Returns:
- the state are update or not
-
createStorageTransaction
Description copied from interface:TransactionStorage
Create an transaction- Specified by:
createStorageTransaction
in interfaceTransactionStorage
- Parameters:
transaction
- the transaction to create- Returns:
- return state transaction
-