public class HubDetailDelegate extends Object
Constructor and Description |
---|
HubDetailDelegate() |
Modifier and Type | Method and Description |
---|---|
protected static com.viaoa.hub.HubDataMaster |
getDataMaster(Hub thisHub)
returns DataMaster from any shared hub that has a MasterHub set.
|
protected static com.viaoa.hub.HubDataMaster |
getDataMaster(Hub thisHub,
Class masterClass) |
static Hub |
getDetailHub(Hub thisHub,
Class[] clazz) |
static Hub |
getDetailHub(Hub thisHub,
Class clazz,
boolean bShareActive,
String selectOrder) |
static Hub |
getDetailHub(Hub thisHub,
String path) |
static Hub |
getDetailHub(Hub thisHub,
String path,
boolean bShareActive) |
static Hub |
getDetailHub(Hub thisHub,
String path,
boolean bShareActive,
String selectOrder) |
protected static Hub |
getDetailHub(Hub thisHub,
String path,
Class[] classes,
Class lastClass,
Hub detailHub,
boolean bShareActive,
String selectOrder)
Main method for setting Master/Detail relationship.
|
static Hub |
getDetailHub(Hub thisHub,
String path,
Class objectClass,
boolean bShareActive) |
static Hub |
getDetailHub(Hub thisHub,
String path,
String selectOrder) |
static Hub |
getHubWithMasterHub(Hub thisHub)
returns any shared hub with a MasterHub set.
|
static Hub |
getHubWithMasterObject(Hub thisHub) |
static OALinkInfo |
getLinkInfoFromDetailToMaster(Hub hub)
Returns the OALinkInfo from detail (MANY) to master (ONE).
|
static OALinkInfo |
getLinkInfoFromMasterHubToDetail(Hub thisDetailHub) |
static OALinkInfo |
getLinkInfoFromMasterObjectToDetail(Hub thisDetailHub) |
static OALinkInfo |
getLinkInfoFromMasterToDetail(Hub thisDetailHub) |
static Class |
getMasterClass(Hub thisHub) |
static Hub |
getMasterHub(Hub thisHub)
returns the MasterHuib of any shared hub.
|
static OAObject |
getMasterObject(Hub thisHub)
Returns the OAObject that owns this Hub
|
static String |
getPropertyFromDetailToMaster(Hub thisHub)
Used for master/detail Hubs, returns the name of the property from the detail Hub to master Hub.
|
static String |
getPropertyFromMasterToDetail(Hub thisHub)
Used for master/detail Hubs, returns the name of the property from the master Hub to detail Hub.
|
static Hub |
getRealHub(Hub thisHub)
Get the real hub that this hub should be using.
|
static boolean |
hasDetailHubs(Hub thisHub) |
static boolean |
isMasterNew(Hub thisHub)
Returns true if any of the master hubs above this hub have an active object that is new.
|
static boolean |
isOwned(Hub thisHub)
Returns true if this hub of objects is owned by a master object.
|
static boolean |
isRecursiveMasterDetail(Hub thisHub)
Is this a master/detail, and is the detail "hub" recursive.
|
static void |
preloadDetailData(Hub thisHub,
int pos) |
static boolean |
removeDetailHub(Hub thisHub,
Hub hubDetail)
Used to remove Master/Detail relationships.
|
static void |
setMasterHub(Hub thisHub,
Hub masterHub,
String path,
boolean bShared,
String selectOrder)
Used to create Master/Detail relationships.
|
protected static boolean |
setMasterHubActiveObject(Hub thisHub,
Object detailObject,
boolean bUpdateLink) |
static void |
setMasterObject(Hub thisHub,
OAObject masterObject) |
static void |
setMasterObject(Hub thisHub,
OAObject masterObject,
OALinkInfo liDetailToMaster)
Set the object that "owns" this hub.
|
protected static void |
setPropertyToMasterHub(Hub thisHub,
Object detailObject,
Object objMaster)
Called by add(), insert(), remove to update an object's reference property to that of the master object.
|
protected static void |
updateAllDetail(Hub thisHub,
boolean bUpdateLink)
Called by setActiveObject to automatically adjust Detail Hubs.
|
protected static void |
updateDetail(Hub thisHub,
com.viaoa.hub.HubDetail detail,
Hub detailHub,
boolean bUpdateLink)
Internal method to update any detail hubs.
|
protected static void |
updateDetailActiveObject(Hub thisHub,
Hub hubDetailHub,
boolean bUpdateLink,
boolean bShareActiveObject)
initialize activeObject in detail hub.
|
public static void setMasterHub(Hub thisHub, Hub masterHub, String path, boolean bShared, String selectOrder)
path
- is the property path from masterHub to get to this hubpublic static boolean isRecursiveMasterDetail(Hub thisHub)
protected static boolean setMasterHubActiveObject(Hub thisHub, Object detailObject, boolean bUpdateLink)
protected static void setPropertyToMasterHub(Hub thisHub, Object detailObject, Object objMaster)
protected static void updateAllDetail(Hub thisHub, boolean bUpdateLink)
public static void preloadDetailData(Hub thisHub, int pos)
protected static void updateDetail(Hub thisHub, com.viaoa.hub.HubDetail detail, Hub detailHub, boolean bUpdateLink)
protected static void updateDetailActiveObject(Hub thisHub, Hub hubDetailHub, boolean bUpdateLink, boolean bShareActiveObject)
protected static com.viaoa.hub.HubDataMaster getDataMaster(Hub thisHub)
protected static com.viaoa.hub.HubDataMaster getDataMaster(Hub thisHub, Class masterClass)
public static Hub getHubWithMasterHub(Hub thisHub)
public static OAObject getMasterObject(Hub thisHub)
public static Hub getDetailHub(Hub thisHub, Class clazz, boolean bShareActive, String selectOrder)
public static Hub getDetailHub(Hub thisHub, String path, Class objectClass, boolean bShareActive)
public static Hub getDetailHub(Hub thisHub, String path, boolean bShareActive, String selectOrder)
protected static Hub getDetailHub(Hub thisHub, String path, Class[] classes, Class lastClass, Hub detailHub, boolean bShareActive, String selectOrder)
Full Description on Master/Detail Hubs
public static void setMasterObject(Hub thisHub, OAObject masterObject, OALinkInfo liDetailToMaster)
Example: if a dept object has an emp hub, then it will be the masterObject of the hubEmp. All additions and removes will be tracked for a OADataSource that uses links.
liDetailToMaster
- is from the detail object to the master.public static OALinkInfo getLinkInfoFromDetailToMaster(Hub hub)
public static boolean isMasterNew(Hub thisHub)
public static boolean removeDetailHub(Hub thisHub, Hub hubDetail)
public static String getPropertyFromMasterToDetail(Hub thisHub)
Example:
If master is Department and Detail is Employee then "Employees", which is from Department.getEmployees()
public static OALinkInfo getLinkInfoFromMasterHubToDetail(Hub thisDetailHub)
public static OALinkInfo getLinkInfoFromMasterToDetail(Hub thisDetailHub)
public static OALinkInfo getLinkInfoFromMasterObjectToDetail(Hub thisDetailHub)
public static String getPropertyFromDetailToMaster(Hub thisHub)
Example:
If master is Department and Detail is Employee then "Department", which is from Employee.getDepartment()
public static boolean isOwned(Hub thisHub)
public static Hub getRealHub(Hub thisHub)
public static boolean hasDetailHubs(Hub thisHub)
Copyright © 1999–2019 ViaOA. All rights reserved.