public class OrderItemProductChangeListener extends Object implements ChangeListener<Object[]>, ListeningProcess
OrderItem.getProduct()
enforces a nullable Ref-Integrity. In particular Deletes on a Product
will not be possible
if it is associated with an OrderItem
. While its the responsibility of the OrderStrategy
to decide when to
break that relation and nullify it; in the interim Product Operations may not be able to wait. For this reason, a configurable way is provided
to check the relation.
<Product Ids as Long>
}Modifier and Type | Field and Description |
---|---|
protected javax.persistence.EntityManager |
em |
Constructor and Description |
---|
OrderItemProductChangeListener() |
Modifier and Type | Method and Description |
---|---|
protected void |
beforeDelProduct(Product product) |
protected void |
beforeDelProducts(Object ids) |
protected void |
beforeDelProductSubHierarchy(Product category) |
void |
onChange(ChangeGenerator generator,
Object[] event)
For UI, Single record based interactions
|
void |
onChange(ProcessState processState,
Process.Event event,
Process.EventPoint eventPoint)
For ETL Operations
|
public void onChange(ProcessState processState, Process.Event event, Process.EventPoint eventPoint) throws ContinueProcessingException
onChange
in interface ListeningProcess
processState
- as ProcessState
event
- as Process.Event
eventPoint
- as Process.EventPoint
ContinueProcessingException;
- since the Check is to simply Warn the user not Abort the processContinueProcessingException
public void onChange(ChangeGenerator generator, Object[] event)
onChange
in interface ChangeListener<Object[]>
generator
- as the generator that caused the change. Specially useful if the Listener is subscribing to multiple ChangeGenerator
sevent
- as the model change communicatedprotected void beforeDelProducts(Object ids)
protected void beforeDelProduct(Product product)
protected void beforeDelProductSubHierarchy(Product category)
Copyright © 2018. All rights reserved.