psdi.app.location

Class LocSystem

  • All Implemented Interfaces:
    java.rmi.Remote, LocSystemRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class LocSystem
    extends Mbo
    implements LocSystemRemote
    MBO to represent a system. A system is an organization of locations. See the Location package description for details.

    This is a site level object.

    The key attributes for this object are SiteId and SystemId. The attributes in this object are as follows:

    Attribute NameDescription
    DescriptionDescription of the system. Long description enabled.
    DocType Unused attribute. Will be removed in a future release.
    GISParam1 thru GISParam3Unused attributes. Will be removed in a future release.
    LDKeyLong Description Key. This is a link to text stored in the LongDescription table.
    LocationNon persistent attribute to represent the operating location belonging to this system.
    Network Indicates whether or not this is a networked system. N indicates that the system is hierarchical.
    OrgIdIdentifier of the organization for this system.
    SiteIdIdentifier of the site for this system.
    SystemIdIdentifier for this system.
    ExternalRefId, OwnerSysId, SourceSysIdColumns used by the MAXIMO E-commerce Adaptor (MEA).
    See Also:
    Location, LocHierarchy, LocAncestor, psdi.app.location.LocAuth, LocStatus, LocOper, LocationSpec
    • Constructor Detail

      • LocSystem

        public LocSystem(MboSet ms)
                  throws MXException,
                         java.rmi.RemoteException
        Construct the LocSystem object
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Initailzation rountine. Always read-only fields has their READONLY flag set here.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add Routine This add method will set the default values for Systemid, description, network of LocSystem object Systemid = 0 Description = 0 Network = Readonly (always)
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Check whether this system is referenced by any location in LocHierarchy Can this object be deleted ?
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException("locations", - "deletelocsystem")is thrown when locsystem exists.
        MXException
        java.rmi.RemoteException
      • getNumberOfSystemsForSite

        public int getNumberOfSystemsForSite(java.lang.String siteid)
                                      throws MXException,
                                             java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Check if there is one and only one primary system in a site
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • isLocAncestorAlreadyMarkedForDeletion

        public boolean isLocAncestorAlreadyMarkedForDeletion(java.lang.String locancestorid)
                                                      throws MXException,
                                                             java.rmi.RemoteException
        used for networked systems only. Checks to see if the LocAncestor identified by 'locancestorid' has already been marked for deletion. The same LocAncestor could be processed multiple times in a networked system because a node may have more than one parent, and a node can also be an ancestor and descendant to the same node.
        Parameters:
        locancestorid - unique identifier of the LocAncestor that will be marked for deletion if it has not already been marked for deletion earlier in the process.
        Throws:
        MXException
        java.rmi.RemoteException
      • recordLocHierarchyDeletedLocAncestors

        public void recordLocHierarchyDeletedLocAncestors(java.util.Vector deletedLocAncestors)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        used for networked systems only. This method sets the vector of LocAncestor records already marked for deletion in this LocHierarchySet's ancestor and owning LocHierarchy sets during this recursive process. This occurs during a modification to the LocHierarchy's system. A system modification is the removal of a parent or child within a system.
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        10-20078: at save() time, query database to see if a locsystem entered via a different session also has primarysystem=1 - to prevent more than one primary systems in one site
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • setCurrentPrimaryInMemory

        public void setCurrentPrimaryInMemory(MboRemote currentPrimary)
                                       throws MXException,
                                              java.rmi.RemoteException
        10-20811:
        Parameters:
        currentPrimary -
        Throws:
        MXException
        java.rmi.RemoteException