psdi.app.asset

Class Asset

  • All Implemented Interfaces:
    AutoLocatable, CombinedLBS, GISable, LBS, AddressableMbo, java.rmi.Remote, AssetRemote, AncMbo, AppActionInterface, HierarchicalMboRemote, LinkedMboRemote, MboConstants, MboRemote, StatefulMboRemote, MaxRemoteProxy


    public class Asset
    extends StatefulMbo
    implements AssetRemote, MboRemote, LinkedMboRemote, HierarchicalMboRemote, AncMbo, AddressableMbo
    MBO object to represent Asset. See Asset package description for details.

    This is a site level object.

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

    The attributes in this object are as follows:

    Attribute NameDescription
    AssettagIn-house accounting identification for this asset.
    AutoWogenY/N flag indicating whether, upon entry or update of a meterreading, the work order generation process should be started.
    BinnumInventory bin number. Binnum applies to rotating asset only.
    BudgetcostThe budget for the year for work on this asset.
    CalnumCalendar used to specify when this asset object is normally in operation.
    ChangeBy,ChangeDateName of the user who last modified this asset object. This attribute defaults to the current user unless another value is provided. Date this asset object was last modified.This attribute defaults to the MXServer date/time unless another value is provided.
    ChildrenBoolean flag that indicates whether this asset is a parent to at least one other asset.
    ClassificationObsolete-to be removed in a future release.
    ClassStructureIdClass structure identifier. Class structures are the hierarchies of classifications (for example, centrifugal or rotarty pumps) around which assets can be organized.
    DescriptionShort description for this object. A long description may be associated with this object via the Ldkey attribute.
    DisabledBoolean flag to indicate whether or not this asset is disabled. This differs from the Isrunning attribute. An asset cannot be running if it is disabled. Nothing can be done with a disabled asset.
    AssetnumUnique identifier for this asset.
    FailurecodeTop level of the failure hierarchy applied to this asset.
    GlaccountGeneral ledger account.
    GroupNameMeter group associated with this asset. When the meter group is applied, AssetMeters for this asset will be created for all meters in the meter group.
    InstalldateDate asset was installed.
    InvcostApplies only to not capitalized, rotating asset. A rotating asset shares attributes of both asset and items. As an asset, rotating asset is an asset against which work orders can be created. Inventory Costis the repair cost accumulated against this rotating asset on a work order when the work order 'Chargestore' attribute is set to true. The Inventory costs are accrued from labor,material, service and tool usage on the work order. Inventory costs also come from services received directly to a not capitalized, rotating asset when the po line chargestore attribute is set to true. As an item, rotating asset can be issued as material to a work order created against another asset. If the default cost for not capitalized rotating items is set to asset Cost, then inventory cost is the cost charged to work orders to which not capitalized rotating items/asset are issued. When the rotating asset is issued to a workorder the Inventory Cost is added to the Average Cost for the rotating asset. The Inventory Cost is then set to 0 (zero). If the rotating item/asset is then returned from the work order, the Inventory Cost is set to the Average Cost.
    IsrunningBoolean flag to indicate whether this asset object is up (true) or down (false). The default is true. This value is set by the work order object.
    ItemnumIdentifier for the item related to this asset object. A non-null value for this attribute indicates that this object is stocked asset that can be stored in inventory and used as rotating stock.
    ItemSetIdItem set identifier for the asset. ItemSetId applies only to rotating assets and will subsequently be null and read-only if the Itemnum attribute is null.
    LdkeyLong description key.
    LocationPhysical location of this asset.
    ManufacturerIdentification code for the manufacturer of this asset. Manufacturer need not exist in the Companies table.
    OrgIdIdentifier of the organization for this asset.
    ParentAssetnum for this asset object's parent. An asset can have zero or one parent. The parent, however, may have multiple children.
    PriorityCopied to work orders created for this asset, asset priority can be used in conjunction with work order priority to determine the importance of this asset's work orders versus other work orders during peventive work order generation.
    PurchasepriceOriginal purchase price or capital cost.
    ReplacecostCurrent replacement cost for an identical or substitute asset.
    RotsuspacctRotating repairs general ledger suspense account.Used in apply item assembly structure for the rotating child asset.
    SerialnumManufacturer's identification number for this asset object.
    SiteIdIdentifier of the site for this asset.
    StatusdateDate of most recent status change, from up (Isrunning = true) to down (Isrunning = false) or vice versa, for this asset.
    TotalcostTotal cost of all transactions written to matusetrans, labtrans, tooltrans and servrectrans against this asset and any of its children, that is, subassemblies.
    TotdowntimeTotal time that this asset has been down, that is, not operational. This value is updated by the work order object.
    TotunchargedcostObsolete-to be removed in a future release.
    UnchargedcostObsolete-to be removed in a future release.
    VendorIdentification code for the vendor of this asset.
    WarrantyexpdateDate manufacturer's warranty expires.
    YtdcostYear-to-date cost of all transactions written to matusetrans, labtrans, tooltrans and servrectrans against this asset and any of its children, that is, subassemblies.
    Externalrefid, Ownersysid, SourcesysidUsed by MAXIMO Enterprise Adapter(MEA) for interface to external financial system
    Eq1 - Eq24Extra fields.
    See Also:
    Item, POLine, WO
    • Field Detail

      • invBalVector

        public static java.util.Vector invBalVector
        Deprecated. 
        When Apply IAS launched from the Receive Rotating Items page, multiple rotating asset could be created - instantiated by different Asset. If the rotating asset goes to a STOREROOM location, INVBALANCES will be added/updated. To avoid "records have been updated by another user" problem resulting from many instances of INVBALANCES trying to update one single INVBALANCES record, this vector keeps track of the InvBalances references.
      • inventoryVector

        public static java.util.Vector inventoryVector
        Deprecated. 
        When Apply IAS launched from the Receive Rotating Items page, multiple rotating asset could be created - instantiated by different Asset. If the rotating asset goes to a STOREROOM location, INVENTORY will be added/updated. To avoid "records have been updated by another user" problem resulting from many instances of INVENTORY trying to update one single INVENTORY record, this vector keeps track of the Inventory references.
      • newAssetForAssetMove

        public boolean newAssetForAssetMove
        Flag is set if the new asset is created in 'Asset move', used in save() for updating parent
      • matRecTransAlreadyCreated

        public boolean matRecTransAlreadyCreated
        Flag is set if the matrectrans record has already been created
      • assetTransAlreadyCreated

        public boolean assetTransAlreadyCreated
        Flag is set if the assettrans record has already been created
      • createNewAssetNum

        public boolean createNewAssetNum
        Flag is set in checkNewAssetSite(), is used to set field 'NewAssetNum' to read/write
      • assetsMovedDirectly

        public java.util.Vector assetsMovedDirectly
        Reference to the vector of set of assets moved
      • ifNewChild_ThisEqMustAlreadyExist

        protected boolean ifNewChild_ThisEqMustAlreadyExist
        if this Asset is being added as a child in a hierarchy, must it already exist in the Asset table in the database? If false, then this asset can be added as new while being added as a child, for example when receiving rotating assets. If true, then this asset cannot be added as new while being added as a child, for example in the Subassemblies table window on the Spare Parts tab of Assets.
      • sameAssetMovedBackForAssetMove

        public boolean sameAssetMovedBackForAssetMove
        IV46140: Indicates this asset is the same asset moved back to the original site
      • isFromAssetTemplate

        public boolean isFromAssetTemplate
        IV73397:indicates this asset is created by AssetTemplate because the asset template code just conveniently using newAssetForAssetMove to prevent from creating assetmeter even though it is not cross-site move assets
      • PLUSC_OP_RGE_FROM

        public static final java.lang.String PLUSC_OP_RGE_FROM
        See Also:
        Constant Field Values
      • PLUSC_IS_CON_DESC

        public static final java.lang.String PLUSC_IS_CON_DESC
        See Also:
        Constant Field Values
      • PLUSC_IS_CON_DESC_LONGDESC

        public static final java.lang.String PLUSC_IS_CON_DESC_LONGDESC
        See Also:
        Constant Field Values
      • PLUSC_IS_MTE_CLASS

        public static final java.lang.String PLUSC_IS_MTE_CLASS
        See Also:
        Constant Field Values
      • PLUSC_DUE_DATE_NP

        public static final java.lang.String PLUSC_DUE_DATE_NP
        See Also:
        Constant Field Values
      • PLUSC_IS_CALIBRATION

        public static final java.lang.String PLUSC_IS_CALIBRATION
        See Also:
        Constant Field Values
      • children

        protected MboSetRemote children
        children asset

        See Also:
        getChildren
      • rollStatusToChildren

        public boolean rollStatusToChildren
    • Method Detail

      • init

        public void init()
                  throws MXException
        initialization rountine. This sets the READONLY flags both for those fields that are always read only and those that are editable only during insert.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • setLinearAssetAttrFlags

        protected void setLinearAssetAttrFlags()
                                        throws MXException,
                                               java.rmi.RemoteException
        set linear asset attributes to be read/write if Asset.IsLinear is true; otherwise, the linear asset attributes are READONLY
        Throws:
        MXException
        java.rmi.RemoteException
      • canToggleIsLinear

        protected void canToggleIsLinear()
                                  throws MXException,
                                         java.rmi.RemoteException
        Can this asset's IsLinear flag be toggled?
        Throws:
        MXApplicationException("item", - "itemCannotToggleIsKit") if InvBalances exist for the item
        MXApplicationException("item", - "itemCannotKitLottedItem") if item is lotted, item cannot be a kit
        MXException
        java.rmi.RemoteException
      • initFieldFlagsOnMbo

        public void initFieldFlagsOnMbo(java.lang.String attrName)
                                 throws MXException
        Description copied from class: Mbo
        The logic of setting the readonly and required field flags to the mbo. Any setting of the field flags that require expensive operation, such as database query should be moved from init() to this method. However, those which don't require steps such as fetching Mbos can be left in init(). You can group the logic for a few attributes together if logic of deciding their flag is the same, or in other words, can be handled at once.
        Overrides:
        initFieldFlagsOnMbo in class Mbo
        Throws:
        MXException
      • getAssetMeterNowDate

        public java.util.Date getAssetMeterNowDate()
                                            throws MXException,
                                                   java.rmi.RemoteException
        called to establish a current date to be used when obtaining the most recent historical meter readings for all of this Asset's AssetMeters. This is so the date used in the SQL WHERE clause is the same for all AssetMeters belonging to this Asset.
        Specified by:
        getAssetMeterNowDate in interface AssetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.AssetMeter.getPreviousMeterReading()
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        called whenever a field is modified to update the changedate and changeby attributes
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        sets field defaults for a new Asset object
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • canModifySubAssembly

        protected void canModifySubAssembly()
                                     throws MXException,
                                            java.rmi.RemoteException
        Determines if a child asset can be removed from its hierarchy. Cannot build or break a hierarchy if the child or the parent is in the inventory location.
        Throws:
        MXApplicationException("asset","cantAddChildOrParent")
        MXException
        java.rmi.RemoteException
      • updateDesc

        public void updateDesc()
                        throws MXException,
                               java.rmi.RemoteException
        sets the description field to the generated value obtained from the setup of the classstructureid (in asset catalog setup) and the values/measureunits in the assetspec set.
        Specified by:
        updateDesc in interface AssetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.updateDesc()
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        saves this Asset object. If classstructure has been modified, this method also updates the Description attribute deletes the obsolete AssetSpec sets.
        Overrides:
        save in class StatefulMbo
        Throws:
        MXApplicationException("asset", - "ReqFieldItem") if the item field is empty for inventory location
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long modifier)
                    throws MXException,
                           java.rmi.RemoteException
        delete this Asset object and references to it
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        modifier - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • deleteReconLink

        protected void deleteReconLink(long modifier)
                                throws MXException,
                                       java.rmi.RemoteException
        If asset is deleted, reset tloamispromoted flag and delete the recon link which link asset to the deployed asset
        Parameters:
        modifier -
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        answers question: Can this asset be deleted ? Asset cannot be deleted for many reasons. But they can be removed from sets of child asset. This removal translates into the clearing of the asset's parent attribute. Deletion will only be allowed if there is no reference to this Asset object in any of the following places:

        WORKORDER, SERVICECONTRACT, POLINE, PRLINE, MRLINE, INVOICECOST, JPASSETSPLINK, LOCKOUT, MATUSETRANS, SAFETYLEXICON, SPRELATEDASSET, SPWORKASSET, TAGOUT, PM, WORKORDER*, POLINE*, PRLINE* or MRLINE*.

        *if the WORKORDER, PO, PR or MR has a status of CANCEL or CLOSE, that is, if historyflag=true, then asset deletion is not stopped

        Additionally, an Asset object that has children,cannot be deleted

        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException("asset","assetexistintables",params) - if Asset is referenced in any of above listed tables
        MXApplicationException("asset","assetexistsintables_active") - if Asset is on an open work order, an open purchase order, an open purchase requisition or an open material request
        MXApplicationException("asset","subrelation",params) - if Asset has children
        MXException
        java.rmi.RemoteException
        See Also:
        delete
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Perform regular appValidate() in regularAppValidate() and process LinkMbo's deletion.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • isInventoryTypeLocation

        public boolean isInventoryTypeLocation()
                                        throws MXException,
                                               java.rmi.RemoteException
        checks if this Asset object's location is an inventory-type location, that is, STOREROOM, LABOR or COURIER.
        Specified by:
        isInventoryTypeLocation in interface AssetRemote
        Returns:
        true if location is a store room OR location is a courier or labor AND item is not null. Otherwise, false is returned.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.isInventoryTypeLocation()
      • isInventoryLocation

        public boolean isInventoryLocation()
                                    throws MXException,
                                           java.rmi.RemoteException
        checks if this Asset object's location is an inventory-type location, that is, STOREROOM, LABOR or COURIER
        Specified by:
        isInventoryLocation in interface AssetRemote
        Returns:
        true if location is a store room, courier or labor Otherwise, false is returned.
        Throws:
        MXException
        java.rmi.RemoteException
      • isDecommissionedLocation

        public boolean isDecommissionedLocation()
                                         throws MXException,
                                                java.rmi.RemoteException
        checks if this Asset object's location is a decommissioned location, that is, status is "DECOMMISSIONED"
        Returns:
        true if location is in decommissioned status Otherwise, false is returned.
        Throws:
        MXException
        java.rmi.RemoteException
      • isInventoryTypeDestinationLocation

        protected boolean isInventoryTypeDestinationLocation()
                                                      throws MXException,
                                                             java.rmi.RemoteException
        when an asset move is initiated, checks if this Asset object's new location is an inventory-type location, that is, STOREROOM, LABOR or COURIER
        Returns:
        true if location is a store room OR location is a courier or labor AND item is not null. Otherwise, false is returned.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FldMoveModifyNewLocation.validate, AssetSet.moveAsset
      • isStoreDestinationLocation

        protected boolean isStoreDestinationLocation()
                                              throws MXException,
                                                     java.rmi.RemoteException
        checks if this Asset object's new location is a STOREROOM
        Returns:
        true if location is a store room AND item is not null. Otherwise, false is returned.
        Throws:
        MXException
        java.rmi.RemoteException
      • getBinnum

        public void getBinnum()
                       throws MXException,
                              java.rmi.RemoteException
        gets the binnum from Inventory if the itemnum/location combination is in inventory table.

        Throws:
        MXApplicationException("asset","nosuchinventory") - if the combination does not exist in inventory
        MXException
        java.rmi.RemoteException
        See Also:
        FldAssetLocation.action(), FldAssetItemnum.action()
      • notifyNewInventory

        protected void notifyNewInventory(boolean needToCreate)
                                   throws MXException,
                                          java.rmi.RemoteException
        if the itemnum/location entered does not exist in the inventory, we will need to create a new inventory record.
        Parameters:
        needToCreate - true indicates that a new Inventory record needs to be created false indicates that a invnetory record already exists.
        Throws:
        MXException
        java.rmi.RemoteException
      • getBinnumForDestinationLocation

        protected void getBinnumForDestinationLocation()
                                                throws MXException,
                                                       java.rmi.RemoteException
        gets the binnum from Inventory if the itemnum/location combination is in inventory table.

        Throws:
        MXApplicationException("asset","nosuchinventory") - if the combination does not exist in inventory
        MXException
        java.rmi.RemoteException
        See Also:
        FldAssetLocation.action(), FldAssetItemnum.action()
      • isRotating

        public boolean isRotating()
                           throws MXException,
                                  java.rmi.RemoteException
        checks if this Asset object is rotating

        Specified by:
        isRotating in interface AssetRemote
        Returns:
        true if this Asset object has a non-null Itemnum attribute and the itemnum exists in the Item table as a rotating item. Otherwise, false is returned.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.isRotating()
      • recordAssetStatusChange

        public void recordAssetStatusChange(MboRemote woMbo,
                                            java.util.Date changeDate,
                                            java.lang.String code,
                                            boolean operational)
                                     throws MXException,
                                            java.rmi.RemoteException
        changes asset status from isrunning=true to isrunning=false or vice versa. This process results in the writing of one new AssetStatus mbo to the database. If, prior to this status change, the most recent AssetStatus record for this Asset object has its Isrunning attribute=false, then the process also results in an update of this already-existing AssetStatus record.

        Specified by:
        recordAssetStatusChange in interface AssetRemote
        Parameters:
        woMbo - work order mbo from which this object has been created
        changeDate - date on which the status change is occurring. This value is from the MXServer by default. The UI can override the default.
        code - reason for reported downtime. Valid values are from the DOWNCODE value list.
        operational - boolean that flags an asset status change from isrunning = true to isrunning = false as being Operational, that is, a time when the asset is normally in use, or non-Operational, that is, a time when the asset is not normally in use or its being off line does not affect production.
        Throws:
        MXApplicationException("asset","cannotfindworkorder") - if the MboRemote passed in woMbo is not a work order mbo
        MXApplicationException("asset","providechangedate") - if changeDate is null
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.recordAssetStatusChange(MboRemote woMbo, Date changedate, String code, boolean operational)
      • reportDowntime

        public void reportDowntime(MboRemote woMbo,
                                   java.util.Date startDate,
                                   java.util.Date endDate,
                                   double hoursDown,
                                   java.lang.String code,
                                   boolean operational)
                            throws MXException,
                                   java.rmi.RemoteException
        updates and/or inserts AssetStatus records to complete the two-MBO cycle that brings a piece of Asset from a "DOWN" status (that is, Isrunning=false) to an "UP" status (that is, Isrunning=true), and calculates the downtime, that is, the elapsed time between these two MBOs. Downtime reporting results in the updating of an existing AssetStatus mbo and the writing of a new AssetStatus mbo to the database, or in the writing of two new AssetStatus MBOs to the database.

        when reporting asset down time and Asset.Isrunning before the down time report = ...
        • true - inserts 2 AssetStatus records, one to set isRunning = false, and the other to set isRunning back to true
        • false - updates the most recent AssetStatus for the asset if isRunning=false, and then inserts 1 AssetStatus record to set isRunning back to true.
        Specified by:
        reportDowntime in interface AssetRemote
        Parameters:
        woMbo - work order mbo from which this object has been created

        startDate - start of the down time interval. This can be defaulted to one of three values:

        1. workorder.enterdate
        2. workorder.actstart
        3. the most recent AssetStatus.Changedate for this Asset object if AssetStatus.Isrunning is false
        The UI can override this default.

        endDate - end of the down time interval. This value is from the MXServer by default. The UI can override the default.

        hoursDown - calculation based on interval between startDate and endDate and this asset object's calendar. If object does not have a calendar, that is, Calnum is null, then calculation is just the startDate - endDate interval. UI can, however, override the calculated value. hoursDown may not reflect the actual startDate - endDate interval for two reasons:

        1. calendar associated with this asset object can affect the calculation
        2. UI override does not affect the startDate and endDate values
        code - reason for reported downtime. Valid values are from the DOWNCODE value list. Code should be null when Isrunning is going from true to false.
        operational - boolean that flags an asset status change from isrunning = true to isrunning = false as being Operational, that is, a time when the asset is normally in use, or non-Operational, that is, a time when the asset is not normally in use or its being off line does not affect production.
        Throws:
        MXApplicationException("asset","cannotfindworkorder") - if the MboRemote passed in woMbo is not a work order mbo
        MXApplicationException("asset","downtimedatereq") - if startDate or endDate is null
        MXApplicationException("asset","downtimeenddate") - if startDate is greater than the endDate.
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.reportDowntime(MboRemote woMbo, Date startDate, Date endDate, double hoursDown, String code, boolean operational)
      • getDowntimeReportUpperDateLimit

        protected java.util.Date getDowntimeReportUpperDateLimit()
                                                          throws MXException,
                                                                 java.rmi.RemoteException
        for reporting downtime, returns the date of the beginning of the next already-saved-to-the-database asset downtime report to follow the new, not-yet-saved historic AssetStatus record
        Throws:
        MXException
        java.rmi.RemoteException
      • setDowntimeReportUpperDateLimit

        protected void setDowntimeReportUpperDateLimit(java.util.Date ULDate)
                                                throws MXException,
                                                       java.rmi.RemoteException
        for reporting downtime, sets the date of the beginning of the next already-saved-to-the-database asset downtime report to follow the new, not-yet-saved historic AssetStatus record
        Throws:
        MXException
        java.rmi.RemoteException
      • lastAssetStatusForAssetnum

        public MboRemote lastAssetStatusForAssetnum()
                                             throws MXException,
                                                    java.rmi.RemoteException
        returns the most recent AssetStatus mbo for this Asset object if and only if the most recent AssetStatus.Isrunning = false. Otherwise, null is returned.

        Specified by:
        lastAssetStatusForAssetnum in interface AssetRemote
        Throws:
        MXApplicationException("asset","assetstatupderror") - if AssetStatus mbo Isrunning attribute is true, or if attempt is being made to update this attribute.
        MXException
        java.rmi.RemoteException
        See Also:
        void recordAssetStatusChange(MboRemote woMbo, Date changeDate, String code, boolean operational), void reportDowntime(MboRemote woMbo, Date startDate, Date endDate, double hoursDown, String code,boolean operational)
      • lastUpOrDownAssetStatusForAssetnum

        public MboRemote lastUpOrDownAssetStatusForAssetnum()
                                                     throws MXException,
                                                            java.rmi.RemoteException
        returns the most recent AssetStatus mbo for this Asset object regardless of the AssetStatus.Isrunning value. To insure faster freeing of resources, the Mbo returned belongs to a MboSet marked as DISCARDABLE. As a result, the Mbo is only for reference and cannot be modified.
        Throws:
        MXException
        java.rmi.RemoteException
      • intermediateAssetStatusExists

        public boolean intermediateAssetStatusExists(java.util.Date newDTStart,
                                                     java.util.Date mostRecentNotRunningAssetStatusDate)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateDownTime

        public double calculateDownTime(java.util.Date lastChangeDate,
                                        java.util.Date currentChangeDate)
                                 throws MXException,
                                        java.rmi.RemoteException
        begins the downtime calculation process for Asset objects with and without a calendar. The actual downtime is just the elapsed time in hours. If MaxVars.VarValue is true where VarName="DOWNTIMERPT", then the method to print the downtime report is called.
        Specified by:
        calculateDownTime in interface AssetRemote
        Parameters:
        lastChangeDate - start of down time interval
        currentChangeDate - end of down time interval
        Returns:
        total down time. If MaxVars.VarValue is true where VarName="DOWNTIMERPT", a total downtime of zero is returned to the calling method.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        double calculateDownTime(Date lastChangeDate, Date currentChangeDate, String calnum)
      • issueAsset

        public void issueAsset(java.lang.String newLocation,
                               java.lang.String memo,
                               java.util.Date dateMoved,
                               java.lang.String wonum,
                               boolean checkMismatch,
                               boolean checkOccupied,
                               boolean updateWo,
                               java.lang.String matUseTransID)
                        throws MXException,
                               java.rmi.RemoteException
        interface routine for Inventory Issues App. This method only moves asset out of an inventory type location (for example, a storeroom) to a non-inventory location. It assumes that this asset is rotating and exists in a storeroom. Assumes parameters are valid values. No checking on the issueAsset method. If canIssueAsset method is passed, call doMove method in class MoveDetails to actually move asset.

        Specified by:
        issueAsset in interface AssetRemote
        Parameters:
        newLocation - new location mbo (move to location)
        memo - memo field
        dateMoved - date moved
        wonum - work order number
        checkMismatch - check if rotating asset matches location's item number. If mismatch has been found and the flag is true, stop the move asset process. If the flag is false, ignore the mismatch and continue the move asset process.
        checkOccupied - check if the location is occupied by certain item. If location is occupied and the flag is true, stop the move asset process. If the flag is false, ignore fact that location is already occupied and continue the move asset process.
        updateWo - if true, update priorities on open work order
        matUseTransID - MatUseTrans ID
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.issueAsset(String newLocation, String memo, Date dateMoved, String wonum, boolean checkMismatch, boolean checkOccupied, boolean updateWo, String matUseTransID)
      • returnAsset

        public void returnAsset(java.lang.String newLocation,
                                java.lang.String memo,
                                java.util.Date dateMoved,
                                java.lang.String wonum,
                                java.lang.String newBinnum,
                                java.lang.String ponum,
                                java.lang.String glCreditAcct,
                                java.lang.String glDebitAcct,
                                boolean updateWo,
                                java.lang.String matRecTransID)
                         throws MXException,
                                java.rmi.RemoteException
        interface routine for Inventory Returns App. This method moves asset out of a non-inventory to an inventory(for example, storeroom, courier or labor) location. If canReturnAsset method is passed, call doMove method in class MoveDetails to actually move asset.

        Specified by:
        returnAsset in interface AssetRemote
        Parameters:
        newLocation - - new location mbo (move to location)
        memo - - memo field
        dateMoved - - date moved
        wonum - - work order number
        newBinnum - - new binnum (move to binnum)
        ponum - - po number
        glCreditAcct - - credit gl account
        glDebitAcct - - debit gl account
        updateWo - - update priorities on open work order if the flag is true.
        matRecTransID - - MatRecTrans ID
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.returnAsset(String newLocation, String memo, Date dateMoved, String wonum, String newBinnum, String ponum, String glCreditAcct, String glDebitAcct, boolean updateWo, String matRecTransID)
      • canReturnAsset

        public void canReturnAsset(java.lang.String newLocation,
                                   java.lang.String memo,
                                   java.util.Date dateMoved,
                                   java.lang.String wonum,
                                   java.lang.String newBinnum,
                                   java.lang.String ponum,
                                   java.lang.String glCreditAcct,
                                   java.lang.String glDebitAcct,
                                   boolean updateWo,
                                   java.lang.String matRecTransID)
                            throws MXException,
                                   java.rmi.RemoteException
        checks the target location, sets parameters and flags, and calls the setupMove in class MoveDetails to prepare the move.

        Parameters:
        newLocation - - new location mbo (move to location)
        memo - - memo field
        dateMoved - - date moved
        wonum - - work order number
        newBinnum - - new binnum (move to binnum)
        ponum - - po number
        glCreditAcct - - credit gl account
        glDebitAcct - - debit gl account
        updateWo - - update priorities on open work order if the flag is true.
        matRecTransID - - MatRecTrans ID
        Throws:
        MXApplicationException("asset","notvalidrotatingasset") - if the Asset object's itemnum is null, or if the itemnum's Item object does not have its rotating attribute set to true.
        MXException
        java.rmi.RemoteException
        See Also:
        returnAsset
      • returnAssetForAsset

        public void returnAssetForAsset(java.lang.String newLocation,
                                        java.lang.String memo,
                                        java.util.Date dateMoved,
                                        java.lang.String wonum,
                                        java.lang.String newBinnum,
                                        java.lang.String ponum,
                                        java.lang.String glCreditAcct,
                                        java.lang.String glDebitAcct,
                                        boolean updateWo)
                                 throws MXException,
                                        java.rmi.RemoteException
        interface routine for Asset/Work Order. This method only moves asset from a non-inventory to an inventory (for example, storeroom, courier or labor) location. If canReturnAsset method is passed, call doMove method in class MoveDetails to actually move asset. Wherever this method is implemented, INVENTORY and INVBALANCES objects must be maintained locally. If the INVENTORY or INVBALANCES does not exist in the RETURN TO location, then it is added on the fly.

        Specified by:
        returnAssetForAsset in interface AssetRemote
        Parameters:
        newLocation - - new location mbo (move to location)
        memo - - memo field
        dateMoved - - date moved
        wonum - - work order number
        newBinnum - - new binnum (move to binnum)
        ponum - - po number
        glCreditAcct - - credit gl account
        glDebitAcct - - debit gl account
        updateWo - - update priorities on open work order if the flag is true
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        AssetSet.moveAsset()
      • moveAssetWithinNonInventory

        public void moveAssetWithinNonInventory(java.lang.String newLocation,
                                                java.lang.String memo,
                                                java.util.Date dateMoved,
                                                java.lang.String enterBy,
                                                java.lang.String wonum,
                                                java.lang.String toParent,
                                                boolean checkMismatch,
                                                boolean checkOccupied,
                                                boolean updateWo)
                                         throws MXException,
                                                java.rmi.RemoteException
        interface routine for Move/Modify Asset. This method only moves asset between non-inventory locations. If canMoveAssetWithinNonInventory method is passed, call doMove method in class MoveDetails to actually move asset.

        Specified by:
        moveAssetWithinNonInventory in interface AssetRemote
        Parameters:
        newLocation - new location mbo (move to location)
        memo - memo field
        dateMoved - date moved
        enterBy - user entering move transaction
        wonum - work order number
        toParent - new parent
        checkMismatch - check if rotating asset matches location's item number.
        If mismatch has been found and the flag is true, stop the move asset process.
        If the flag is false, ignore item number mismatch and continue the move asset process.
        checkOccupied - check if the location is occupied by certain item.
        If location is occupied and the flag is true, stop the move asset process.
        If the flag is false, ignore the fact that the location is already occupied and continue the move asset process.
        updateWo - update priorities on open work order if the flag is true.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.moveAssetWithinNonInventory(String newLocation, String memo, Date dateMoved, String enterBy, String wonum, String toParent, boolean checkMismatch, boolean checkOccupied, boolean updateWo)
      • canMoveAssetWithinNonInventory

        public void canMoveAssetWithinNonInventory(java.lang.String newLocation,
                                                   java.lang.String memo,
                                                   java.util.Date dateMoved,
                                                   java.lang.String enterBy,
                                                   java.lang.String wonum,
                                                   java.lang.String toParent,
                                                   boolean checkMismatch,
                                                   boolean checkOccupied,
                                                   boolean updateWo)
                                            throws MXException,
                                                   java.rmi.RemoteException
        prepares the move between non-inventory locations by checking the target location, ensuring that the asset's itemnum matches the location's itemnum, setting parameters and flags and calling the setupMove in class MoveDetails

        Parameters:
        newLocation - new location mbo (move to location)
        memo - memo field
        dateMoved - date moved
        enterBy - user entering move transaction
        wonum - work order number
        toParent - new parent
        checkMismatch - check if rotating asset matches location's item number.
        If mismatch has been found and the flag is true, stop the move asset process.
        If the flag is false, ignore item number mismatch and continue the move asset process.
        checkOccupied - check if the location is occupied by certain item.
        If location is occupied and the flag is true, stop the move asset process.
        If the flag is false, ignore the fact that the location is already occupied and continue the move asset process.
        updateWo - update priorities on open work order if the flag is true.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        moveAssetWithinNonInventory
      • moveAssetWithinNonInventory

        public void moveAssetWithinNonInventory(java.lang.String newLocation,
                                                java.lang.String memo,
                                                java.util.Date dateMoved,
                                                java.lang.String wonum,
                                                java.lang.String toParent,
                                                boolean checkMismatch,
                                                boolean checkOccupied,
                                                boolean updateWo)
                                         throws MXException,
                                                java.rmi.RemoteException
        interface routine for Move/Modify Asset. This method only moves asset between non-inventory locations. If canMoveAssetWithinNonInventory method is passed, call doMove method in class MoveDetails to actually move asset.

        Specified by:
        moveAssetWithinNonInventory in interface AssetRemote
        Parameters:
        newLocation - new location mbo (move to location)
        memo - memo field
        dateMoved - date moved
        wonum - work order number
        toParent - new parent
        checkMismatch - check if rotating asset matches location's item number.
        If mismatch has been found and the flag is true, stop the move asset process.
        If the flag is false, ignore item number mismatch and continue the move asset process.
        checkOccupied - check if the location is occupied by certain item.
        If location is occupied and the flag is true, stop the move asset process.
        If the flag is false, ignore the fact that the location is already occupied and continue the move asset process.
        updateWo - update priorities on open work order if the flag is true.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.moveAssetWithinNonInventory(String newLocation, String memo, Date dateMoved, String wonum, String toParent, boolean checkMismatch, boolean checkOccupied, boolean updateWo)
      • canMoveAssetWithinNonInventory

        public void canMoveAssetWithinNonInventory(java.lang.String newLocation,
                                                   java.lang.String memo,
                                                   java.util.Date dateMoved,
                                                   java.lang.String wonum,
                                                   java.lang.String toParent,
                                                   boolean checkMismatch,
                                                   boolean checkOccupied,
                                                   boolean updateWo)
                                            throws MXException,
                                                   java.rmi.RemoteException
        prepares the move between non-inventory locations by checking the target location, ensuring that the asset's itemnum matches the location's itemnum, setting parameters and flags and calling the setupMove in class MoveDetails

        Parameters:
        newLocation - new location mbo (move to location)
        memo - memo field
        dateMoved - date moved
        wonum - work order number
        toParent - new parent
        checkMismatch - check if rotating asset matches location's item number.
        If mismatch has been found and the flag is true, stop the move asset process.
        If the flag is false, ignore item number mismatch and continue the move asset process.
        checkOccupied - check if the location is occupied by certain item.
        If location is occupied and the flag is true, stop the move asset process.
        If the flag is false, ignore the fact that the location is already occupied and continue the move asset process.
        updateWo - update priorities on open work order if the flag is true.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        moveAssetWithinNonInventory
      • canMoveAssetWithinInventory

        public void canMoveAssetWithinInventory(java.lang.String newLocation,
                                                java.lang.String memo,
                                                java.util.Date dateMoved,
                                                java.lang.String newBinnum,
                                                java.lang.String ponum,
                                                java.lang.String glCreditAcct,
                                                java.lang.String glDebitAcct,
                                                java.lang.String matRecTransID)
                                         throws MXException,
                                                java.rmi.RemoteException
        checks the target location and gl accounts, sets parameters and flags and calls the setupMove in class MoveDetails to prepare the move

        Parameters:
        newLocation - - new location mbo (move to location)
        memo - - memo field
        dateMoved - - date moved
        newBinnum - - new binnum (move to binnum)
        ponum - - po number
        glCreditAcct - - credit gl account
        glDebitAcct - - debit gl account
        matRecTransID - - MatRecTrans ID
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        moveAssetWithinInventory
      • canMoveAssetWithinInventoryCrossOrgFromHolding

        public void canMoveAssetWithinInventoryCrossOrgFromHolding(java.lang.String newLocation,
                                                                   java.lang.String memo,
                                                                   java.util.Date dateMoved,
                                                                   java.lang.String newBinnum,
                                                                   java.lang.String orgid,
                                                                   java.lang.String glCreditAcct,
                                                                   java.lang.String glDebitAcct,
                                                                   java.lang.String matRecTransID)
                                                            throws MXException,
                                                                   java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • isLocAuthorized

        public void isLocAuthorized(MboRemote ofloc)
                             throws MXException,
                                    java.rmi.RemoteException
        checks if the specified user allowed to access this store room
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        canReturnAsset, canMoveAssetWithinInventory
      • isGLAccountValid

        public void isGLAccountValid(java.lang.String glAccount,
                                     java.lang.String glType)
                              throws MXException,
                                     java.rmi.RemoteException
        check if the given full glaccount is valid

        Parameters:
        glAccount -
        glType - Type of Account credit or debit
        Throws:
        MXApplicationException("asset","glaccountnotfull",params) - if the given full gl account is not valid
        MXException
        java.rmi.RemoteException
        See Also:
        canReturnAsset, canMoveAssetWithinInventory
      • isGLAccountValid

        public void isGLAccountValid(java.lang.String glAccount,
                                     java.lang.String glType,
                                     java.lang.String orgId)
                              throws MXException,
                                     java.rmi.RemoteException
        check if the given full glaccount is valid

        Parameters:
        glAccount -
        glType - Type of Account credit or debit
        orgId -
        Throws:
        MXApplicationException("asset","glaccountnotfull",params) - if the given full gl account is not valid
        MXException
        java.rmi.RemoteException
        See Also:
        canReturnAsset, canMoveAssetWithinInventory
      • isGLAccountPartialValid

        public void isGLAccountPartialValid(java.lang.String glAccount)
                                     throws MXException,
                                            java.rmi.RemoteException
        checks if the given partial glaccount is valid

        Parameters:
        glAccount -
        Throws:
        MXApplicationException("asset","glaccountnotfull",params) - if the given partial gl account is not valid
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.MoveDetails.setMoveDetails
      • isTop

        public boolean isTop()
                      throws MXException,
                             java.rmi.RemoteException
        Is this Asset object top level, that is, is it without a parent?
        Specified by:
        isTop in interface HierarchicalMboRemote
        Returns:
        true if this object's parent attribute is null

        Throws:
        MXException
        java.rmi.RemoteException
      • hasChildren

        public boolean hasChildren()
                            throws MXException,
                                   java.rmi.RemoteException
        Does this Asset object have children?

        Specified by:
        hasChildren in interface HierarchicalMboRemote
        Returns:
        true if this object's children attribute is true
        Throws:
        MXException
        java.rmi.RemoteException
      • hasParents

        public boolean hasParents()
                           throws MXException,
                                  java.rmi.RemoteException
        Does this Asset object have a parent?

        Specified by:
        hasParents in interface HierarchicalMboRemote
        Returns:
        true if this object parent value is not null
        Throws:
        MXException
        java.rmi.RemoteException
      • getParents

        public MboSetRemote getParents()
                                throws MXException,
                                       java.rmi.RemoteException
        gets the MBO set the Asset object that is parent to this Asset object. This set should contain a maximum of one MBO.

        Specified by:
        getParents in interface AssetRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • showHierarchy

        public MboSetRemote showHierarchy()
                                   throws MXException,
                                          java.rmi.RemoteException
        Get a MboSet of of this asset's ancestors.
        Specified by:
        showHierarchy in interface AssetRemote
        Returns:
        MboSetRemote The asset's parents in a MboSet, in the order of top-level, next level, to the current level location.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.showHierarchy()
      • walkUpHierarchy

        public java.util.Vector walkUpHierarchy()
                                         throws MXException,
                                                java.rmi.RemoteException
        Get the Vector of of this asset's ancestors.
        Returns:
        Vector containing this asset's ancestors the current level location.
        Throws:
        MXException
        java.rmi.RemoteException
      • getTop

        public MboSetRemote getTop()
                            throws MXException,
                                   java.rmi.RemoteException
        Get the Asset object that is at the top of this Asset object's hierarchy. Walking up the hierarchy, the top is the first Asset object whose parent attribute is null

        Returns:
        MboSetRemote This asset's top-most ancestor.
        Throws:
        MXException
        java.rmi.RemoteException
      • getHierarchies

        public java.lang.String[] getHierarchies()
                                          throws MXException,
                                                 java.rmi.RemoteException
        not used by the Asset object. As a method within the HierarchicalMboRemote interface, however, getHierarchies must be implemented. This satisfies that requirement.

        Throws:
        MXException
        java.rmi.RemoteException
      • alreadyAppliedIAS

        public boolean alreadyAppliedIAS()
                                  throws MXException,
                                         java.rmi.RemoteException
        identifies whether Item Assembly Structure (IAS) has already been applied to this piece of asset.

        Specified by:
        alreadyAppliedIAS in interface AssetRemote
        Returns:
        true if IAS has already been applied
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.alreadyAppliedIAS()
      • applyIAS

        public void applyIAS(boolean autokey)
                      throws MXException,
                             java.rmi.RemoteException
        applies Item Assembly Structure (IAS) to this Asset object. The Asset mbo does not have to have an assetnum and does not have to have been saved. This method does NOT check to determine whether IAS was already applied.

        Specified by:
        applyIAS in interface AssetRemote
        Parameters:
        autokey - if true, Asset method autoKeyAll will be called. This is to allow the MAXIMO Integration Gateway (MIG) to autokey all the assetnums when it applies an IAS. The autokey methods can be called independently if this parameter is false.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.applyIAS(boolean autokey)
      • applyIASAutoNumAll

        public void applyIASAutoNumAll()
                                throws MXException,
                                       java.rmi.RemoteException
        Auto key the rotating child asset when apply IAS is being done on this asset.
        Specified by:
        applyIASAutoNumAll in interface AssetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.asset#applyIASAutoNumAll()
      • applyIASCreateChild

        public MboRemote applyIASCreateChild(MboRemote itemStruct,
                                             boolean autokey)
                                      throws MXException,
                                             java.rmi.RemoteException
        Applies IAS for the asset based on the next level rotating item specified in the passed ItemStruct; ie, create a child asset.
        Specified by:
        applyIASCreateChild in interface AssetRemote
        Parameters:
        itemStruct - the asset.item's rotating child.
        autokey - true to autokey the new asset and the new pms.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#applyIASCreate(MboRemote itemStruct,boolean autokey)
      • isAssetBeingCreatedViaApplyIAS

        public boolean isAssetBeingCreatedViaApplyIAS()
                                               throws java.rmi.RemoteException
        Specified by:
        isAssetBeingCreatedViaApplyIAS in interface AssetRemote
        Returns:
        flag that indicates if this new asset is being created via Apply IAS. This is so pmmeter metername validation does not take place if the new asset is also having pm's and pmmeters generated.
        Throws:
        java.rmi.RemoteException
        See Also:
        Asset.isAssetBeingCreatedViaApplyIAS()
      • autoKeyAll

        public void autoKeyAll(boolean doChildren)
                        throws MXException,
                               java.rmi.RemoteException
        when applying an Item Assembly Structure (IAS), begins the process of generating autokeyed assetnums for all rotating itemnums in the IAS, propagating these newly autokeyed assetnums to related objects in SPAREPART, PM and ASSET, and generating autokeyed pmnums wherever a PM is needed in the IAS

        Specified by:
        autoKeyAll in interface AssetRemote
        Parameters:
        doChildren - if true, assetnums and pmnums will be automatically autokeyed and propagated to related objects for all the rotating items from the top to the bottom of the Item Assembly Structure. If false, then the autokey-related methods will need to be called independently for each rotating itemnum in the IAS to generate and propagate the assetnums and pmnums.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.autoKeyAll(boolean doChildren)
      • autoKeyAssetnumForChildSet

        public void autoKeyAssetnumForChildSet(boolean doChildren)
                                        throws MXException,
                                               java.rmi.RemoteException
        when applying an Item Assembly Structure (IAS), coordinates the creation of assetnums and the propagation of these newly autokeyed assetnums to related objects in SPAREPART, PM and ASSET

        Specified by:
        autoKeyAssetnumForChildSet in interface AssetRemote
        Parameters:
        doChildren - if true, this method walks from the top to the bottom of the IAS performing its functionality on each node
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.autoKeyAssetnumForChildSet(boolean doChildren)
      • autoKeyPmnumForSet

        public void autoKeyPmnumForSet(boolean doChildren)
                                throws MXException,
                                       java.rmi.RemoteException
        when applying an Item Assembly Structure (IAS), creates autokeyed pmnums wherever a pmnum is needed for each rotating asset from the top to the bottom of the IAS

        Specified by:
        autoKeyPmnumForSet in interface AssetRemote
        Parameters:
        doChildren - if true, this method walks from the top to the bottom of the IAS performing its functionality on each node
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.autoKeyPmnumForSet(boolean doChildren)
      • setParent

        public void setParent(java.lang.String newParent)
                       throws MXException,
                              java.rmi.RemoteException
        used by Item Assembly Structure (IAS) to set the value of the parent attribute

        Specified by:
        setParent in interface AssetRemote
        Parameters:
        newParent - String value that represents this Asset object's parent assetnum
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        setChildrenFlag
      • getMyChildAssetSet

        public MboSetRemote getMyChildAssetSet()
                                        throws MXException,
                                               java.rmi.RemoteException
        used by Apply IAS

        Specified by:
        getMyChildAssetSet in interface AssetRemote
        Returns:
        MBO set of child asset to this Asset object created in ItemStruct
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        acceptMyNewSet
      • getMySparePartSet

        public MboSetRemote getMySparePartSet()
                                       throws MXException,
                                              java.rmi.RemoteException
        used by Apply IAS

        Specified by:
        getMySparePartSet in interface AssetRemote
        Returns:
        MBO set of spare parts for this Asset object created in ItemStruct
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        acceptMyNewSet
      • getMyPMSet

        public MboSetRemote getMyPMSet()
                                throws MXException,
                                       java.rmi.RemoteException
        used by Apply IAS

        Specified by:
        getMyPMSet in interface AssetRemote
        Returns:
        MBO set of PMs for this Asset object created in ItemStruct
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        acceptMyNewSet
      • getMyParent

        public MboRemote getMyParent()
                              throws MXException,
                                     java.rmi.RemoteException
        used by Apply IAS

        Specified by:
        getMyParent in interface AssetRemote
        Returns:
        if the owner of this object is also an Asset object, the owning Asset MBO is returned. Otherwise, null is returned
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.getMyParent()
      • getChild

        public MboRemote getChild(int row)
                           throws MXException,
                                  java.rmi.RemoteException
        used by Apply IAS

        Specified by:
        getChild in interface AssetRemote
        Parameters:
        row - index to the set of asset children created in ItemStruct
        Returns:
        the Asset MBO specified by the parameter from the set of child Asset created in ItemStruct
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.getChild(int row)
      • getValidateOrder

        public java.lang.String[] getValidateOrder()
        validation order for asset attributes
        Overrides:
        getValidateOrder in class Mbo
        Returns:
        String array containing the asset attributes in the order in which they are to be validated
      • appendDescription

        public void appendDescription(java.lang.String descSpec)
                               throws MXException,
                                      java.rmi.RemoteException
        appends the passed description from an AssetSpec to the Asset.Description attribute The method needs to get classtructure related description first. The classtructure related description should only be gotten one time.

        Parameters:
        descSpec - the numvalue/alnvalue + measureunitid/abbreviation from one AssetSpec object
        Throws:
        MXException
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        overrides the skipCopyField() in the Mbo. While this Asset MBO is being copied, this method checks if each attribute needs to be copied by using the data from the static HashSet skipFieldCopy. This method also checks whether certain attributes whose "to copy or not to copy" status is instance-specific and cannot be added to the static HashSet should be copied for this object. These attributes, Location, Binnum and Rotsuspacct, are only copied if this Asset object is rotating. Furthermore, Location and Binnum will only be copied if the rotating asset's Location attribute is an Inventory-type location, that is, STOREROOM, COURIER or LABOR.
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        MboValueInfo - object of the MboValue that needs to be copied.
        Returns:
        true if the field does not need to be copied. Otherwise, false is returned.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        Asset.loadSkipFieldCopyHashSet()
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        duplicates Asset and related objects.
        The duplicated Asset's assetnum will be an autokeyed value if autokey is enabled. If autokey is not enabled, the assetnum will need to be provided through the UI.

        Related objects that will also be duplicated are:

        • Doclinks
        • SparePart
        • AssetSpec
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Returns:
        the newly duplicated Asset MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mbo.Mbo#isAutoKeyed.
      • copySpareParts

        public void copySpareParts(MboSetRemote spareParts)
                            throws MXException,
                                   java.rmi.RemoteException
        begins the process to copy the selected MBOs in the passed in SparePart Mbo Set to this Asset object.
        Specified by:
        copySpareParts in interface AssetRemote
        Parameters:
        spareParts - Spare Part Mbo Set to copy to this Asset object. Only those MBOs that have been selected will be copied.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mbo.MboSet#copy(MboSetRemote, String, String)
      • initRelationship

        public void initRelationship(java.lang.String relationName,
                                     MboSetRemote mboSet)
                              throws MXException,
                                     java.rmi.RemoteException
        SafetyLexicon needs to behave differently depending on the relationship it was obtained with (hazards and precautions, hazardous materials, or tagouts). This method saves the relationship name on the SafetyLexiconSet.
        Overrides:
        initRelationship in class Mbo
        Parameters:
        relationName - The relationship name of the related MboSet which need to initialize.
        mboSet - The related MboSet which need to initialize.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        SafetyLexiconSet.setThisRelationName(java.lang.String)
      • validateAssetSite

        public void validateAssetSite(java.lang.String asset_type,
                                      java.lang.String siteid)
                               throws MXException,
                                      java.rmi.RemoteException
        Validates if the asset and site combination already exists in the database
        Specified by:
        validateAssetSite in interface AssetRemote
        Parameters:
        assettype - Asset type, parent or child , used in error message
        siteid - New site specified by the user
        Throws:
        MXApplicationException("asset","assetsiteexists") - if the asset does exists in the given site
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#validateAssetSite()
      • checkForAssetSite

        public void checkForAssetSite(java.lang.String siteid)
                               throws MXException,
                                      java.rmi.RemoteException
        Validates if the asset and its children and site combination already exists in the database
        Specified by:
        checkForAssetSite in interface AssetRemote
        Parameters:
        siteid - New site specified by the user
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#checkForAssetSite()
      • checkForChildrenAssetSite

        public void checkForChildrenAssetSite(java.lang.String siteid)
                                       throws MXException,
                                              java.rmi.RemoteException
        Validates if the asset's children and site combination already exists in the database
        Specified by:
        checkForChildrenAssetSite in interface AssetRemote
        Parameters:
        siteid - Site specified by the user
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#checkForChildrenAssetSite()
      • setWoNumAssetMv

        public void setWoNumAssetMv(java.lang.String wonum)
                             throws MXException,
                                    java.rmi.RemoteException
        Sets the workorder number when asset is moved in workorder app
        Parameters:
        wonum - Workorder number where asset is moved
        Throws:
        MXException
        java.rmi.RemoteException
      • setPoNumAssetMv

        public void setPoNumAssetMv(java.lang.String ponum)
                             throws MXException,
                                    java.rmi.RemoteException
        Sets the Purchase order number when asset is moved in PO app
        Parameters:
        ponum - Purchase order number where asset is moved
        Throws:
        MXException
        java.rmi.RemoteException
      • setAssetLocationNull

        protected Asset setAssetLocationNull(java.lang.String oldSiteId)
                                      throws MXException,
                                             java.rmi.RemoteException
        Sets the asset and its children locations to null
        Parameters:
        oldSiteId - Siteid of the asset to be moved, required when asset is moved back to the previous site
        Returns:
        New asset created
        Throws:
        MXException
        java.rmi.RemoteException
      • createAssetTransNewLocNull

        protected void createAssetTransNewLocNull(boolean assetChild)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Create Asset Transaction if the new location is set to null
        Throws:
        MXException
        java.rmi.RemoteException
      • checkWOPOPRStatus

        protected void checkWOPOPRStatus()
                                  throws MXException,
                                         java.rmi.RemoteException
        Checks if the asset and it's childrenn has open WO, PO or PR's
        Throws:
        MXException
        java.rmi.RemoteException
      • getClearDupSeqNumsOnMeterGroupChange

        public boolean getClearDupSeqNumsOnMeterGroupChange()
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • checkForDuplicateMeterSequenceValues

        public void checkForDuplicateMeterSequenceValues()
                                                  throws MXException,
                                                         java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • rollMaintHierarchyToAllChildren

        protected void rollMaintHierarchyToAllChildren(boolean mainthierchy)
                                                throws MXException,
                                                       java.rmi.RemoteException
        roll maintain hierarchy to all its children assets
        Parameters:
        mainthierchy -
        Throws:
        MXException
        java.rmi.RemoteException
      • getStatusHistory

        protected MboSetRemote getStatusHistory()
                                         throws MXException,
                                                java.rmi.RemoteException
        Return the assetstatus object. Required for statefullness.
        Specified by:
        getStatusHistory in class StatefulMbo
        Returns:
        The set of ASSETSTATUS records
        Throws:
        MXException
        java.rmi.RemoteException
      • getStatusHandler

        protected StatusHandler getStatusHandler()
        Return a status handler with the help of which the asset status changes can be done.
        Specified by:
        getStatusHandler in class StatefulMbo
      • canChangeStatus

        public void canChangeStatus(java.lang.String changeToStatus,
                                    long accessModifier)
                             throws MXException,
                                    java.rmi.RemoteException
        Identifies whether the status of this object be changed to the specified value. If status change is not allowed, an exception is thrown. Status changes to same status as the current status are denied. Status changes to another synonym of the current status's MaxValue are always allowed.
        Overrides:
        canChangeStatus in class StatefulMbo
        Parameters:
        changeToStatus - The new desired status. This is the translated status (that is, the status code as it would have been entered by a user, or valuelist.value), not the internal status value ( valuelist.maxvalue).
        accessModifier - If set to NOACCESSCHECK, allows status changes when not normally allowed.
        Throws:
        MXException - Thrown if the status cannot be changed.
        java.rmi.RemoteException
      • changeStatus

        public void changeStatus(java.lang.String status,
                                 boolean rollToAllChildren,
                                 boolean removeFromActiveRoutes,
                                 boolean removeFromActiveSP,
                                 boolean changePMStatus,
                                 java.util.Hashtable changedStatusPMs,
                                 LocationRemote topLevelLocationOnStatusChangeFromLocStatChangeRollDown)
                          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
        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
        topLevelLocationOnStatusChangeFromLocStatChangeRollDown - top-level location on location status change that is rolled down the location hierarchy and to any asset hierarchies in the locations. This top-level location is used to keep track of the asset status changes for the entire hierarchy via Location.trackStatusChangedAssetInLocations(long) and {@link psdi.app.location.Location#hasAssetStatusChangedAlready(long)
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Location.trackStatusChangedAssetInLocations(long), Location.hasAssetStatusChangedAlready(long)
      • changeStatus

        public void changeStatus(java.lang.String status,
                                 boolean rollToAllChildren,
                                 boolean removeFromActiveRoutes,
                                 boolean removeFromActiveSP,
                                 boolean changePMStatus,
                                 java.util.Hashtable changedStatusPMs)
                          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
        Specified by:
        changeStatus in interface AssetRemote
        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:
        Asset.changeStatus(java.lang.String,boolean,boolean,boolean,boolean,java.util.Hashtable)
      • deletePMForecast

        protected void deletePMForecast()
                                 throws MXException,
                                        java.rmi.RemoteException
        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.
        Throws:
        MXException
        java.rmi.RemoteException
      • rollStatusToAllChildren

        protected void rollStatusToAllChildren(java.lang.String status,
                                               boolean removeFromActiveRoutes,
                                               boolean removeFromActiveSP,
                                               boolean changePMStatus,
                                               java.util.Hashtable changedStatusPMs,
                                               LocationRemote topLevelLocationOnStatusChangeFromLocStatChangeRollDown)
                                        throws MXException,
                                               java.rmi.RemoteException
        Change the status of all children assets
        Throws:
        MXException
        java.rmi.RemoteException
      • rollStatusToAllChildren

        protected void rollStatusToAllChildren(java.lang.String status,
                                               boolean removeFromActiveRoutes,
                                               boolean removeFromActiveSP,
                                               boolean changePMStatus,
                                               java.util.Hashtable changedStatusPMs)
                                        throws MXException,
                                               java.rmi.RemoteException
        Change the status of all children assets
        Throws:
        MXException
        java.rmi.RemoteException
      • removeReferenceFromActiveRoutes

        protected void removeReferenceFromActiveRoutes()
                                                throws MXException,
                                                       java.rmi.RemoteException
        Remove asset reference from all active routes
        Throws:
        MXException
        java.rmi.RemoteException
      • removeReferenceFromActiveSP

        protected void removeReferenceFromActiveSP()
                                            throws MXException,
                                                   java.rmi.RemoteException
        Remove asset reference from all active safety plans
        Throws:
        MXException
        java.rmi.RemoteException
      • changeStatusPMStatus

        protected void changeStatusPMStatus(java.util.Hashtable changedStatusPMs)
                                     throws MXException,
                                            java.rmi.RemoteException
        make asset's PM inactive
        Throws:
        MXException
        java.rmi.RemoteException
      • createAssetToBeMoved

        public Asset createAssetToBeMoved()
                                   throws MXException,
                                          java.rmi.RemoteException
        When moving an asset across sites, creates the destination site asset or gets the already-existing destination site asset record that represents the asset that is returning to the site via the current ASSET to destination site asset relationship AssetSetRemote.MOVEDASSET.

        When an asset is moved from a site, the asset record is not deleted. Its status is set to DECOMMISSIONED and its ASSET.MOVED flag is set to true. When the asset returns to the site, the ASSET.MOVED flag is set to false and the status is changed to NOT READY.

        Returns:
        newly created destination site asset or the old asset that was previously moved from the destination site
        Throws:
        MXException
        java.rmi.RemoteException
      • setValuesForMboSet

        public void setValuesForMboSet(MboSetRemote mboSet)
                                throws MXException,
                                       java.rmi.RemoteException
        set new site and new assetnum for the mboset passed in Defined for Asset Move functionality
        Parameters:
        mboSet - MboSet
        Throws:
        MXException
        java.rmi.RemoteException
      • validateCopySpecAcrossOrgSite

        public boolean validateCopySpecAcrossOrgSite(java.lang.String siteid)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Validates whether asset specifications can be copied across organizations or across sites
        Parameters:
        siteid - New site
        Returns:
        true if the specification can be copied, else returns false
        Throws:
        MXException
        java.rmi.RemoteException
      • getWarrantyInfo

        public java.util.List getWarrantyInfo(java.util.Date woDate,
                                              boolean isParent)
                                       throws MXException,
                                              java.rmi.RemoteException
        For a given date, get warranty information for this asset
        Specified by:
        getWarrantyInfo in interface AssetRemote
        Parameters:
        Date - woDate date warranty applis to
        isParent - true if is a parent asset
        Returns:
        List Lists of CONTRACTASSET
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.getWarrantyInfo(Date, boolean)
      • getWarrantyInfo

        public java.util.List getWarrantyInfo(java.util.Date woDate,
                                              boolean isParent,
                                              java.lang.String type)
                                       throws MXException,
                                              java.rmi.RemoteException
        For a given date, get warranty information for this asset
        Parameters:
        Date - woDate date warranty applis to
        isParent - true if is a parent asset
        Returns:
        List Lists of CONTRACTASSET
        Throws:
        MXException
        java.rmi.RemoteException
      • getParentAsset

        public MboRemote getParentAsset(java.util.Date date)
                                 throws MXException,
                                        java.rmi.RemoteException
        For a given date, get parent for this asset
        Parameters:
        Date - when the asset has the parent
        Returns:
        Asset parent Asset
        Throws:
        MXException
        java.rmi.RemoteException
      • setAncestorForChildren

        protected void setAncestorForChildren(MboRemote rootParent)
                                       throws MXException,
                                              java.rmi.RemoteException
        Set the root parent to all its children
        Parameters:
        rootParent - This asset's root parent.
        Throws:
        MXException
        java.rmi.RemoteException
      • addMoreAssetsToSet

        public void addMoreAssetsToSet(MboSetRemote selectedMoreMboSet,
                                       MboSetRemote selectedMboSet)
                                throws java.rmi.RemoteException,
                                       MXException
        Adds the more selected assets to the existing selected set
        Specified by:
        addMoreAssetsToSet in interface AssetRemote
        Parameters:
        selectedMoreMboSet - the more selected assets
        selectedMboSet - the selected assets
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        psdi.app.asset.Asset#addMoreAssetsToSet()
      • validateInventoryExists

        protected void validateInventoryExists(java.lang.String location)
                                        throws MXException,
                                               java.rmi.RemoteException
        Determines if the inventory record exists for a given itemnum and location, if not throws exception.
        Parameters:
        location - Location of asset or the newlocation of the asset
        Throws:
        MXApplicationException - (noInventory) thrown if there is no inventory
        MXException
        java.rmi.RemoteException
      • getIssueUnitForItem

        public java.lang.String getIssueUnitForItem(java.lang.String location)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Determines if the inventory record exists for a given itemnum and returns the issueunit for first record found.
        Specified by:
        getIssueUnitForItem in interface AssetRemote
        Parameters:
        location - Location of asset or the newlocation of the asset
        Returns:
        issueunit IssueUnit of the first record found in the inventory for given itemnum and itemsetid
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#getIssueUnitForItem()
      • getIssueUnitForItem

        protected java.lang.String getIssueUnitForItem(java.lang.String location,
                                                       java.lang.String siteid)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Determines if the inventory record exists for a given itemnum and returns the issueunit for first record found.
        Parameters:
        location - Location of asset or the newlocation of the asset
        siteid - siteid of the location
        Returns:
        issueunit IssueUnit of the first record found in the inventory for given itemnum and itemsetid
        Throws:
        MXException
        java.rmi.RemoteException
      • blindCopyFromMboToMbo

        protected void blindCopyFromMboToMbo(AssetRemote mbo)
                                      throws MXException,
                                             java.rmi.RemoteException
        Copies all the information for each of the fields into the passed mbo. This is a straight copy as if to clone the object, it is used to save each mbo queried separately in a set in asset move
        Parameters:
        mbo - cloned mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • copyAssetClassVariables

        protected void copyAssetClassVariables(Asset tempAsset)
                                        throws MXException,
                                               java.rmi.RemoteException
        Copy the class variables from current asset to the passed in asset
        Parameters:
        tempAsset - asset
        Throws:
        MXException
        java.rmi.RemoteException
      • setDefaults

        public void setDefaults(java.lang.String siteid,
                                java.lang.String storeloc)
                         throws MXException,
                                java.rmi.RemoteException
        Sets the value for siteid and storeloc from Default section of 'Issue Items from Storeroom'. Siteid and Storeloc can be used as a default value for new records in the menu. It is called from ITSMEDefaultInfoBean.
        Specified by:
        setDefaults in interface AssetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#setDefaults()
      • createTicket

        public void createTicket(MboRemote tkMbo)
                          throws MXException,
                                 java.rmi.RemoteException
        Sets location, reportedpriority,reportedbyid, orgid and siteid values for the ticket mbo based on asset.
        Specified by:
        createTicket in interface AssetRemote
        Parameters:
        The - ticket mbo inserted for this asset.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#createTicket()
      • createWO

        public void createWO(MboRemote workorderMbo)
                      throws MXException,
                             java.rmi.RemoteException
        Sets location, wopriority,orgid ,siteid and reportedbyid values for the workorder mbo based on asset.
        Specified by:
        createWO in interface AssetRemote
        Parameters:
        The - workorder mbo inserted for this asset
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#createWorkorder()
      • copyAssetToCollectDetailsSet

        public void copyAssetToCollectDetailsSet(MboSetRemote collectionSet)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Add one or multiple Selected Collections to CollectDetails that contains the current Asset. If the current Asset is Decommissioned throw new MXApplicationException("collection", "DecommissionedAsset")
        Specified by:
        copyAssetToCollectDetailsSet in interface AssetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#copyAssetToCollectDetailsSet()
      • createWorkorder

        public MboRemote createWorkorder(java.lang.String jpnum)
                                  throws MXException,
                                         java.rmi.RemoteException
        creates a Workorder with WOCLASS=WORKORDER from Asset.
        Specified by:
        createWorkorder in interface AppActionInterface
        Parameters:
        jpnum - -job plan need be apply to the new work order
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • createChange

        public MboRemote createChange(java.lang.String jpnum)
                               throws MXException,
                                      java.rmi.RemoteException
        creates a Workorder with WOCLASS=CHANGE from Asset.
        Specified by:
        createChange in interface AppActionInterface
        Parameters:
        jpnum - Parameter that refers to a job plan, based on which the change is created.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • createRelease

        public MboRemote createRelease(java.lang.String jpnum)
                                throws MXException,
                                       java.rmi.RemoteException
        creates a Workorder with WOCLASS=RELEASE from Asset.
        Specified by:
        createRelease in interface AppActionInterface
        Parameters:
        jpnum - Parameter that refers to a job plan, based on which the release is created.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • createServiceRequest

        public MboRemote createServiceRequest(java.lang.String tickettemplateid)
                                       throws MXException,
                                              java.rmi.RemoteException
        creates a Ticket with Ticket Type = Service Request from Asset.
        Specified by:
        createServiceRequest in interface AppActionInterface
        Parameters:
        tickettemplateid - Parameter that refers to a ticket template, based on which the service request is created.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • createProblem

        public MboRemote createProblem(java.lang.String tickettemplateid)
                                throws MXException,
                                       java.rmi.RemoteException
        creates a Ticket with Ticket Type = Problem from Asset.
        Specified by:
        createProblem in interface AppActionInterface
        Parameters:
        tickettemplateid - Parameter that refers to a ticket template, based on which the problem is created.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • createIncident

        public MboRemote createIncident(java.lang.String tickettemplateid)
                                 throws MXException,
                                        java.rmi.RemoteException
        creates a Ticket with Ticket Type = Incident from Asset.
        Specified by:
        createIncident in interface AppActionInterface
        Parameters:
        tickettemplateid - Parameter that refers to a ticket template, based on which the incident is created.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • startMeasure

        protected void startMeasure()
                             throws MXException,
                                    java.rmi.RemoteException
        Measure must be between the asset's StartMeasure and EndMeasure. The asset's StartMeasure does not have to be less than EndMeasure, so this measure can be less than StartMeasure as long as it is also greater than the end measure.
        Parameters:
        assetfeatureMbo - AssetFeature mbo
        assetFeatureHistMbo - AssetFeatureHist mbo
        assetFeatureSpecMbo - AssetFeatureSpec mbo
        assetMeterMbo - AssetMeter mbo
        assetSpecMbo - AssetSpec mbo
        assetSpecHistMbo - AssetSpecHist mbo
        measurementMbo - Measurement mbo
        meterReadingMbo - MeterReading mbo
        multiAssetLocCIMbo - MultiAssetLocCI mbo
        pmMbo - PM mbo
        Throws:
        MXApplicationException("asset", - "startendmeasure_boundviolation",params) thrown if there is StartMeasure and EndMeasure bound violation.
        MXException
        java.rmi.RemoteException
      • endMeasure

        protected void endMeasure()
                           throws MXException,
                                  java.rmi.RemoteException
        Measure must be between the asset's StartMeasure and EndMeasure. The asset's StartMeasure does not have to be less than EndMeasure, so this measure can be less than StartMeasure as long as it is also greater than the end measure.
        Parameters:
        assetfeatureMbo - AssetFeature mbo
        assetFeatureHistMbo - AssetFeatureHist mbo
        assetFeatureSpecMbo - AssetFeatureSpec mbo
        assetMeterMbo - AssetMeter mbo
        assetSpecMbo - AssetSpec mbo
        assetSpecHistMbo - AssetSpecHist mbo
        measurementMbo - Measurement mbo
        meterReadingMbo - MeterReading mbo
        multiAssetLocCIMbo - MultiAssetLocCI mbo
        pmMbo - PM mbo
        Throws:
        MXApplicationException("asset", - "startendmeasure_boundviolation",params) thrown if there is StartMeasure and EndMeasure bound violation.
        MXException
        java.rmi.RemoteException
      • copyAdditionalPMAttributes

        public void copyAdditionalPMAttributes(MboRemote copyToMbo,
                                               MboRemote copyFromMbo)
                                        throws MXException,
                                               java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • updateRelatedCI

        public void updateRelatedCI(java.lang.String newlocation,
                                    java.lang.String newsite,
                                    java.lang.String newassetnum,
                                    boolean isChild,
                                    java.lang.String ChangeBy,
                                    java.lang.String ChangeDate)
                             throws MXException,
                                    java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • copyAssetSpecToAssetSpec

        public void copyAssetSpecToAssetSpec(MboRemote newAsset)
                                      throws MXException,
                                             java.rmi.RemoteException
        09-14550: in receive rotating item, if there are attributes and a large number of attributes, use copy in this method, not calling assetcatalogservice.generatspecset to avoid mbosets initiated.
        Parameters:
        newAsset -
        Throws:
        MXException
        java.rmi.RemoteException
      • setInCopyingAssetSpecReceiveRotating

        public void setInCopyingAssetSpecReceiveRotating(boolean inCopying)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        09-14550
        Parameters:
        toCallSuperInAdd -
        Throws:
        MXException
        java.rmi.RemoteException
      • getInCopyingAssetSpecReceiveRotating

        public boolean getInCopyingAssetSpecReceiveRotating()
                                                     throws MXException,
                                                            java.rmi.RemoteException
        09-14550
        Parameters:
        toCallSuperInAdd -
        Throws:
        MXException
        java.rmi.RemoteException
      • setRememberToClearAssesInHash

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

        public void notifyAssetSpecValueChanged(boolean valueChanged)
                                         throws MXException,
                                                java.rmi.RemoteException
        09-16727
        Parameters:
        valueChanged -
        Throws:
        MXException
        java.rmi.RemoteException
      • isAssetSpecSetModified

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

        protected void setCalibrationAssetAttrFlags()
                                             throws MXException,
                                                    java.rmi.RemoteException
        set calibration asset attributes to be read/write if Asset.IsCalibration is true;
        Throws:
        MXException
        java.rmi.RemoteException
      • canToggleIsCalibration

        protected void canToggleIsCalibration()
                                       throws MXException,
                                              java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setPhysicalLoc

        public void setPhysicalLoc()
                            throws MXException,
                                   java.rmi.RemoteException
        Additional Physical Location Field - Issue #93941
        Specified by:
        setPhysicalLoc in interface AssetRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • queryDataSheets

        public void queryDataSheets(PlusCWODSSetRemote woDsSet,
                                    boolean loopCalibrations,
                                    java.util.Date fromDate,
                                    java.util.Date toDate)
                             throws java.rmi.RemoteException,
                                    MXApplicationException,
                                    MXException
        Sets up the where clause of the given WO DS MBO Set to return the list of calibrations in a given time frame for this location
        Specified by:
        queryDataSheets in interface AssetRemote
        Parameters:
        woDsSet - WO DS set whose where clause will be changed
        loopCalibrations - whether to select loop or normal calibrations
        fromDate - start date to be used when filtering results
        toDate - end date to be used when filtering results
        Throws:
        java.rmi.RemoteException
        MXApplicationException
        MXException
      • getTagLocation

        public LocationRemote getTagLocation()
                                      throws java.rmi.RemoteException,
                                             MXException
        Returns the location associated with this asset, if that location can be considered a tag id (i.e., it has only one asset associated with it).
        Specified by:
        getTagLocation in interface AssetRemote
        Returns:
        associated location if it is a tag id, null otherwise.
        Throws:
        java.rmi.RemoteException
        MXException
      • getAssetBeingReplacedByThisInSwap

        public java.lang.String[] getAssetBeingReplacedByThisInSwap()
        Used when swapping assets between each others' operating locations when both assets are instances of the same rotating item, and both locations have the same itemnum.
        Returns:
        the assetBeingReplacedByThisInSwap
      • setAssetBeingReplacedByThisInSwap

        public void setAssetBeingReplacedByThisInSwap(java.lang.String[] assetBeingReplacedByThisInSwap)
        Used when swapping assets between each others' operating locations when both assets are instances of the same rotating item, and both locations have the same itemnum.
        Parameters:
        assetBeingReplacedByThisInSwap - the assetBeingReplacedByThisInSwap to set
      • saveGISData

        public void saveGISData(java.lang.String address,
                                java.lang.String lat,
                                java.lang.String lng)
                         throws MXException,
                                java.rmi.RemoteException
        Description copied from interface: GISable
        Implement the logic to save the GIS Data
        Specified by:
        saveGISData in interface GISable
        Throws:
        MXException
        java.rmi.RemoteException
      • isGISDataReadonly

        public boolean isGISDataReadonly()
                                  throws MXException,
                                         java.rmi.RemoteException
        Description copied from interface: GISable
        Indicate if the current GIS entity is editable or not. Usefull when the coordinates are populated using an external system.
        Specified by:
        isGISDataReadonly in interface GISable
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getLatitudeY

        public java.lang.Double getLatitudeY()
                                      throws MXException,
                                             java.rmi.RemoteException
        Description copied from interface: GISable
        Return a double value with the the Latitude (or Y) coordinate of the current entitty.
        Specified by:
        getLatitudeY in interface GISable
        Returns:
        Double or null
        Throws:
        MXException
        java.rmi.RemoteException
      • getLongitudeX

        public java.lang.Double getLongitudeX()
                                       throws MXException,
                                              java.rmi.RemoteException
        Description copied from interface: GISable
        Return a double value with the the Longitude (or X) coordinate of the current entitty.
        Specified by:
        getLongitudeX in interface GISable
        Returns:
        Double or null
        Throws:
        MXException
        java.rmi.RemoteException
      • getAddressString

        public java.lang.String getAddressString()
                                          throws MXException,
                                                 java.rmi.RemoteException
        Description copied from interface: GISable
        Return a string with the address of the current entitty.
        Specified by:
        getAddressString in interface GISable
        Returns:
        Double or null
        Throws:
        MXException
        java.rmi.RemoteException
      • getMboSet

        public MboSetRemote getMboSet(java.lang.String name)
                               throws MXException,
                                      java.rmi.RemoteException
        Per FSM spec if the asset does not have any Service Address associated
        it will 'use' its location's service address (based on the selected Address System) if any.
        Specified by:
        getMboSet in interface MboRemote
        Overrides:
        getMboSet in class Mbo
        Parameters:
        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.
        Returns:
        The returned related set specified through the relationship.
        Throws:
        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
        See Also:
        Mbo.getMboSet(String)
      • getAutoLocateObject

        public MboRemote getAutoLocateObject()
                                      throws MXException,
                                             java.rmi.RemoteException
        Description copied from interface: AutoLocatable
        Returns an autolocate object instance if present.
        Specified by:
        getAutoLocateObject in interface AutoLocatable
        Returns:
        the auto locate object
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • hasCoords

        public java.lang.Boolean hasCoords()
                                    throws MXException,
                                           java.rmi.RemoteException
        Description copied from interface: GISable
        Check if this autolocatable object has coordinates filled (LAT,LONG)
        Specified by:
        hasCoords in interface GISable
        Returns:
        the boolean
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getAltitude

        public java.lang.Double getAltitude()
                                     throws MXException,
                                            java.rmi.RemoteException
        Specified by:
        getAltitude in interface LBS
        Throws:
        MXException
        java.rmi.RemoteException
      • getHeading

        public java.lang.Double getHeading()
                                    throws MXException,
                                           java.rmi.RemoteException
        Specified by:
        getHeading in interface LBS
        Throws:
        MXException
        java.rmi.RemoteException
      • getLastUpdate

        public java.util.Date getLastUpdate()
                                     throws MXException,
                                            java.rmi.RemoteException
        Specified by:
        getLastUpdate in interface LBS
        Throws:
        MXException
        java.rmi.RemoteException
      • getSpeed

        public java.lang.Double getSpeed()
                                  throws MXException,
                                         java.rmi.RemoteException
        Specified by:
        getSpeed in interface LBS
        Throws:
        MXException
        java.rmi.RemoteException
      • saveLBSData

        public void saveLBSData(java.lang.Double lat,
                                java.lang.Double lng,
                                java.lang.Double locationAccuracy,
                                java.lang.Double altitudeAccuracy,
                                java.lang.Double altitude,
                                java.lang.Double heading,
                                java.lang.Double speed)
                         throws MXException,
                                java.rmi.RemoteException
        Specified by:
        saveLBSData in interface LBS
        Throws:
        MXException
        java.rmi.RemoteException
      • getLBSLatitudeY

        public java.lang.Double getLBSLatitudeY()
                                         throws MXException,
                                                java.rmi.RemoteException
        Description copied from interface: CombinedLBS
        Return a double value with the Latitude (or Y coordinate) of the current entity. A mbo (an asset, for instance) normally has a static position determined by AutoLocatable logic. However, the mbo (a car, a train for instance) can also have a current position determined by LBS logic. In the latter situation, getLBSLatitudeY()/getLBSLongitudeX() will return the mbo's current position, whereas getLatitudeY()/getLongitudeX() will return the mbo's static position.
        Specified by:
        getLBSLatitudeY in interface CombinedLBS
        Returns:
        Double or null
        Throws:
        MXException
        java.rmi.RemoteException
      • getLBSLongitudeX

        public java.lang.Double getLBSLongitudeX()
                                          throws MXException,
                                                 java.rmi.RemoteException
        Description copied from interface: CombinedLBS
        Return a double value with the Longitude (or X coordinate) of the current entity. A mbo (an asset, for instance) normally has a static position determined by AutoLocatable logic. However, the mbo (a car, a train for instance) can also have a current position determined by LBS logic. In the latter situation, getLBSLatitudeY()/getLBSLongitudeX() will return the mbo's current position, whereas getLatitudeY()/getLongitudeX() will return the mbo's static position.
        Specified by:
        getLBSLongitudeX in interface CombinedLBS
        Returns:
        Double or null
        Throws:
        MXException
        java.rmi.RemoteException
      • getPMMeterTally

        public int getPMMeterTally(MboRemote pmMeter)
                            throws MXException,
                                   java.rmi.RemoteException
        used when deleting a meter from the asset to determine whether PM flags PMASSETWOGEN and PMACTMETER need to be set to false. This depends on whether or or not there are any PMs impacted by the deletion of the meter. When all PMMETERs are removed from a PM via meter deletion, these PMMETER flags are set to false.
        Specified by:
        getPMMeterTally in interface AssetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Asset.getPMMeterTally(MboRemote)
      • getTotalMeterLifeToDate

        protected java.lang.Double getTotalMeterLifeToDate(java.lang.String meterName)
                                                    throws java.rmi.RemoteException,
                                                           MXException
        Return the total of meter file to date.
        Throws:
        MXException
        java.rmi.RemoteException
      • getCurrentMeterLife

        public java.lang.Double getCurrentMeterLife(java.lang.String meterName)
                                             throws java.rmi.RemoteException,
                                                    MXException
        Return the total of meter file to date.
        Specified by:
        getCurrentMeterLife in interface AssetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.asset.Asset#getCurrentMeterLife()
      • cleanupAssetsMap

        public static void cleanupAssetsMap()
      • hasAssetSpecBeenCreated

        public boolean hasAssetSpecBeenCreated()
                                        throws MXException,
                                               java.rmi.RemoteException
        IV90682:true means assetspec has been created, false means no.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • setAssetSpecCreated

        public void setAssetSpecCreated(boolean created)
                                 throws MXException,
                                        java.rmi.RemoteException
        IV90682: set the flag.
        Parameters:
        created -
        Throws:
        MXException
        java.rmi.RemoteException
      • changeMaxStatus

        public void changeMaxStatus(java.lang.String internalStatus,
                                    java.util.Date date,
                                    java.lang.String memo)
                             throws MXException,
                                    java.rmi.RemoteException
        IV95332: Change status in Async passes the non-default synonym status. Calls start in AssetStatusAsyncJobHandler.asyncProcess() then AssetSet.changeStatus() wheich calls this method. Overrides this method to also consider the case when the status passed is non-default translated, not internal.
        Specified by:
        changeMaxStatus in interface StatefulMboRemote
        Overrides:
        changeMaxStatus in class StatefulMbo
        date - The effective date of the new status (java.util.Date).
        memo - A string briefly describing the circumstances of the change. The memo can be null.
        Throws:
        MXException - Thrown if there is a problem, or the status cannot be changed, as determined by canChangeStatus(String).
        java.rmi.RemoteException
        See Also:
        StatefulMbo.changeStatus(String,java.util.Date,String,long)
      • assetInTransit

        public void assetInTransit()
                            throws MXException,
                                   java.rmi.RemoteException
        Description copied from interface: AssetRemote
        IJ24065:indicates asset is in transit, shipped but not received
        Specified by:
        assetInTransit in interface AssetRemote
        Throws:
        MXException
        java.rmi.RemoteException