public class HubDelegate extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HubDelegate.HubCurrentStateEnum
Current state of Hub, in case it's in the process of being updated, based on another event that changes a Hub that is somehow
connected to this Hub.
|
Modifier and Type | Field and Description |
---|---|
static Boolean |
FALSE |
static Boolean |
TRUE |
Constructor and Description |
---|
HubDelegate() |
Modifier and Type | Method and Description |
---|---|
protected static <T> HubDelegate.HubCurrentStateEnum |
_getCurrentState(Hub<T> thisHub,
Hub<T> hubNew,
ArrayList<T> alNew,
Set<Hub> hmHub) |
protected static void |
_updateHubAddsAndRemoves(Hub thisHub,
int iCascadeRule,
OACascade cascade,
boolean bIsSaving)
20181211 removed, use hub.getLinkHub(true) Returns this or any shared hub that uses the same active object and is linked to another
Hub.
|
static Hub |
getAnyAddHub(Hub hub)
Returns this hub, or one of its shared Hubs, that has an addHub established.
|
static HubAutoMatch |
getAutoMatch(Hub thisHub) |
static HubAutoSequence |
getAutoSequence(Hub thisHub) |
static boolean |
getChanged(Hub thisHub,
int iCascadeRule,
OACascade cascade) |
static Hub |
getControllingHub(Hub thisHub)
created 20110904 Find the hub that controls whether or not this hub is valid.
|
static <T> HubDelegate.HubCurrentStateEnum |
getCurrentState(Hub<T> thisHub,
Hub<T> hubNew,
ArrayList<T> alNew)
Check to see if a Hub is correctly linked, or if it is in mid-flight of being changed.
|
static int |
getLoadedSize(Hub thisHub) |
static Class |
getMasterClass(Hub hub)
Returns the Class of OAObject that owns this Hub.
|
static OAObject |
getMasterObject(Hub hub)
Returns the OAObject that owns this Hub
|
protected static Object |
getProperty(Hub thisHub,
String name) |
protected static String |
getPropertyPathforClasses(Hub hub,
Class[] classes) |
protected static Object |
getRealObject(Hub hub,
Object object) |
static int |
getSize(Hub thisHub) |
static boolean |
isValid(Hub thisHub)
If this hub has a master Hub or link Hub and that Hub does not have an active Object set, then this Hub is invalid.
|
protected static void |
removeProperty(Hub thisHub,
String name) |
static void |
resequence(Hub thisHub) |
static void |
setAutoMatch(Hub thisHub,
String property,
Hub hubMaster,
boolean bServerSideOnly)
Makes sure that for each object in a hubMaster, there exists an object in this hub where property is equal to the hubMaster object.
|
static void |
setAutoMatch(Hub thisHub,
String property,
Hub hubMaster,
boolean bServerSideOnly,
OAObject objStop,
String stopProperty) |
static void |
setAutoSequence(Hub thisHub,
String property,
int startNumber,
boolean bKeepSeq)
Used to update a property in each object to equal/store the position within this Hub.
|
static void |
setObjectClass(Hub thisHub,
Class objClass)
Set the Class of objects that this Hub will contain.
|
protected static void |
setProperty(Hub thisHub,
String name,
Object obj) |
static void |
setReferenceable(Hub hub,
boolean bReferenceable) |
static void |
setUniqueProperty(Hub thisHub,
String propertyName) |
static boolean |
verifyUniqueProperty(Hub thisHub,
Object object)
Verifies that the property in obj is unique for all objects in this Hub (not in all of system).
|
public static boolean verifyUniqueProperty(Hub thisHub, Object object)
protected static String getPropertyPathforClasses(Hub hub, Class[] classes)
public static OAObject getMasterObject(Hub hub)
public static Class getMasterClass(Hub hub)
public static void setObjectClass(Hub thisHub, Class objClass)
Note: you can not reset the Object class if there are any objects in it.
objClass
- Class for the object being storedpublic static boolean isValid(Hub thisHub)
public static <T> HubDelegate.HubCurrentStateEnum getCurrentState(Hub<T> thisHub, Hub<T> hubNew, ArrayList<T> alNew)
Example: when an event affects multiple listeners, that affect updating detail hubs, hubMergers, etc.
This will check that a Hub is currently pointing (shared) with the correct master object. Used when Hubs are shared, master/detail, hubMerger, hubCopy, hubFilter, hubCombined.
thisHub
- hubNew
- if not null and the Hub is not InSync, then hubNew will be shared or populated with the correct current hub.arrayList
- same as hubNew, but using an arrayListprotected static <T> HubDelegate.HubCurrentStateEnum _getCurrentState(Hub<T> thisHub, Hub<T> hubNew, ArrayList<T> alNew, Set<Hub> hmHub)
public static Hub getControllingHub(Hub thisHub)
public static Hub getAnyAddHub(Hub hub)
protected static void _updateHubAddsAndRemoves(Hub thisHub, int iCascadeRule, OACascade cascade, boolean bIsSaving)
public static void setAutoSequence(Hub thisHub, String property, int startNumber, boolean bKeepSeq)
property
- is neme of property to update.startNumber
- is number to begin numbering at. Default is 0, which will match the Hub position.bKeepSeq,
- if false then seq numbers are not updated when an object is removedpublic static HubAutoSequence getAutoSequence(Hub thisHub)
public static void resequence(Hub thisHub)
public static void setAutoMatch(Hub thisHub, String property, Hub hubMaster, boolean bServerSideOnly)
hubMaster
- hub with list of objectproperty
- Property in this hubs objects that match object type in hubMasterpublic static void setAutoMatch(Hub thisHub, String property, Hub hubMaster, boolean bServerSideOnly, OAObject objStop, String stopProperty)
public static HubAutoMatch getAutoMatch(Hub thisHub)
public static int getSize(Hub thisHub)
public static int getLoadedSize(Hub thisHub)
public static void setReferenceable(Hub hub, boolean bReferenceable)
Copyright © 1999–2025 ViaOA. All rights reserved.