public class LocHierarchy extends Mbo implements LocHierarchyRemote
This is a site level object.
The key attributes for this object are SiteId, Location, SystemId, and Parent.
The attributes in this object are as follows:
Attribute Name | Description |
---|---|
Children | Indicates whether or not this location has children in this hierarchy. |
GISParam1 thru GISParam3 | Unused attributes. Will be removed in a future release. |
Location | Location identifier in the hierarchy associated with a system.
|
OrgId | Identifier of the organization for this relationship.
|
Parent | The location identifier for the parent in this parent/child relationship.
|
SiteId | Identifier of the site for this relationship.
|
SystemId | The system identifier for this parent/child relationship.
|
Location
,
LocAncestor
,
LocSystem
,
psdi.app.location.LocAuth
,
LocStatus
,
LocOper
,
LocationSpec
MULTILANGCOPY, phantomList, phantomQueue
ALLROWS, CHANGEDBY_USER, COUNT_ADDITIONS, COUNT_AFTERSAVE, COUNT_DATABASE, COUNT_DELETED, COUNT_EXISTING, DBCONFIG, DELAYVALIDATION, DELAYVALIDATIONONLY, DISCARDABLE, GOTCOMPLETEWHERE, HIDDEN, NO_RELATEDMBOS_OF_OWNERSCHILDREN_FETCH, NOACCESSCHECK, NOACTION, NOADD, NOCOMMIT, NODELETE, NONE, NOOVERWRITE, NOSAVE, NOSETVALUE, NOUPDATE, NOVALIDATION, NOVALIDATION_AND_NOACTION, NOVALIDATION_AND_NOACTION_ALLOWCROSSOVER, READONLY, REBUILD, REQUIRED, SAMEVALUEVALIDATION, SETBYPARENT, USER
Constructor and Description |
---|
LocHierarchy(MboSet ms)
Construct the LocHierarchy object
|
Modifier and Type | Method and Description |
---|---|
void |
add()
Add a new Lochierarchy record
Field defaults are set
|
void |
appValidate()
last minute validate before save().
|
void |
changeSysToNetworked()
changeSysToNetworked method - called to assess the status of
the LOCSYSTEM.NETWORKED flag for the current LOCHIERARCHY.SYSTEMID.
|
void |
connectLocationAndChildrenToParent()
Connect myself to my grandparent and process my children so they won't reference
my parent as ancestor.
This option is only good when this node has only one parent; when this option takes place, the following updates/deletes happen: 1) Remove the locancestor record which references my parent as ancestor, 2) Call the children to delete the Locancestor records that reference the parent as ancestor, 3) Set my grandparent as my parent. |
void |
delete(long access)
delete(long) routine
A lochierarchy record is deleted only when it itself and its children are
being disconnected from the system or if the owning location is being deleted;
No one should directly call the delete() method to process the
removal of relationships or disconnecting nodes from the system.
|
void |
disconnectLocationAndChildrenFromSystem()
Disconnect myself from the system,delete my locancestor records,
and call each child to do the same task.
The Result: 1) Myself, my children, and their children are disconnected from this system, meaning the Lochierarchy and Locancestor records are actually deleted, 2) The "children" flag of my parent is updated to false if it should become childless after my disconnecting from the system. |
MboSetRemote |
getChildren()
Get this lochierarchy's children.
|
java.lang.String[] |
getHierarchies()
Get the location's parents; Will return an array of String that
contains all the parents in the parent hierarchy.
|
MboSetRemote |
getMboSet(java.lang.String name)
if mboset name is CHILDREN and is passed from extended drilldown, then
do not add the subselect
|
MboRemote |
getOwningLocSystem()
if this LocHierarchy descends from a LocSystem object, returns
the LocSystem
|
MboSetRemote |
getParents()
Get this lochierarchy's parents.
|
MboSetRemote |
getTop()
Get the top level mboSet in the hierarchy
|
boolean |
hasChildren()
Does this location have children?
|
boolean |
hasParents()
Does this location have parents?
|
void |
init()
init routine
Fields are readonly after insert
|
boolean |
isNetworked() |
boolean |
isTop()
Is the location top level (without parent)?
|
void |
makeLocationTopLevel()
Makes the node top level, brings along its children to form its
own hierarchy, and causes the system to become networked.
When this option takes place, the following updates/deletes happen: 1) If it is a PRIMARY system, should not allow this operation to take place. A primary system has to be hierarchical and making another top level in the same system will cause the system to become networked, 2) Delete the locancestor records this node reference as ancestors and set the parent field to null, 3) Delete the the children locancestor records that reference my parents as ancestors, 4) Make the system networked if it is hierarchical, 5) Update the "children" flag of the parent should it become childless after the node's forming its own top level hierarchy. |
void |
save()
Save() routine - upon save of this object, insert or update related objects.
1) When a new lochierarchy is created,multiple locancestor records will need to be created to refrerence each parent in the hierarchy as ancestor- to represent the hierarchy in a flat manner, 2) The children flag of the parent lochierarchy was set to yes while querying the parent hierarchy, 3) Update the system to networked if a new top level hierarchy is created, resulting in multiple hierarchies in the system, 4) Update the system to networked when associating multiple parents to one child. |
addMboSetForRequiredCheck, addToDeleteForInsertList, andEvaluateConditions, blindCopy, canDelete, checkFieldAccess, checkMethodAccess, checkMethodAccess, checkQualifiedRestriction, checkSiteOrgAccessForSave, clear, copy, copy, copy, copyFake, copyValue, copyValue, createComm, delete, determineRequiredFieldsFromERM, duplicate, enableMethod, evaluateCondition, evaluateCondition, evaluateCtrlConditions, evaluateCtrlConditions, evaluateRestriction, excludeObjectForPropagate, findAllNullRequiredFields, fireEvent, generateAutoKey, generateContentUID, getAlwaysFlags, getAttrRestrictionFlag, getAttrRestrictions, getBoolean, getByte, getBytes, getCheckpoint, getClientLocale, getClientTimeZone, getCommLogOwnerNameAndUniqueId, getCondition, getDatabaseValue, getDate, getDeleteForInsertList, getDocLinksCount, getDomainFilterWhere, getDomainIDs, getDouble, getESId, getExistingMboSet, getFetchIndex, getFieldExceptions, getFlags, getFloat, getIgnoreLockCheck, getInitialValue, getInsertCompanySetId, getInsertItemSetId, getInsertOrganization, getInsertOrgForSite, getInsertSite, getInstanciatedMboSet, getInstanciatedMboValue, getInt, getIntegrationService, getKeyValue, getLanguageRecordRowStamp, getLinesRelationship, getList, getLockedByDisplayName, getLockedByUserID, getLong, getMatchingAttr, getMatchingAttr, getMatchingAttrs, getMaxMessage, getMboCtx, getMboData, getMboDataSet, getMboForAttribute, getMboForAttributeStatic, getMboInitialValue, getMboList, getMboLogger, getMboRecordData, getMboServer, getMboSet, getMboSet, getMboSetInfo, getMboValue, getMboValueData, getMboValueData, getMboValueData, getMboValueDataForDownload, getMboValueInfoStatic, getMboValueInfoStatic, getMessage, getMessage, getMessage, getMessage, getMXTransaction, getName, getOrgForGL, getOrgSiteForMaxvar, getOwner, getProfile, getPropagateKeyFlag, getProxy, getRecordIdentifer, getRecordMboName, getRelatedWhere, getRelatedWhere, getRelationshipNameToLangTable, getResourceName, getRowRestrictionFlag, getRowStamp, getRowStampObject, getSecurityLogger, getSiteOrg, getSqlLogger, getString, getString, getStringInBaseLanguage, getStringInSpecificLocale, getStringTransparent, getSynonymValueWhere, getTenantId, getThisMboSet, getTranslator, getUniqueIdentifer, getUniqueIDName, getUniqueIDValue, getUniqueLanguageIDRecord, getUserInfo, getUserName, getValidateOrder, hasFieldAccess, hasHierarchyLink, hasLockSaveRights, hasRelatedQbe, hasUniqueID, initFieldFlagsOnMbo, initRelationship, isApiBatchError, isAutoKeyed, isBasedOn, isChangeByUserWhenSetFromLookup, isEAuditFieldModified, isESigFieldModified, isFlagSet, isForDM, isLocked, isLocked, isLockedByMe, isMasterTenant, isMboLockedByMe, isModified, isModified, isNew, isNoSql, isNull, isOptionGranted, isSelected, isSkipCopyField, isValid, isZombie, lock, modify, moveFieldFlagsToMboValue, needCallInitFieldFlag, orEvaluateConditions, propagateKeyValue, removeCtx, removeRelatedSet, resolveNoSqlWhere, rollbackToCheckpoint, select, setAppDefaultValue, setApplicationError, setApplicationRequired, setAutokeyFields, setCopyDefaults, setDefaultValue, setDefaultValues, setDeleted, setEAuditFieldModified, setESId, setESigFieldModified, setFetchIndex, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlags, setFlag, setFlag, setFlags, setForDM, setHierarchyLink, setIgnoreRecordLockCheck, setLangCodeDefault, setMboCtx, setMLValue, setModified, setModifiedForIntegrationOnly, setNewMbo, setNoSql, setPropagateKeyFlag, setPropagateKeyFlag, setProxy, setReadonlyWhenParentIsReadonly, setReferencedMbo, setReferencedMbo, setResolveNoSqlWhere, setResourceName, setUniqueIDValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueFromSequence, setValueNull, setValueNull, sigopGranted, sigopGranted, sigopGranted, sigOptionAccessAuthorized, smartFill, smartFind, smartFind, smartFindByObjectName, smartFindByObjectName, smartFindByObjectNameDirect, startCheckpoint, thisToBeUpdated, toBeAdded, toBeDeleted, toBeSaved, toBeUpdated, toBeValidated, undelete, unlock, unselect, useDataSecurity, validate, validateAttributes, validateKeyUniqueness, valueChanged
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addMboSetForRequiredCheck, addToDeleteForInsertList, blindCopy, checkMethodAccess, clear, copy, copy, copy, copyFake, copyValue, copyValue, createComm, delete, duplicate, evaluateCondition, evaluateCtrlConditions, evaluateCtrlConditions, excludeObjectForPropagate, generateAutoKey, getBoolean, getByte, getBytes, getCommLogOwnerNameAndUniqueId, getDatabaseValue, getDate, getDeleteForInsertList, getDocLinksCount, getDomainIDs, getDouble, getExistingMboSet, getFlags, getFloat, getIgnoreLockCheck, getInitialValue, getInsertCompanySetId, getInsertItemSetId, getInsertOrganization, getInsertSite, getInt, getKeyValue, getLinesRelationship, getList, getLockedByDisplayName, getLong, getMatchingAttr, getMatchingAttr, getMatchingAttrs, getMaxMessage, getMboData, getMboDataSet, getMboInitialValue, getMboList, getMboSet, getMboSet, getMboValueData, getMboValueData, getMboValueData, getMboValueDataForDownload, getMboValueInfoStatic, getMboValueInfoStatic, getMessage, getMessage, getMessage, getMessage, getMXTransaction, getName, getOrgForGL, getOrgSiteForMaxvar, getOwner, getPropagateKeyFlag, getRecordIdentifer, getSiteOrg, getString, getString, getStringInBaseLanguage, getStringInSpecificLocale, getStringTransparent, getThisMboSet, getUniqueIDName, getUniqueIDValue, getUserInfo, getUserName, hasHierarchyLink, hasLockSaveRights, isAutoKeyed, isBasedOn, isFlagSet, isForDM, isLocked, isLocked, isMasterTenant, isMboLockedByMe, isModified, isModified, isNew, isNull, isOptionGranted, isSelected, isZombie, lock, propagateKeyValue, rollbackToCheckpoint, select, setApplicationError, setApplicationRequired, setAutokeyFields, setCopyDefaults, setDeleted, setESigFieldModified, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlags, setFlag, setFlag, setFlags, setForDM, setIgnoreRecordLockCheck, setMLValue, setModified, setNewMbo, setPropagateKeyFlag, setPropagateKeyFlag, setReferencedMbo, setReferencedMbo, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueNull, setValueNull, sigopGranted, sigopGranted, sigopGranted, sigOptionAccessAuthorized, smartFill, smartFind, smartFind, smartFindByObjectName, smartFindByObjectName, smartFindByObjectNameDirect, startCheckpoint, thisToBeUpdated, toBeAdded, toBeDeleted, toBeSaved, toBeUpdated, toBeValidated, undelete, unlock, unselect, validate, validateAttributes
public LocHierarchy(MboSet ms) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void init() throws MXException
init
in class Mbo
MXException
public void add() throws MXException, java.rmi.RemoteException
add
in interface MboRemote
add
in class Mbo
MXApplicationException("locations",
- "LocHierarchyNoAdd")is thrown
when owner is null or owner is not locations and if it is not a
lochierarchy or children setMXException
java.rmi.RemoteException
public void appValidate() throws MXException, java.rmi.RemoteException
appValidate
in class Mbo
MXException
java.rmi.RemoteException
public void save() throws MXException, java.rmi.RemoteException
LOCATION | PARENT |
---|---|
BOSTON | |
WEST | BOSTON |
W560 | WEST |
W-MAINST | W560 |
MH101 | W-MAINST |
Adding this new Lochierarchy will result in creating the following LocAncestor records:
LOCATION | ANCESTOR |
---|---|
1001 | 1001 |
1001 | MH101 |
1001 | W-MAINST |
1001 | W560 |
1001 | WEST |
1001 | BOSTON |
MXException
java.rmi.RemoteException
public boolean isNetworked() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void delete(long access) throws MXException, java.rmi.RemoteException
delete
in interface MboRemote
delete
in class Mbo
access
- modifier such as NOACCESCHECK.MXApplicationException("locations","canNotCallDelete")
- is thrown
when deleteOption is not equal to DISCONNECTALL i.e all nodes
are not disconnected in a hierarchy.MXException
java.rmi.RemoteException
LocHierarchy.connectLocationAndChildrenToParent
,
LocHierarchy.disconnectLocationAndChildrenFromSystem
,
LocHierarchy.makeLocationTopLevel
public void connectLocationAndChildrenToParent() throws MXException, java.rmi.RemoteException
LOCATION | PARENT |
---|---|
BOSTON | |
WEST | BOSTON |
W560 | WEST |
W-MAINST | W560 |
MH101 | W-MAINST |
1001 | MH101 |
1002 | 1001 |
AFTER the operation, the Location and Parent hierarchy becomes:
LOCATION | PARENT |
---|---|
BOSTON | |
WEST | BOSTON |
W560 | WEST |
W-MAINST | W560 |
MH101 | W-MAINST |
1001 | W-MAINST |
1002 | 1001 |
connectLocationAndChildrenToParent
in interface LocHierarchyRemote
MXException
java.rmi.RemoteException
LocHierarchy.disconnectLocationAndChildrenFromSystem
,
LocHierarchy.makeLocationTopLevel
public void disconnectLocationAndChildrenFromSystem() throws MXException, java.rmi.RemoteException
LOCATION | PARENT |
---|---|
BOSTON | |
WEST | BOSTON |
W560 | WEST |
W-MAINST | W560 |
MH101 | W-MAINST |
1001 | MH101 |
1002 | 1001 |
LocAncestor:
LOCATION | ANCESTOR |
---|---|
BOSTON | BOSTON |
WEST | WEST |
WEST | BOSTON |
W560 | W560 |
W560 | WEST |
W560 | BOSTON |
W-MAINST | W-MAINST |
W-MAINST | W560 |
W-MAINST | WEST |
W-MAINST | BOSTON |
MH101 | MH101 |
MH101 | W-MAINST |
MH101 | W560 |
MH101 | WEST |
MH101 | BOSTON |
1001 | 1001 |
1001 | MH101 |
1001 | W-MAINST |
1001 | W560 |
1001 | WEST |
1001 | BOSTON |
1002 | 1002 |
1002 | 1001 |
1002 | MH101 |
1002 | W-MAINST |
1002 | W560 |
1002 | WEST |
1002 | BOSTON |
Disconnecting 1001 and children will result in:
LocHierarchy:
LOCATION | PARENT |
---|---|
BOSTON | |
WEST | BOSTON |
W560 | WEST |
W-MAINST | W560 |
MH101 | W-MAINST |
LocAncestor:
LOCATION | ANCESTOR |
---|---|
BOSTON | BOSTON |
WEST | WEST |
WEST | BOSTON |
W560 | W560 |
W560 | WEST |
W560 | BOSTON |
W-MAINST | W-MAINST |
W-MAINST | W560 |
W-MAINST | WEST |
W-MAINST | BOSTON |
MH101 | MH101 |
MH101 | W-MAINST |
MH101 | W560 |
MH101 | WEST |
MH101 | BOSTON |
disconnectLocationAndChildrenFromSystem
in interface LocHierarchyRemote
MXException
java.rmi.RemoteException
LocHierarchy.connectLocationAndChildrenToParent
,
LocHierarchy.makeLocationTopLevel
public void makeLocationTopLevel() throws MXException, java.rmi.RemoteException
LOCATION | PARENT |
---|---|
BOSTON | |
WEST | BOSTON |
W560 | WEST |
W-MAINST | W560 |
MH101 | W-MAINST |
1001 | MH101 |
1002 | 1001 |
LocAncestor:
LOCATION | ANCESTOR |
---|---|
BOSTON | BOSTON |
WEST | WEST |
WEST | BOSTON |
W560 | W560 |
W560 | WEST |
W560 | BOSTON |
W-MAINST | W-MAINST |
W-MAINST | W560 |
W-MAINST | WEST |
W-MAINST | BOSTON |
MH101 | MH101 |
MH101 | W-MAINST |
MH101 | W560 |
MH101 | WEST |
MH101 | BOSTON |
1001 | 1001 |
1001 | MH101 |
1001 | W-MAINST |
1001 | W560 |
1001 | WEST |
1001 | BOSTON |
1002 | 1002 |
1002 | 1001 |
1002 | MH101 |
1002 | W-MAINST |
1002 | W560 |
1002 | WEST |
1002 | BOSTON |
AFTER making top 1001 top level:
LocHierarchy:
LOCATION | PARENT |
---|---|
BOSTON | |
WEST | BOSTON |
W560 | WEST |
W-MAINST | W560 |
MH101 | W-MAINST |
1001 | |
1002 | 1001 |
LocAncestor:
LOCATION | ANCESTOR |
---|---|
BOSTON | BOSTON |
WEST | WEST |
WEST | BOSTON |
W560 | W560 |
W560 | WEST |
W560 | BOSTON |
W-MAINST | W-MAINST |
W-MAINST | W560 |
W-MAINST | WEST |
W-MAINST | BOSTON |
MH101 | MH101 |
MH101 | W-MAINST |
MH101 | W560 |
MH101 | WEST |
MH101 | BOSTON |
1001 | 1001 |
1002 | 1002 |
1002 | 1001 |
makeLocationTopLevel
in interface LocHierarchyRemote
MXApplicationException("locations","invalidprocess")
- is thrown
when it is the primary systemMXException
java.rmi.RemoteException
LocHierarchy.connectLocationAndChildrenToParent
,
LocHierarchy.disconnectLocationAndChildrenFromSystem
public MboRemote getOwningLocSystem() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void changeSysToNetworked() throws MXException, java.rmi.RemoteException
MXApplicationException("locations","invalidlocsystem")
- is thrown
when location system is null or invalid.MXException
java.rmi.RemoteException
public MboSetRemote getParents() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public MboSetRemote getChildren() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public boolean isTop() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public boolean hasChildren() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public boolean hasParents() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public java.lang.String[] getHierarchies() throws MXException, java.rmi.RemoteException
LOCATION | PARENT |
---|---|
BOSTON | |
WEST | BOSTON |
W560 | WEST |
W-MAINST | W560 |
MH101 | W-MAINST |
1001 | MH101 |
1002 | 1001 |
MXException
java.rmi.RemoteException
public MboSetRemote getTop() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public MboSetRemote getMboSet(java.lang.String name) throws MXException, java.rmi.RemoteException
getMboSet
in interface MboRemote
getMboSet
in class Mbo
name
- The relationship provided to retrieve a
related mboSet, usually using foreign keys.
For example,
"psdi.app.workorder.WOSetRemote.ASSET" is
a relationship for the work order object to
access the asset Set where
"workorder.assetnum=asset.assetnum". The relationship can
also be chained. Such as ASSET.ASSETSTATUS.MXException
- "A relationship called {0} does not exist
for the {1} business object" exception
will be thrown if the relationship was not
found.
"Unknown Object" exception will be thrown
if the database object can not be
found through the relationship.java.rmi.RemoteException
Mbo.getMboSet(String)