public class CollectionInverseVariableListener extends Object implements VariableListener<Object>, CollectionInverseVariableSupply
Modifier and Type | Field and Description |
---|---|
protected InverseRelationShadowVariableDescriptor |
shadowVariableDescriptor |
protected VariableDescriptor |
sourceVariableDescriptor |
Constructor and Description |
---|
CollectionInverseVariableListener(InverseRelationShadowVariableDescriptor shadowVariableDescriptor,
VariableDescriptor sourceVariableDescriptor) |
Modifier and Type | Method and Description |
---|---|
void |
afterEntityAdded(ScoreDirector scoreDirector,
Object entity) |
void |
afterEntityRemoved(ScoreDirector scoreDirector,
Object entity) |
void |
afterVariableChanged(ScoreDirector scoreDirector,
Object entity) |
void |
beforeEntityAdded(ScoreDirector scoreDirector,
Object entity) |
void |
beforeEntityRemoved(ScoreDirector scoreDirector,
Object entity) |
void |
beforeVariableChanged(ScoreDirector scoreDirector,
Object entity) |
Collection<?> |
getInverseCollection(Object planningValue)
If entity1.varA = x then an inverse of x is entity1.
|
protected void |
insert(ScoreDirector scoreDirector,
Object entity) |
protected void |
retract(ScoreDirector scoreDirector,
Object entity) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requiresUniqueEntityEvents
protected final InverseRelationShadowVariableDescriptor shadowVariableDescriptor
protected final VariableDescriptor sourceVariableDescriptor
public CollectionInverseVariableListener(InverseRelationShadowVariableDescriptor shadowVariableDescriptor, VariableDescriptor sourceVariableDescriptor)
public void beforeEntityAdded(ScoreDirector scoreDirector, Object entity)
beforeEntityAdded
in interface VariableListener<Object>
scoreDirector
- never nullentity
- never nullpublic void afterEntityAdded(ScoreDirector scoreDirector, Object entity)
afterEntityAdded
in interface VariableListener<Object>
scoreDirector
- never nullentity
- never nullpublic void beforeVariableChanged(ScoreDirector scoreDirector, Object entity)
beforeVariableChanged
in interface VariableListener<Object>
scoreDirector
- never nullentity
- never nullpublic void afterVariableChanged(ScoreDirector scoreDirector, Object entity)
afterVariableChanged
in interface VariableListener<Object>
scoreDirector
- never nullentity
- never nullpublic void beforeEntityRemoved(ScoreDirector scoreDirector, Object entity)
beforeEntityRemoved
in interface VariableListener<Object>
scoreDirector
- never nullentity
- never nullpublic void afterEntityRemoved(ScoreDirector scoreDirector, Object entity)
afterEntityRemoved
in interface VariableListener<Object>
scoreDirector
- never nullentity
- never nullprotected void insert(ScoreDirector scoreDirector, Object entity)
protected void retract(ScoreDirector scoreDirector, Object entity)
public Collection<?> getInverseCollection(Object planningValue)
CollectionInverseVariableSupply
getInverseCollection
in interface CollectionInverseVariableSupply
planningValue
- never nullCollection
of entities for which the planning variable is the planningValue.Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.