psdi.app.asset

Class AssetFeature

    • Field Detail

      • createNewAssetFeature

        public boolean createNewAssetFeature
    • Constructor Detail

      • AssetFeature

        public AssetFeature(MboSet ms)
                     throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • 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
      • 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
      • isChangeByUserWhenSetFromLookup

        public boolean isChangeByUserWhenSetFromLookup(java.lang.String lookupAttrName,
                                                       java.lang.String attributeName)
        Indicate whether the changeed by user flag should be set to the attribute when it is set along with other key field when the lookup attribute is being set on this Linear Mbo.
        Overrides:
        isChangeByUserWhenSetFromLookup in class Mbo
        Parameters:
        lookupAttrName - the attribute whose lookup is being called.
        attributeName - the attribute that is not the lookup attribute.
        Returns:
      • 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
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        If the AssetFeature is used as Reference in any; AssetFeature, AssetLocRelation,PM's, Route_Stop's, AssetFeatureSpec, AssetMeter, Workorder or Ticket. We will have a message.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • isFeatureMeasureModified

        public boolean isFeatureMeasureModified()
                                         throws MXException,
                                                java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Override the super class save. If this is a newly added ASSETFEATURE, add a ASSETFEATUREHIST record. If the user is modifying the record, set the existing history record's REMOVEDDATE and create a new ASSETFEATUREHIST. In case of deleting the ASSETFEATURE just set the current ASSETFEATUREHIST's REMOVEDDATE to current date.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • checkStartReferencePoint

        public void checkStartReferencePoint()
                                      throws MXException,
                                             java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • checkEndReferencePoint

        public void checkEndReferencePoint()
                                    throws MXException,
                                           java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • checkStart

        public void checkStart(long afBeingDefined_AFID,
                               long afBeingDefined_StartAFID,
                               long referencedAF_StartAFID,
                               java.lang.String afBeingDefined_StartFeatureLabel)
                        throws MXException,
                               java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • checkEnd

        public void checkEnd(long afBeingDefined_AFID,
                             long afBeingDefined_EndAFID,
                             long referencedAF_EndAFID,
                             java.lang.String afBeingDefined_EndFeatureLabel)
                      throws MXException,
                             java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • clearClassification

        public void clearClassification()
                                 throws java.rmi.RemoteException,
                                        MXException
        This method clears the classtructureid and delete assetspec
        Throws:
        java.rmi.RemoteException
        MXException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Description copied from class: Mbo
        Pre-save validation method. Programmer can override with specific rules.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • checkDuplicateAssetFeature

        public void checkDuplicateAssetFeature(java.lang.String feature,
                                               java.lang.String label,
                                               double startmeasure,
                                               double startyoffset,
                                               double startzoffset)
                                        throws MXException,
                                               java.rmi.RemoteException
        check to see if duplicate feature/label/startmeasure/startyoffset and startzoffset exist. If NO then set label to null
        Throws:
        MXApplicationException("asset","featureoffsetmeasdupe") - when a duplicate feature/label/startmeasure/startyoffset and startzoffset exist in asset-feature.
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long modifier)
                    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:
        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)
      • assetFeatureRefPointMeasIsModified

        public int assetFeatureRefPointMeasIsModified()
                                               throws MXException,
                                                      java.rmi.RemoteException
        Asset-Feature's STARTMEASURE or ENDMEASURE is modified and a user wants to save the changes, check other objects that uses the modified Asset-Feature as Start Reference Point or End Reference Point, then user is warned with a message, if the user wants to proceed.. other objects start measure or end measure is modified.
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • doLinearRecalibration

        public void doLinearRecalibration()
                                   throws MXException,
                                          java.rmi.RemoteException
        Start Recalibration for AssetFetaure AssetMeter PM Route_Stop AssetSpec AssetFeatureSpec AssetLocRelation
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • prepareAFLinearRecalibrationStatements

        public void prepareAFLinearRecalibrationStatements()
                                                    throws MXException,
                                                           java.rmi.RemoteException
        Prepare Recalibration statement for AssetFetaure
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • prepareOtherLinearRecalibrationStatements

        public void prepareOtherLinearRecalibrationStatements(java.lang.String recalObj)
                                                       throws MXException,
                                                              java.rmi.RemoteException
        Prepare Recalibration statement for Other Objects and update Other Objects Measures; If this AssetFeature reference points used.
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • handleAFHistory

        public void handleAFHistory()
                             throws MXException,
                                    java.rmi.RemoteException
        Update Asset Feature History recorsd
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • recalibrationForAssetFeature

        public void recalibrationForAssetFeature(java.util.Hashtable rolling)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Recalibration for Asset-Feature and its reference points in the circular loop.
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        IV81533: when this new assetfeature is being undeleted, bring the assetfeaturespecset back if there are assetfeaturespec records. Additionally, if this is an existing assetfeature, undeleting the assetfeature did not undelete the ASSETFEATURESPEC deleted in the delete(long) method.
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException