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 TypeTransaction
ct, t
Constructor and Description |
---|
DefaultTransactionService() |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener<T> changeListener)
Allow Notify all
ChangeListener s 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, queryPage
delete, delete, getEntityManager, getNativeEntityName, load, load, paginate, query, query, setEntityManager, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
query
delete, delete, load, load
@Transactional(readOnly=false) public T save(O order, T transaction)
TransactionService
Transaction
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)
TransactionService
Transaction
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)
TransactionService
load
in interface TransactionService<T extends Transaction<O>,O extends Order>
transactionId
- as Stringpublic void addChangeListener(ChangeListener<T> changeListener)
ChangeGenerator
ChangeListener
s about a changeaddChangeListener
in interface ChangeGenerator<T extends Transaction<O>>
public void notifyAllListeners(T object)
ChangeGenerator
notifyAllListeners
in interface ChangeGenerator<T extends Transaction<O>>
public List<ChangeListener<T>> getListeners()
ChangeGenerator
getListeners
in interface ChangeGenerator<T extends Transaction<O>>
public void setListeners(List<ChangeListener<T>> listeners)
ChangeGenerator
setListeners
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.