Class Event

java.lang.Object
org.hisp.dhis.model.event.Event
All Implemented Interfaces:
Serializable

public class Event extends Object implements Serializable
See Also:
  • Constructor Details

  • Method Details

    • setPointGeometry

      public void setPointGeometry(double longitude, double latitude)
      Sets the geometry field to a point based on the given longitude and latitude.
      Parameters:
      longitude - the longitude (x value).
      latitude - the latitude (y value).
    • isGeometryPoint

      public boolean isGeometryPoint()
      Indicates whether geometry is of type Point.
      Returns:
      true if geometry is of type Point.
    • isGeometryType

      public boolean isGeometryType(String type)
      Indicates whether geometry is of the given type.
      Parameters:
      type - the type, use Geometry TYPENAME constant values.
      Returns:
      true if geometry is of the given type.
    • getEventDataValue

      public EventDataValue getEventDataValue(String dataElement)
      Returns the first EventDataValue which data element matches the given data element identifier, or null if no match.
      Parameters:
      dataElement - the data element identifier.
      Returns:
      a EventDataValue or null.
    • getDataValue

      public String getDataValue(String dataElement)
      Returns the value of the first EventDataValue which data element matches the given data element identifier, or null if no match.
      Parameters:
      dataElement - the data element identifier.
      Returns:
      a EventDataValue or null.
    • addDataValue

      public void addDataValue(EventDataValue dataValue)
      Adds a data value. If a data value with the same data element identifier exists, the given value will overwrite the existing data value. The new data value is added to the end of the list of data values.
      Parameters:
      dataValue - the EventDataValue, not null.
    • addDataValue

      public void addDataValue(String dataElement, String value)
      Adds a data value. If a data value with the same data element identifier exists, the given value will overwrite the existing data value. The new data value is added to the end of the list of data values.
      Parameters:
      dataElement - the data element identifier, not null.
      value - the data value.