public class HubAutoMatch<TYPE,PROPTYPE> extends HubListenerAdapter implements Serializable
HubListener.InsertLocation
Modifier and Type | Field and Description |
---|---|
protected boolean |
bManuallyCalled |
protected Method |
getMethod |
protected Hub |
hub |
protected Hub |
hubMaster |
protected String |
property |
protected Method |
setMethod |
Constructor and Description |
---|
HubAutoMatch() |
HubAutoMatch(Hub<TYPE> hub,
String property,
Hub<PROPTYPE> hubMaster) |
HubAutoMatch(Hub<TYPE> hub,
String property,
Hub<PROPTYPE> hubMaster,
boolean bManuallyCalled)
Create new HubAutoMatch that will automatically create objects in a Hub with references that
match the objects in a master hub.
|
Modifier and Type | Method and Description |
---|---|
void |
afterAdd(HubEvent e)
HubListener interface method, used to listen to changes to master Hub.
|
void |
afterInsert(HubEvent e)
HubListener interface method, used to listen to changes to master Hub.
|
void |
afterRemove(HubEvent e)
HubListener interface method, used to listen to changes to master Hub.
|
void |
close()
Closes HubAutoMatch.
|
protected TYPE |
createNewObject(PROPTYPE obj) |
protected void |
finalize() |
void |
init(Hub<TYPE> hub,
String property,
Hub<PROPTYPE> hubMaster) |
boolean |
okToRemove(Object obj,
Object propertyValue)
Called before removing an object that does not have a matching value.
|
void |
onNewList(HubEvent e)
HubListener interface method, used to listen to changes to master Hub.
|
protected void |
setProperty(String property) |
void |
setServerSideOnly(boolean b)
This needs to be set to true if it is only created on the server, but client applications will be
using the same Hub that is filtered.
|
void |
update() |
afterChangeActiveObject, afterDelete, afterLoad, afterMove, afterNewList, afterPropertyChange, afterRemoveAll, afterSave, afterSort, beforeAdd, beforeDelete, beforeInsert, beforeMove, beforePropertyChange, beforeRemove, beforeRemoveAll, beforeSave, beforeSelect, getLocation, setLocation
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAllowAdd, getAllowDelete, getAllowEnabled, getAllowRemove, getAllowRemoveAll, getAllowVisible, isValidAdd, isValidDelete, isValidPropertyChange, isValidRemove, isValidRemoveAll
protected Hub hub
protected Hub hubMaster
protected String property
protected boolean bManuallyCalled
protected transient Method getMethod
protected transient Method setMethod
public HubAutoMatch(Hub<TYPE> hub, String property, Hub<PROPTYPE> hubMaster, boolean bManuallyCalled)
hubMaster
- hub that has all objects to useproperty
- property in hub that has same type as objects in hubMaster.bManuallyCalled
- set to true if the update method will be manually called. This is used in cases where the hubMaster
could be generating events that should not affect the matching. For example, if the hubMaster is controlled by a HubMerger and
objects are added/removed.public HubAutoMatch()
public void setServerSideOnly(boolean b)
public void close()
protected void finalize() throws Throwable
protected void setProperty(String property)
public void update()
public boolean okToRemove(Object obj, Object propertyValue)
public void afterInsert(HubEvent e)
afterInsert
in interface HubListener
afterInsert
in class HubListenerAdapter
public void afterAdd(HubEvent e)
afterAdd
in interface HubListener
afterAdd
in class HubListenerAdapter
Hub.add
public void afterRemove(HubEvent e)
afterRemove
in interface HubListener
afterRemove
in class HubListenerAdapter
public void onNewList(HubEvent e)
onNewList
in interface HubListener
onNewList
in class HubListenerAdapter
Copyright © 1999–2019 ViaOA. All rights reserved.