psdi.app.pm

Class PMForecast

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


    public class PMForecast
    extends Mbo
    implements PMForecastRemote
    MBO object to represent PMForecast.

    This is a system level object.

    The key attributes for this object are PMNum, SiteId, LTDPMCounter, ForecastDate, NewDate, ForecastSeqNo,CreateBy, CreateDate, ChangeBy, ChangeDate.

    The attributes in this object are as follows:

    Attribute NameDescription
    PMNumIdentifier for the PM record.
    SiteIdIdentifier of the site for this PM.
    LTDPMCounterIdentifier of the number of work orders generated from a PM. Life to Date counter cannot be reset.
    ForecastDateForecasted date for the PM.
    NewDateNew Forecasted Date for the PM.
    ForecastSeqNoUnique identifier for a given forecast of a PM.
    CreateBy, CreateDatePerson who created the forecast and the date it was created.
    ChangeByPerson who provided the New forecasted date for the PM.
    ChangeDateThe date the person provided the new forecasted date for the PM.
    • Field Detail

      • canDeletePMForecast

        public boolean canDeletePMForecast
    • Constructor Detail

      • PMForecast

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

      • init

        public void init()
                  throws MXException
        Initialize the PMForecast object. If usetargetstart is false and frequency is null set the first PM Forecast record as editable and all the other records readonly
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Sets default values for a new PMForecast object.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Method that checks whether a PMForecast can be deleted or not.
        You can delete only the last PM forecast record.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException - If PM forecast record is not the last forecast record, then MXApplicationException("PM", "NotLastPMForecastRecord")
        java.rmi.RemoteException
      • delete

        public void delete(long modifier)
                    throws MXException,
                           java.rmi.RemoteException
        Deletes a PMForecast record.
        when a PMForecast record is deleted, delete the same forecastseqno PMForecastJP record in the child PM also
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        modifier - access modifier
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Description copied from class: Mbo
        Save the object and other linked objects. Subclasses can code their save() logic to include any appropriate updates to other linked objects and call super.save().
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getForecastDateForSeqNo

        public java.util.Date getForecastDateForSeqNo(int forecastseqno)
                                               throws MXException,
                                                      java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getForecastDateForSeqNo

        public java.util.Date getForecastDateForSeqNo(MboSetRemote pmForecastSet,
                                                      int forecastseqno,
                                                      boolean addJPDurFlag)
                                               throws MXException,
                                                      java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getFirstPMForecastRecord

        public MboRemote getFirstPMForecastRecord()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • isFirstForecastRecord

        public boolean isFirstForecastRecord()
                                      throws MXException,
                                             java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException