public class HubMerger<F extends OAObject,T extends OAObject> extends Object
Examples:
new HubMerger(hubSalesmen, hubOrders, "customers.orders"); new HubMerger(hubItem, hubForm, "formItem.formSection.formRow.form"); new HubMerger(hubForm, hubItem, "formRows.formSections.formItems.item");created 2004/08/20, rewritten 20080804, added recursive links 20120527
Modifier and Type | Field and Description |
---|---|
static AtomicInteger |
aiHubListenerCount |
static boolean |
bVERIFY |
boolean |
DEBUG |
int |
TotalHubListeners |
Constructor and Description |
---|
HubMerger(F obj,
Hub<T> hubCombinedObjects,
String propertyPath) |
HubMerger(Hub<F> hubRoot,
Hub<T> hubCombinedObjects,
String propertyPath) |
HubMerger(Hub<F> hubRoot,
Hub<T> hubCombinedObjects,
String propertyPath,
boolean bUseAll) |
HubMerger(Hub<F> hubRoot,
Hub<T> hubCombinedObjects,
String propertyPath,
boolean bShareActiveObject,
boolean bUseAll) |
HubMerger(Hub<F> hubRoot,
Hub<T> hubCombinedObjects,
String propertyPath,
boolean bShareActiveObject,
boolean bUseAll,
boolean bIncludeRootHub) |
HubMerger(Hub<F> hubRoot,
Hub<T> hubCombinedObjects,
String propertyPath,
boolean bShareActiveObject,
String selectOrder,
boolean bUseAll) |
HubMerger(Hub<F> hubRoot,
Hub<T> hubCombinedObjects,
String propertyPath,
boolean bShareActiveObject,
String selectOrder,
boolean bUseAll,
boolean bIncludeRootHub,
boolean bUseBackgroundThread)
Main constructor that includes all of the config params Used to create an new hubMerger that will automatically update a Hub with all
of the objects from a property path from a root Hub.
|
Modifier and Type | Method and Description |
---|---|
protected void |
afterAddRealHub(HubEvent<T> e)
This can be overwritten to get the add event from the parent, instead of getting the add event from the combinedHub.
|
protected void |
afterInsertRealHub(HubEvent<T> e)
This can be overwritten to get the insert event from the parent, instead of getting the insert event from the combinedHub.
|
protected void |
afterMoveRealHub(HubEvent<T> e)
This can be overwritten to get the move event from the parent, instead of getting the move event from the combinedHub.
|
protected void |
afterRemoveAllRealHub(HubEvent<T> e) |
protected void |
afterRemoveRealHub(HubEvent<T> e) |
protected void |
beforeAddRealHub(HubEvent<T> e)
This can be overwritten to get the add event from the parent, instead of getting the add event from the combinedHub.
|
protected void |
beforeInsertRealHub(HubEvent<T> e)
This can be overwritten to get the insert event from the parent, instead of getting the insert event from the combinedHub.
|
protected void |
beforeRemoveAllRealHub(HubEvent<T> e) |
protected void |
beforeRemoveRealHub(HubEvent<T> e)
This can be overwritten to get the remove event from the parent, instead of getting the remove event from the combinedHub.
Since remove will also set the masterObject property to null, this can be used before it is set to null. |
void |
close() |
protected void |
createNodes() |
protected void |
finalize() |
Hub |
getCombinedHub() |
String |
getDescription() |
boolean |
getEnabled() |
protected static ExecutorService |
getExecutorService() |
int |
getObjectCount()
Number of objects that are used in this merger.
|
String |
getPath() |
boolean |
getRefreshOnActiveObjectChange() |
Hub |
getRootHub() |
OASiblingHelper |
getSiblingHelper() |
boolean |
getUseAll() |
boolean |
getUseBackgroundThread() |
boolean |
isLoadingCombinedHub() |
protected void |
onAddToCombined(com.viaoa.hub.HubMerger.Data data,
OAObject obj) |
protected void |
onNewListRealHub(HubEvent<T> e)
This can be overwritten to get the add event from the parent, instead of getting the add event from the combinedHub.
|
protected void |
onRemoveFromCombined(com.viaoa.hub.HubMerger.Data data,
OAObject obj) |
void |
setDescription(String desc) |
void |
setEnabled(boolean b) |
void |
setRefreshOnActiveObjectChange(boolean b) |
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 |
setUseBackgroundThread(boolean b) |
void |
verify()
Note: if multiple threads are making changes that affect the node data, then errors could show up.
|
public boolean DEBUG
public static final boolean bVERIFY
public int TotalHubListeners
public static AtomicInteger aiHubListenerCount
public HubMerger(Hub<F> hubRoot, Hub<T> hubCombinedObjects, String propertyPath, boolean bUseAll)
public HubMerger(Hub<F> hubRoot, Hub<T> hubCombinedObjects, String propertyPath, boolean bShareActiveObject, boolean bUseAll)
public HubMerger(Hub<F> hubRoot, Hub<T> hubCombinedObjects, String propertyPath, boolean bShareActiveObject, String selectOrder, boolean bUseAll)
public HubMerger(Hub<F> hubRoot, Hub<T> hubCombinedObjects, String propertyPath, boolean bShareActiveObject, String selectOrder, boolean bUseAll, boolean bIncludeRootHub, boolean bUseBackgroundThread)
hubRoot
- root Hub. The active object of this Hub will be used to get all objects in the propertyPath.hubCombinedObjects
- will have all of the objects from the active object of the hubRoot, using propertyPath. If
hubCombinedObjects.getObjectClass() is null, then it will be assigned the correct class.propertyPath
- property path from the class of rootHub to the class of combinedHub.bShareActiveObject
- if true then the Active Object from found hub will be shared.bUseAll
- if true, then each object in hubRoot will be used. If false, then only the Active Object is used.bIncludeRootHub
- if the objects in the rootHub should also be included.public HubMerger(Hub<F> hubRoot, Hub<T> hubCombinedObjects, String propertyPath, boolean bShareActiveObject, boolean bUseAll, boolean bIncludeRootHub)
public void setUseBackgroundThread(boolean b)
public boolean getUseBackgroundThread()
public int getObjectCount()
public void setServerSideOnly(boolean b)
public OASiblingHelper getSiblingHelper()
public Hub getRootHub()
public Hub getCombinedHub()
public void setEnabled(boolean b)
public boolean getEnabled()
public String getPath()
public void setDescription(String desc)
public String getDescription()
public void verify()
protected void beforeRemoveRealHub(HubEvent<T> e)
e
- protected void afterMoveRealHub(HubEvent<T> e)
protected void beforeInsertRealHub(HubEvent<T> e)
protected void afterInsertRealHub(HubEvent<T> e)
protected void beforeAddRealHub(HubEvent<T> e)
protected void afterAddRealHub(HubEvent<T> e)
protected void onNewListRealHub(HubEvent<T> e)
protected void createNodes()
public void close()
protected void finalize() throws Throwable
protected void onAddToCombined(com.viaoa.hub.HubMerger.Data data, OAObject obj)
protected void onRemoveFromCombined(com.viaoa.hub.HubMerger.Data data, OAObject obj)
public boolean getUseAll()
public boolean getRefreshOnActiveObjectChange()
public void setRefreshOnActiveObjectChange(boolean b)
protected static ExecutorService getExecutorService()
public boolean isLoadingCombinedHub()
Copyright © 1999–2025 ViaOA. All rights reserved.