psdi.plusc.app.pluscds

Class PlusCWODSPoint

  • java.lang.Object
    • Constructor Detail

      • PlusCWODSPoint

        public PlusCWODSPoint(MboSet ms)
                       throws MXException,
                              java.rmi.RemoteException
        Instantiates a new plus cwods point.
        Parameters:
        ms - the ms
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
    • 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
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Description copied from class: Mbo
        Can the object be deleted ? This is object specific and should be overridden.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • 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
      • toInternalString

        public java.lang.String toInternalString(java.lang.String sValuelist,
                                                 java.lang.String sUserValue)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Description copied from interface: PlusCWODSPointRemote
        To internal string.
        Specified by:
        toInternalString in interface PlusCWODSPointRemote
        Parameters:
        sValuelist - the s valuelist
        sUserValue - the s user value
        Returns:
        the string
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • toExternalDefaultValue

        public java.lang.String toExternalDefaultValue(java.lang.String sValuelist,
                                                       java.lang.String sUserValue)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Description copied from interface: PlusCWODSPointRemote
        To external default value.
        Specified by:
        toExternalDefaultValue in interface PlusCWODSPointRemote
        Parameters:
        sValuelist - the s valuelist
        sUserValue - the s user value
        Returns:
        the string
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getBoolean

        protected boolean getBoolean(java.lang.String attribute,
                                     boolean valueIfNull)
                              throws MXException,
                                     java.rmi.RemoteException,
                                     MXApplicationException
        Returns the given attributes boolean value, or valueIfNull if the attribute is null.
        Parameters:
        attribute - name of attribute to get
        valueIfNull - value if attribute is null
        Returns:
        attribute's boolean value or
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
        MXApplicationException - the mX application exception
      • setReadOnlyFieldsAfterAdd

        public void setReadOnlyFieldsAfterAdd()
                                       throws MXException,
                                              java.rmi.RemoteException
        This method sets the read-only flags for fields that can't be read-only during the add process. That happens to fields that have default values, because the setDatabaseDefaultValues() method is called after add().
        Specified by:
        setReadOnlyFieldsAfterAdd in interface PlusCWODSPointRemote
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • 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
      • setValue

        public void setValue(java.lang.String attributeName,
                             java.lang.String val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        NOTE: This method was overwritten due to the fact that some fields are READONLY in this mbo but in mobile synchronism process, they are seted. Case attributeName does not a mobile field, normal flow is executed
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - the attribute name
        val - the val
        accessModifier - the access modifier
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
        See Also:
        Mbo.setValue(String,String,long)
      • setValueNull

        public void setValueNull(java.lang.String attributeName,
                                 long accessModifier)
                          throws MXException,
                                 java.rmi.RemoteException
        NOTE: This method was overwritten due to the fact that some fields are READONLY in this mbo but in mobile synchronism process, they are seted. Case attributeName does not a mobile field, normal flow is executed
        Specified by:
        setValueNull in interface MboRemote
        Overrides:
        setValueNull in class Mbo
        Parameters:
        attributeName - the attribute name
        accessModifier - the access modifier
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
        See Also:
        Mbo.setValueNull(String,long)
      • setDSRequiredStatus

        public void setDSRequiredStatus(boolean cleared)
                                 throws java.rmi.RemoteException,
                                        MXException
        Sets the read-only status of the datasheets's REQUIRED field according to whether its points' as found/left data are filled. This is meant to be called when an as found/left value is changed. The cleared argument indicates whether the field's content has been set to empty (true) or not empty (false).
        Specified by:
        setDSRequiredStatus in interface PlusCWODSPointRemote
        Parameters:
        cleared - whether the field's content has been set to empty (true) or not empty (false).
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • getMboSet

        public MboSetRemote getMboSet(java.lang.String name)
                               throws MXException,
                                      java.rmi.RemoteException
        Returns the MBOSet with the given name. Overridden to handle the special case of PLUSCWODSPOINTAVERAGE.
        Specified by:
        getMboSet in interface MboRemote
        Overrides:
        getMboSet in class Mbo
        Parameters:
        name - the name
        Returns:
        the mbo set
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
        See Also:
        Mbo.getMboSet(java.lang.String)
      • getGroupAveragePoint

        public MboRemote getGroupAveragePoint()
                                       throws java.rmi.RemoteException,
                                              MXException
        Returns the Average point for the group of points to which this point belongs.
        Specified by:
        getGroupAveragePoint in interface PlusCWODSPointRemote
        Returns:
        MboRemote with the Average point for the group
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • getGroupPoints

        public MboRemote[] getGroupPoints()
                                   throws java.rmi.RemoteException,
                                          MXException
        Description copied from interface: PlusCWODSPointRemote
        Returns all points in this point's group (including itself) in an array.
        Specified by:
        getGroupPoints in interface PlusCWODSPointRemote
        Returns:
        an array of MboRemote with all points in the group.
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • getPointsFromGroup

        protected MboRemote[] getPointsFromGroup(boolean isAverage)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Returns all points in the current set that are from the same group, either the average one or the non-average ones.
        Parameters:
        isAverage - whether to return the average mbo or the other ones
        Returns:
        the points from group
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • 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