T - as Transaction typeO - as Order typepublic class DefaultTransactionService<T extends Transaction<O>,O extends Order> extends AbstractQueryableDaoImpl<T> implements TransactionService<T,O>
TransactionService
ChangeGenerator; it will also generate Events of TypeTransactionct, t| Constructor and Description |
|---|
DefaultTransactionService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(ChangeListener<T> changeListener)
Allow Notify all
ChangeListeners about a change |
List<ChangeListener<T>> |
getListeners()
Get list directly.
|
OrderService |
getOrderService()
For Audit and attached listeners etc; use the service than try to persist directly
If the OrderService is provided then it will call ChangeGenerator.notifyAllListeners(Object) before calling its own notifyAllListeners(Transaction) |
T |
load(String transactionId)
Load the Transaction with the given Id
|
void |
notifyAllListeners(T object)
Whenever a node is selected/updated, it also notifies its listeners.
|
T |
save(O order,
T transaction)
Update the Order and ensure the
Transaction is also saved |
T |
save(T transaction)
Update the the
Transaction only |
void |
setListeners(List<ChangeListener<T>> listeners)
Set list directly.
|
void |
setOrderService(OrderService orderService)
For Audit and attached listeners etc; use the service than try to persist directly
If the OrderService is provided then it will call ChangeGenerator.notifyAllListeners(Object) before calling its own notifyAllListeners(Transaction) |
conditionConstruct, count, ensureRowIsEntity, ensureRowIsEntity, getEntityInstance, getQueryObject, query, query, queryPage, queryPagedelete, delete, getEntityManager, getNativeEntityName, load, load, paginate, query, query, setEntityManager, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitquerydelete, delete, load, load@Transactional(readOnly=false) public T save(O order, T transaction)
TransactionServiceTransaction is also savedsave in interface TransactionService<T extends Transaction<O>,O extends Order>order - as Otransaction - as T@Transactional(readOnly=false) public T save(T transaction)
TransactionServiceTransaction onlysave in interface GenericDao<T extends Transaction<O>>save in interface TransactionService<T extends Transaction<O>,O extends Order>save in class GenericDaoImpl<T extends Transaction<O>>transaction - as Tpublic T load(String transactionId)
TransactionServiceload in interface TransactionService<T extends Transaction<O>,O extends Order>transactionId - as Stringpublic void addChangeListener(ChangeListener<T> changeListener)
ChangeGeneratorChangeListeners about a changeaddChangeListener in interface ChangeGenerator<T extends Transaction<O>>public void notifyAllListeners(T object)
ChangeGeneratornotifyAllListeners in interface ChangeGenerator<T extends Transaction<O>>public List<ChangeListener<T>> getListeners()
ChangeGeneratorgetListeners in interface ChangeGenerator<T extends Transaction<O>>public void setListeners(List<ChangeListener<T>> listeners)
ChangeGeneratorsetListeners in interface ChangeGenerator<T extends Transaction<O>>public OrderService getOrderService()
OrderService is provided then it will call ChangeGenerator.notifyAllListeners(Object) before calling its own notifyAllListeners(Transaction)public void setOrderService(OrderService orderService)
OrderService is provided then it will call ChangeGenerator.notifyAllListeners(Object) before calling its own notifyAllListeners(Transaction)Copyright © 2018. All rights reserved.