psdi.app.measurement

Class Measurement

  • java.lang.Object
  • All Implemented Interfaces:
    java.rmi.Remote, MeasurementRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class Measurement
    extends Mbo
    implements MeasurementRemote
    Mbo object to represent measurement.

    See Measurement Package description.

    There are no key attributes for this object.

    The attributes in this object are as follows:

    Attribute NameDescription
    DomainIdnon-persistent attribute identifying the domain of valid observation values for a Measurement for a CHARACTERISTIC meter type.
    MeasureDateDate the measurement was taken.
    MeasurementValueActual measurement value recorded.
    OrgIdOrganization Identifier.
    PointNumIdentifier of the measure point associated with this measurement.
    SiteIdSite Identifier.
    • Constructor Detail

      • Measurement

        public Measurement(MboSet ms)
                    throws java.rmi.RemoteException
        Construct the measurement object.
        Parameters:
        ms - The Measurement MboSet.
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • isChangeByUserWhenSetFromLookup

        public boolean isChangeByUserWhenSetFromLookup(java.lang.String lookupAttrName,
                                                       java.lang.String attributeName)
        Indicates whether the CHANGEDBY_USER flag should be set for attributes on this Mbo when their values are set (along with other key fields) via lookup.
        Overrides:
        isChangeByUserWhenSetFromLookup in class Mbo
        Parameters:
        lookupAttrName - the attribute whose lookup is being called.
        attributeName - the attribute that is not the lookup attribute.
        Returns:
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Initialises the POINTNUM from the MEASUREPOINT object; makes sure the owner of this object is MEASUREPOINT; defaults the MEASUREMENT.POINTNUM to the owner's POINTNUM; generates a unique measurementid.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXApplicationException - addMeasurement when this measurement has no owner or its owner is not MeasurePoint.
        MXException
        java.rmi.RemoteException
      • delete

        public void delete()
                    throws MXException,
                           java.rmi.RemoteException
        Description copied from class: Mbo
        Mark the object to be deleted with all the normal security checks. An object can be successfully marked delete only when it is not flagged NODELETE, the current set it belongs to is not being flagged NODELETE, and it passes all the checks in its canDelete method.

        Please note that if you need to apply application specific rules when an object is being deleted, please overwrite method delete(long) instead of this one in the derived class.

        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • getTheMeter

        protected MeterRemote getTheMeter()
                                   throws MXException,
                                          java.rmi.RemoteException
        Returns:
        the Meter object associated with this Measurement
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        updates the LastReading, LastReadingDate and LastReadingInspctr attributes for the DeployedMeter that corresponds to this Measurement's MeasurePoint
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException