psdi.plusc.app.plusctmplt

Class PlusCAssetTemplate

    • Field Detail

      • duplicate

        public boolean duplicate
    • Constructor Detail

      • PlusCAssetTemplate

        public PlusCAssetTemplate(MboSet ms)
                           throws java.rmi.RemoteException,
                                  MXException
        Parameters:
        ms -
        Throws:
        java.rmi.RemoteException
        MXException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Description copied from class: Mbo
        Called by the framework when the Mbo has been constructed and the MboValues have been initialized. This can be overridden by the programmer to provide any custom initialization they would like to do.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Description copied from class: Mbo
        This is called when a new Mbo is added to the Mboset collection. It is called AFTER user defaults have been set from the data dictionary. Programmer should usually override this to set some defaults. Default behavior is to do nothing.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getStatusHandler

        protected StatusHandler getStatusHandler()
        Checks if the attributes required to generate the depreciation scheduled are set. If there is a attribute with a null value, the method throws a exception
        Specified by:
        getStatusHandler in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getStatusHistory

        protected MboSetRemote getStatusHistory()
                                         throws MXException,
                                                java.rmi.RemoteException
        Description copied from class: StatefulMbo
        Return the MboSet object used for storing the status change history. This method must be provided by the Mbo programmer.
        Specified by:
        getStatusHistory in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • generateMetersForMeterGroup

        protected void generateMetersForMeterGroup()
                                            throws java.rmi.RemoteException,
                                                   MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Description copied from class: StatefulMbo
        Overrides the save of Mbo so that a row is added to the status history table when a new object is saved.
        Overrides:
        save in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Description copied from class: Mbo
        Mark the object to be deleted depending on the access modifier. This will usually be overridden in the subclass of Mbo as there may be application specific rules as to if and when an object can be deleted. Object is not actually deleted in the database until save() is called. This method will also mark all associated Long Description and Translation Mbos for deletion.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier - 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)
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        Called in @link psdi.mbo.Mbo#copy(MboSetRemote, long)
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        mvi -
        Throws:
        java.rmi.RemoteException
        MXException
      • propagateKeyValue

        public void propagateKeyValue(java.lang.String keyName,
                                      java.lang.String keyValue)
                               throws MXException,
                                      java.rmi.RemoteException
        Description copied from class: Mbo
        Method for propagating key value. Provide an implementation of the method only when the parent's key values need to be propagate down to this MBO which is a child of a MBO set obtained through a relationship from the parent, and only when the key attribute of the parent are not one of the key attributes of the child MBO. When overwrite this method, please don't call super().
        Specified by:
        propagateKeyValue in interface MboRemote
        Overrides:
        propagateKeyValue in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • setCopyDefaults

        public void setCopyDefaults()
                             throws MXException,
                                    java.rmi.RemoteException
        Description copied from class: Mbo
        Programmer should override this method a initialize any fields that are not copied correctly by the copy() method. Always call super.setCopyDefaults() when overriding.
        Specified by:
        setCopyDefaults in interface MboRemote
        Overrides:
        setCopyDefaults in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getAssetTemplateMboSetInfo

        public MboSetInfo getAssetTemplateMboSetInfo()
                                              throws java.rmi.RemoteException,
                                                     MXException
        Checks if, for every meter defined as meter frequency for any attached Master PM, there is a similar one attached to the template.
        Specified by:
        getAssetTemplateMboSetInfo in interface PlusCCustomizedTemplateValues
        Returns:
        the asset template mbo set info
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • setReadOnlyFields

        public void setReadOnlyFields()
                               throws MXException,
                                      java.rmi.RemoteException
        Throws:
        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.
        Throws:
        MXException
        java.rmi.RemoteException
      • getDescDelimiter

        public java.lang.String getDescDelimiter(boolean isForClassDesc)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getDescDelimiter

        public java.lang.String getDescDelimiter()
                                          throws MXException,
                                                 java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • sortedClassSpecSet

        public java.util.Vector sortedClassSpecSet(MboSetRemote classSpecSet)
                                            throws MXException,
                                                   java.rmi.RemoteException
        IV73397: the sequence now is in ClassSpecUseWith records, sort the CLASSPEC records and store in a Vector by the sequence.
        Throws:
        MXException
        java.rmi.RemoteException