psdi.app.pm.virtual

Class WogenForecastSet

    • Field Detail

      • wogenSetCursor

        protected int wogenSetCursor
        This is the index of the next wogen Mbo we need to create WogenForecast records for.
      • forecastSetCursor

        protected int forecastSetCursor
        This is the index of the next WogenForecast we will create.
      • setIsComplete

        protected boolean setIsComplete
        This flag indicates when the forecast set has been completely generated.
      • wfLookup

        protected java.util.Vector wfLookup
        This vector allows us to find the position of forecast Mbos in this set, given thier position in the related Wogen MboSet. This only works for forecast Mbos created directly for Wogen records, not generated job tasks or route stops.
      • assetLocLookup

        protected java.util.Hashtable assetLocLookup
        Relate asset to locations. Key: assetnum, Value: location
      • locAssetLookup

        protected java.util.Hashtable locAssetLookup
        Relate locations to asset. Key: location, Value: assetnum
      • jpDurationLookup

        protected java.util.Hashtable jpDurationLookup
        Store durations for job plans Key: jpnum, Value: Double duration
      • jpEstLabHrsLookup

        protected java.util.Hashtable jpEstLabHrsLookup
        Store estimate labor hour totals for job plans Key: jpnum, Value: Double estlabhrs
    • Constructor Detail

      • WogenForecastSet

        public WogenForecastSet(MboServerInterface ms)
                         throws MXException,
                                java.rmi.RemoteException
        Construct the set
        Parameters:
        ms - The MboServerInterface
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • getMboInstance

        protected Mbo getMboInstance(MboSet ms)
                              throws MXException,
                                     java.rmi.RemoteException
        Factory method to create an WogenForecast object.
        Specified by:
        getMboInstance in class MboSet
        Parameters:
        ms - The WogenForecastSet.
        Returns:
        an WogenForecast object.
        Throws:
        MXException
        java.rmi.RemoteException
      • getMbo

        public MboRemote getMbo(int index)
                         throws MXException,
                                java.rmi.RemoteException
        This method is overridden so we can create WogenForecast records based on the Wogen records of the set that owns this set. Note that every member of the Wogen set will have a representative in the WogenForecast set. In additional, the forecast set will after Mbos to represent Job Tasks and Route Stop work orders.
        Specified by:
        getMbo in interface MboSetRemote
        Overrides:
        getMbo in class MboSet
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        MboSet.fetchMbos(int), MboSet.loadMboVecFromMrd(int)
      • getWoNumber

        protected int getWoNumber()
        Called by WogenForecast.add()
      • addJobTasks

        protected void addJobTasks(java.lang.String jpnum,
                                   java.lang.String orgid,
                                   java.lang.String siteid,
                                   MboRemote wogenBase,
                                   WogenForecast parentMbo)
                            throws MXException,
                                   java.rmi.RemoteException
        Creates task Mbos for Job Plans
        Throws:
        MXException
        java.rmi.RemoteException
      • getLocForAsset

        protected java.lang.String getLocForAsset(java.lang.String assetnum)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Looks up and caches the location where the asset resides.
        Throws:
        MXException
        java.rmi.RemoteException
      • getAssetForLoc

        protected java.lang.String getAssetForLoc(java.lang.String location)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Looks up and caches the asset that goes with the location.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        The method used to do the lookup.
      • getEstDur

        protected double getEstDur(java.lang.String jpnum,
                                   java.lang.String siteid,
                                   java.lang.String orgid)
                            throws MXException,
                                   java.rmi.RemoteException
        Looks up and caches job plan durations so that the EstDur attribute can be set.
        Parameters:
        jpnum - The job plan.
        Returns:
        The JPDURATION value for the job plan.
        Throws:
        MXException
        java.rmi.RemoteException
      • getEstLabHrs

        protected double getEstLabHrs(java.lang.String jpnum,
                                      java.lang.String siteid,
                                      java.lang.String orgid)
                               throws MXException,
                                      java.rmi.RemoteException
        Looks up and caches the total estimated labor hours for job plans so that the EstLabHrs attribute can be set.
        Parameters:
        jpnum - The job plan.
        Returns:
        The EstLabHrs value for the job plan.
        Throws:
        MXException
        java.rmi.RemoteException
      • calcGLAccount

        protected java.lang.String calcGLAccount(Mbo param,
                                                 java.lang.String baseGL)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Calculate the GLAccount, given the asset & location of the Mbo and merge it with the account on the wogen base.
        Throws:
        MXException
        java.rmi.RemoteException
      • getAssetLocPriority

        protected int getAssetLocPriority(java.lang.String assetnum,
                                          java.lang.String location)
                                   throws MXException,
                                          java.rmi.RemoteException
        Looks up the AssetLocPriority for asset and locations.
        Throws:
        MXException
        java.rmi.RemoteException
      • dispose

        public void dispose()
                     throws MXException,
                            java.rmi.RemoteException
        Use this method when you no longer need the information from this set. The records of the set will be deleted from the database.
        Specified by:
        dispose in interface WogenForecastSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • count

        public int count()
                  throws MXException,
                         java.rmi.RemoteException
        The count method here is overridden because the framework's count doesn't work for Nonpersistent MboSets. Calling this method will cause all forecast Mbos for the set to come into existance. This is fairly expensive.
        Specified by:
        count in interface MboSetRemote
        Overrides:
        count in class NonPersistentMboSet
        Returns:
        The number of Mbos in the set.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        MboSet.count(int)