psdi.app.asset

Class AssetSet

    • Field Detail

      • PLUSCASSETSTATUS

        public static final java.lang.String PLUSCASSETSTATUS
        See Also:
        Constant Field Values
    • Method Detail

      • getAssetsMovedDirectly

        protected java.util.Vector getAssetsMovedDirectly()
                                                   throws MXException,
                                                          java.rmi.RemoteException
        returns Vector populated in moveAsset(). The Vector contains all asset whose location, parent and/or site information has been modified directly in through the UI. This provides a way to check that an asset that is a child of another directly modified asset is not moved twice in the same transaction, once through the UI and again as the parent asset's new location, parent and/or site information is rolled down in the MoveDetails object.
        Returns:
        Vector movedDirectly
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        moveAsset
      • moveGLAccount

        protected boolean moveGLAccount(MboRemote asset)
                                 throws MXException,
                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • fromWO

        protected boolean fromWO()
                          throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
      • moveSingleAsset

        public void moveSingleAsset(Asset asset)
                             throws MXException,
                                    java.rmi.RemoteException
        initiates an Asset move by calling the appropriate Asset methods depending on whether or not the destination location is an inventory type location and whether or not the asset being moved is rotating or not. Checks if the asset has any open workorders, open PO's, open PR's. Takes care of cross org functionality.
        Specified by:
        moveSingleAsset in interface AssetSetRemote
        Parameters:
        asset - Asset to be moved
        Throws:
        MXApplicationException - ("asset", "newsiteundefined") MXApplicationException("asset", "cantmovemodify") MXApplicationException("locations", "invalidlocationsite", params) MXApplicationException("asset", "newstatusundefined", params)
        MXException
        java.rmi.RemoteException
        See Also:
        AssetSet.moveSingleAsset(Asset asset)
      • findAsset

        public void findAsset(java.lang.String asset)
                       throws MXException,
                              java.rmi.RemoteException
        selects from the Asset table the record possessing the Assetnum passed to this method
        Specified by:
        findAsset in interface AssetSetRemote
        Parameters:
        asset - Asset that will be used to query the Asset table
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        AssetSet.findAsset(String asset)
      • setLocsystem

        public void setLocsystem(java.lang.String locationSystem)
                          throws MXException,
                                 java.rmi.RemoteException
        sets the userpref value used to filter Asset records in the result set by operating location systemid. Only those Asset records that have an operating location in the specified system will be accessible.
        Specified by:
        setLocsystem in interface AssetSetRemote
        Parameters:
        locationSystem - userpref setting for the location system
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        AssetSet.setLocsystem(String locationSystem)
      • setLocgroup

        public void setLocgroup(java.util.Vector locationGroup)
                         throws MXException,
                                java.rmi.RemoteException
        sets the userpref value used to filter Asset records in the result set by operating location. Only those Asset records that have an operating location in the specified Vector of operating locations will be accessible.
        Specified by:
        setLocgroup in interface AssetSetRemote
        Parameters:
        locationGroup - userpref setting for the location group. This setting is a Vector containing all operating locations to be included in resulting Asset set.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.AssetSet#setLocgroup(String locationGroup)
      • getLocsystem

        public java.lang.String getLocsystem()
                                      throws MXException,
                                             java.rmi.RemoteException
        gets the operating location systemid filter set by the user
        Specified by:
        getLocsystem in interface AssetSetRemote
        Returns:
        userpref setting for the location system
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        setLocsystem
      • getLocgroup

        public java.lang.String getLocgroup()
                                     throws MXException,
                                            java.rmi.RemoteException
        gets the operating location filter set by the user
        Specified by:
        getLocgroup in interface AssetSetRemote
        Returns:
        userpref setting for the location group
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        setLocgroup
      • getUserPrefWhere

        public java.lang.String getUserPrefWhere()
        overrides the MboSet getUserPrefWhere() to return a userpref where clause which is appended to the existing whereClause. This is called by the framework to allow any app specific modifications to the whereClause.
        Overrides:
        getUserPrefWhere in class MboSet
        Returns:
        The userpref where clause.
      • findAssetAtLocation

        public void findAssetAtLocation(java.lang.String location)
                                 throws MXException,
                                        java.rmi.RemoteException
        find the asset records for the location, choosing only one asset in a hierarchy. If multiple asset in the hierarchy are found at the same location, choose the highest level node.
        Specified by:
        findAssetAtLocation in interface AssetSetRemote
        Parameters:
        location - the location where the asset is.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.AssetSet#findAssetForLocation(String location)
      • getWoNum

        protected java.lang.String getWoNum()
                                     throws MXException,
                                            java.rmi.RemoteException
        returns the wonum if move equipment is launched from a work order. added for 041104
        Throws:
        MXException
        java.rmi.RemoteException
      • getPoNum

        protected java.lang.String getPoNum()
                                     throws MXException,
                                            java.rmi.RemoteException
        returns the ponum if move equipment is launched from a purchase order added for 041104
        Throws:
        MXException
        java.rmi.RemoteException
      • getPoSiteId

        protected java.lang.String getPoSiteId()
                                        throws MXException,
                                               java.rmi.RemoteException
        returns the positeid if move asset is launched from a purchase order
        Throws:
        MXException
        java.rmi.RemoteException
      • applyAssetMoveDefaults

        public void applyAssetMoveDefaults(AssetMoveDfltSetRemote assetMoveDfltSet,
                                           java.lang.String applytype)
                                    throws MXException,
                                           java.rmi.RemoteException
        Sets the specific default value or all the values to the set of assets
        Specified by:
        applyAssetMoveDefaults in interface AssetSetRemote
        Parameters:
        assetMoveDflt - Nonpersistant object which stores the default values
        applytype - Type of value (parent or location or bin or all)
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.AssetSet#applyAssetMoveDefaults(AssetMoveDflt assetMoveDflt, String applytype)
      • getChildren

        public MboValueData[][] getChildren(java.lang.String object,
                                            java.lang.String key,
                                            java.lang.String[] attrs,
                                            int maxRows)
                                     throws MXException,
                                            java.rmi.RemoteException
        Returns zero or more children objects in the hierarchy.
        Specified by:
        getChildren in interface HierarchicalMboSetRemote
        Parameters:
        object - - name of the object whose children are being requested.
        key - - unique id of the object whose children are being fetched.
        attrs - - list of attributes whose values are requested, the attribute data returned in the attribute list correspond to this list.
        maxRows - - maximum number of rows to return.
        Returns:
        MboValueData[][] - contains an array of Object name, Object key, hasChildren flag, hasParents flag, list of attributes data from the passed attributes list.
        Throws:
        MXException
        java.rmi.RemoteException
      • getParent

        public MboValueData[] getParent(java.lang.String object,
                                        java.lang.String key,
                                        java.lang.String[] attrs)
                                 throws MXException,
                                        java.rmi.RemoteException
        Returns zero or one parent object for the given object in the hierarchy. This method returns the immediate parent object of the given object.
        Specified by:
        getParent in interface HierarchicalMboSetRemote
        Parameters:
        object - - name of the object whose children are being requested.
        key - - unique id of the object whose children are being fetched.
        attrs - - list of attributes whose values are requested, the attribute data returned in the attribute list correspond to this list.
        Returns:
        MboValueData[] - contains Object name, Object key, hasChildren flag, hasParents flag, list of attributes data from the passed attributes list.
        Throws:
        MXException
        java.rmi.RemoteException
      • getSiblings

        public MboValueData[][] getSiblings(java.lang.String object,
                                            java.lang.String key,
                                            java.lang.String[] attrs,
                                            int maxRows)
                                     throws MXException,
                                            java.rmi.RemoteException
        Returns zero or more siblings of the given object in the hierarchy.
        Specified by:
        getSiblings in interface HierarchicalMboSetRemote
        Parameters:
        object - - name of the object whose children are being requested.
        key - - unique id of the object whose children are being fetched.
        attrs - - list of attributes whose values are requested, the attribute data returned in the attribute list correspond to this list.
        maxRows - - maximum number of rows to return.
        Returns:
        MboValueData[][] - contains an array of Object name, Object key, hasChildren flag, hasParents flag, list of attributes data from the passed attributes list.
        Throws:
        MXException
        java.rmi.RemoteException
      • getTop

        public MboValueData[][] getTop(java.lang.String[] attrs,
                                       int maxRows)
                                throws MXException,
                                       java.rmi.RemoteException
        Returns all the top level objects in the hierarchy, i.e. objects that do not have parents.
        Specified by:
        getTop in interface HierarchicalMboSetRemote
        Parameters:
        attrs - - list of attributes whose values are requested, the attribute data returned in the attribute list correspond to this list.
        maxRows - - maximum number of rows to return.
        Returns:
        MboValueData[][] - contains an array of Object name, Object key, hasChildren flag, hasParents flag, list of attributes data from the passed attributes list.
        Throws:
        MXException
        java.rmi.RemoteException
      • getPathToTop

        public MboValueData[][] getPathToTop(java.lang.String object,
                                             java.lang.String key,
                                             java.lang.String[] attrs,
                                             int maxRows)
                                      throws MXException,
                                             java.rmi.RemoteException
        Returns all objects in the path to the top from the current object, i.e. every parent of the object in a sequence.
        Specified by:
        getPathToTop in interface HierarchicalMboSetRemote
        Parameters:
        object - - name of the object whose children are being requested.
        key - - unique id of the object whose children are being fetched.
        attrs - - list of attributes whose values are requested, the attribute data returned in the attribute list correspond to this list.
        maxRows - - maximum number of rows to return.
        Returns:
        MboValueData[][] - contains an array of Object name, Object key, hasChildren flag, hasParents flag, list of attributes data from the passed attributes list.
        Throws:
        MXException
        java.rmi.RemoteException
      • zeroCosts

        public void zeroCosts(boolean ytd,
                              boolean total)
                       throws MXException,
                              java.rmi.RemoteException
        sets Asset cost attributes to zero.
        Specified by:
        zeroCosts in interface AssetSetRemote
        Parameters:
        ytd - zero out this Asset's year-to-date cost?
        total - zero out this Asset's total cost?
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.zeroCosts(boolean, boolean)
      • addAssetsToCollectDetails

        public void addAssetsToCollectDetails(java.lang.String collectionNum)
                                       throws MXException,
                                              java.rmi.RemoteException
        Add Assets to Collections, on a selected list of Asset's or a single Asset. Issue#08-21577
        Specified by:
        addAssetsToCollectDetails in interface AssetSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#addAssetsToCollectDetails()
      • setItemMbo

        public void setItemMbo(MboRemote item)
                        throws MXException,
                               java.rmi.RemoteException
        08-15967: for performance
        Parameters:
        item -
        Throws:
        MXException
        java.rmi.RemoteException
      • setItemOrgInfo

        public void setItemOrgInfo(MboRemote itemOrgInfo)
                            throws MXException,
                                   java.rmi.RemoteException
        08-15967: for performance
        Parameters:
        item -
        Throws:
        MXException
        java.rmi.RemoteException
      • getItemMbo

        public MboRemote getItemMbo()
                             throws MXException,
                                    java.rmi.RemoteException
        08-15967: for performance
        Parameters:
        item -
        Throws:
        MXException
        java.rmi.RemoteException
      • getItemOrgInfo

        public MboRemote getItemOrgInfo()
                                 throws MXException,
                                        java.rmi.RemoteException
        08-15967: for performance
        Parameters:
        item -
        Throws:
        MXException
        java.rmi.RemoteException
      • inventoryLocationHasChecked

        public void inventoryLocationHasChecked(java.lang.String location,
                                                java.lang.String siteid)
                                         throws MXException,
                                                java.rmi.RemoteException
        08-15967: to reduce location mbos being instantiated in createMAtRecTrans - Receive Rotating assets
        Parameters:
        hasChecked -
        Throws:
        MXException
        java.rmi.RemoteException
      • toCheckInventoryLocation

        public boolean toCheckInventoryLocation()
                                         throws MXException,
                                                java.rmi.RemoteException
        08-15967: to reduce location mbos being instantiated in createMAtRecTrans - Receive Rotating assets
        Parameters:
        hasChecked -
        Throws:
        MXException
        java.rmi.RemoteException
      • setAssetForSpecifications

        public void setAssetForSpecifications(MboRemote asseet)
                                       throws MXException,
                                              java.rmi.RemoteException
        09-14550
        Parameters:
        asseet -
        Throws:
        MXException
        java.rmi.RemoteException
      • getAssetForSpecifications

        public MboRemote getAssetForSpecifications()
                                            throws MXException,
                                                   java.rmi.RemoteException
        09-14550
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • storeAssetsInMultiAssetLocCISet

        public void storeAssetsInMultiAssetLocCISet(MboSetRemote malcSet)
                                             throws java.rmi.RemoteException,
                                                    MXException
        09-15293: pre-store all the assets being moved in MultiAssetLocCI table in the hashtable
        Parameters:
        malcSet -
        Throws:
        java.rmi.RemoteException
        MXException
      • isInMassMoveLocation

        public boolean isInMassMoveLocation()
                                     throws MXException,
                                            java.rmi.RemoteException
        09-16727
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • inMassMoveNewLocationMbo

        public MboRemote inMassMoveNewLocationMbo()
                                           throws MXException,
                                                  java.rmi.RemoteException
        09-16727
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • filterByLinearAsset

        public void filterByLinearAsset(MboSetRemote fltrSet)
                                 throws MXException,
                                        java.rmi.RemoteException
        This method filters Asset records by Linear asset.
        Specified by:
        filterByLinearAsset in interface AssetSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#filterByLinearAsset()
      • getSqlForFiltering

        public java.lang.String getSqlForFiltering(MboSetRemote fltrSet)
                                            throws MXException,
                                                   java.rmi.RemoteException
        This method builds the SQL string for filtering Asset records based on linear asset.
        Parameters:
        fltrSet - the set to be filtered
        Returns:
        the SQL string for filtering
        Throws:
        MXException
        java.rmi.RemoteException
      • getOriginalAssetQbe

        public java.util.Hashtable getOriginalAssetQbe()
                                                throws MXException,
                                                       java.rmi.RemoteException
        Specified by:
        getOriginalAssetQbe in interface AssetSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#getOriginalAssetQbe()
      • setOriginalAssetUserWhere

        public void setOriginalAssetUserWhere(java.lang.String inWhere)
                                       throws MXException,
                                              java.rmi.RemoteException
        Specified by:
        setOriginalAssetUserWhere in interface AssetSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#setOriginalAssetUserWhere()
      • setOriginalAssetQbe

        public void setOriginalAssetQbe(java.util.Hashtable inQbe)
                                 throws MXException,
                                        java.rmi.RemoteException
        Specified by:
        setOriginalAssetQbe in interface AssetSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#setOriginalAssetQbe()
      • addWorkZones

        public void addWorkZones(java.lang.String workzone,
                                 java.lang.String type,
                                 java.lang.String orgid)
                          throws MXException,
                                 java.rmi.RemoteException
        Specified by:
        addWorkZones in interface AssetSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#addWorkZones()
      • changeStatus

        public void changeStatus(java.lang.String status,
                                 boolean rollToAllChildren,
                                 boolean removeFromActiveRoutes,
                                 boolean removeFromActiveSP,
                                 boolean changePMStatus)
                          throws MXException,
                                 java.rmi.RemoteException
        Change the status of the Asset(s) Depending of the check boxes of the Status dialog box - change the status of all children assets - remove asset reference from all active job plan - remove asset reference from all active routes - remove asset reference from all active safety plans - make asset's PM inactive If the status of the asset is changing to NOT READY or OPERATING, check if the PM's are in 'ACTIVE' status and have forecast and delete the PM forecast. Used for background process of change status.
        Specified by:
        changeStatus in interface AssetSetRemote
        Parameters:
        status - New status
        rollToAllChildren - Flag indicate if the status is rolled to all children
        removeFromActiveRoutes - Flag indicates if asset reference from all active routes need to be removed
        removeFromActiveSP - Flag indicates if asset reference from all active safety plans need to be removed
        changePMStatus - Flag indicates if asset reference from all active PM need to be removed
        changedStatusPMs - Hashtable with the PM's whose status is changed
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#changeStatus()
      • getMaxAppsWhere

        public java.lang.String getMaxAppsWhere()
                                         throws MXException,
                                                java.rmi.RemoteException
        IV90199: In Receiving app and Shipment Receiving app, there is a app restriction internal=:NO on the MAXAPPS table. In Move/Modify the AssetSet is appended to the restriction. When user selects More Assets and tries to select the records back to the AssetSet, it had a database error INTERNAL is not valid. Asset table does not have a column called INTERNAL
        Overrides:
        getMaxAppsWhere in class MboSet
        Returns:
        The app restriction where clause
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Calls this method.