public class DetailHub<TYPE> extends Hub<TYPE>
Whenever the active object of the master Hub is changed, the Detail Hub will automatically be updated to include the objects of a property in the active object.
Example:
A Department Class has many Employees (using a Hub). A DetailHub can be created using a Hub of Department objects
as the master Hub. This DetailHub will automatically contain the Employee objects for whichever Department is
currenly the active object in the master Hub.
Using the diagram, the detail Hub is populated with the Employee objects from the Department that is the
active object in the master Hub. Actually, the detail Hub is not really populated, but rather it uses
the same Data that the Dept B Employee Hub is using. If an Employee object is added to the active Department's
Employee Hub, the Detail Hub would also contain this Employee.
In this example, a UI Component (ex: JTable) could be setup to list the Department objects and another UI Component (ex: JTable) could list the Employee objects from the Department that is selected. If another Department is selected, then the JTable listing the Employees will show that Departments Employee objects.
Hub hubDept = new Hub(Department.class); // create new Hub for Department objects hubDept.select(); // select all departments from datasource Hub hubEmp = new HubDetail(hubDept, "Employees"); // create Hub that will automatically // contain the Employee objects // for the active Department // Or Hub hubEmp = new HubDetail(hubDept,"Employees", "lastName, firstName"); // sets sort order
Hub
,
Serialized FormConstructor and Description |
---|
DetailHub(Hub hubMaster,
Class<TYPE> clazz)
Create a new DetailHub based on a reference Class from a master Hub.
|
DetailHub(Hub hubMaster,
Class<TYPE> clazz,
boolean bShareActiveObject)
Create a new DetailHub based on a reference Class from a master Hub.
|
DetailHub(Hub hubMaster,
Class<TYPE> clazz,
boolean bShareActiveObject,
String selectOrder)
Create a new DetailHub based on a reference Class from a master Hub.
|
DetailHub(Hub hubMaster,
Class<TYPE> clazz,
String selectOrder)
Create a new DetailHub based on a reference Class from a master Hub.
|
DetailHub(Hub hubMaster,
String propertyPath)
Create a new DetailHub based on a property path from a master Hub.
|
DetailHub(Hub hubMaster,
String propertyPath,
boolean bShareActiveObject)
Create a new DetailHub based on a property path from a master Hub.
|
DetailHub(Hub hubMaster,
String propertyPath,
boolean bShareActiveObject,
String selectOrder)
Create a new DetailHub based on a property path from a master Hub.
|
DetailHub(Hub hubMaster,
String propertyPath,
String selectOrder)
Create a new DetailHub based on a property path from a master Hub.
|
add, add, addElement, addHubListener, addHubListener, addHubListener, addHubListener, addHubListener, addHubListener, addHubListener, addHubListener, addHubListener, addListener, addTriggerListener, addTriggerListener, canAdd, canAdd, cancelSelect, cancelSort, canRemove, canRemove, canRemoveAll, clear, clone, compareTo, contains, copyInto, copyInto, createShared, createSharedHub, createSharedHub, deleteAll, elementAt, ensureCapacity, finalize, find, find, find, find, findNext, findNext, getActiveObject, getAddHub, getAO, getAt, getChanged, getCurrentSize, getDefaultPos, getDetailHub, getDetailHub, getDetailHub, getDetailHub, getDetailHub, getDetailHub, getDetailHub, getDetailHub, getDetailHub, getDetailHub, getDetailHub, getEnabled, getLast, getLinkHub, getLinkPath, getMasterClass, getMasterHub, getMasterObject, getNullOnRemove, getOAObjectInfo, getOAObjectInfo, getObject, getObjectAt, getObjectClass, getPos, getPos, getPos, getProperty, getRealHub, getRefresh, getRootHub, getSelect, getSelect, getSelectOrder, getSelectWhere, getSharedHub, getSize, hasDetailHubs, indexOf, insert, isDeletingAll, isLoading, isMoreData, isOAObject, isOwned, isServer, isSorted, isValid, iterator, loadAllData, move, readResolve, remove, remove, removeAll, removeAt, removeDetailHub, removeHubListener, removeLinkHub, removeListener, removeProperty, resequence, resetAO, resizeToFit, resort, saveAll, saveAll, select, select, select, select, select, select, select, select, select, select, select, selectPassthru, sendRefresh, setActiveObject, setActiveObject, setAddHub, setAO, setAO, setAutoMatch, setAutoMatch, setAutoMatch, setAutoMatch, setAutoSequence, setAutoSequence, setAutoSequence, setChanged, setDefaultPos, setEnabled, setLink, setLinkHub, setLinkHub, setLinkHub, setLinkHub, setLinkHub, setLinkHub, setLinkHub, setLinkHub, setLinkHubOnPos, setLoading, setMasterHub, setMasterHub, setMasterHub, setMasterHub, setMasterHub, setNullOnRemove, setPos, setProperty, setRefresh, setRootHub, setSelectOrder, setSelectWhere, setSharedHub, setSharedHub, setUniqueProperty, size, sort, sort, sort, sort, sort, swap, toArray, toArray, toString, updateLinkProperty
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public DetailHub(Hub hubMaster, String propertyPath)
public DetailHub(Hub hubMaster, String propertyPath, boolean bShareActiveObject)
bShareActiveObject
- if true, then detail Hub uses same active object as
the property (if it is a Hub) that it is using.public DetailHub(Hub hubMaster, String propertyPath, String selectOrder)
selectOrder
- if value from property path has not been created/selected, then this
will be the sort order used when it is selected.public DetailHub(Hub hubMaster, String propertyPath, boolean bShareActiveObject, String selectOrder)
bShareActiveObject
- if true, then detail Hub uses same active object asselectOrder
- if value from property path has not been created/selected, then this
will be the sort order used when it is selected.public DetailHub(Hub hubMaster, Class<TYPE> clazz)
public DetailHub(Hub hubMaster, Class<TYPE> clazz, boolean bShareActiveObject)
bShareActiveObject
- if true, then detail Hub uses same active object as
will be the sort order used when it is selected.public DetailHub(Hub hubMaster, Class<TYPE> clazz, String selectOrder)
selectOrder
- if value from property path has not been created/selected, then this
will be the sort order used when it is selected.public DetailHub(Hub hubMaster, Class<TYPE> clazz, boolean bShareActiveObject, String selectOrder)
bShareActiveObject
- if true, then detail Hub uses same active object asselectOrder
- if value from property path has not been created/selected, then this
will be the sort order used when it is selected.Copyright © 1999–2019 ViaOA. All rights reserved.