Class EventDataValue

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

public class EventDataValue extends Object implements Serializable
See Also:
  • Field Details

  • Constructor Details

    • EventDataValue

      public EventDataValue(String dataElement, String value)
  • Method Details

    • hasValue

      public boolean hasValue()
      Indicates whether the value is not null or empty.
      Returns:
      true if the value is not null or empty.
    • isBoolean

      public boolean isBoolean()
      Indicates whether the value represents a boolean.
      Returns:
      true if the value represents a boolean.
    • getBooleanValue

      public Boolean getBooleanValue()
      Returns the value as a boolean, only if this value represents a boolean. Returns null if not.
      Returns:
      a boolean value.
    • isDouble

      public boolean isDouble()
      Indicates whether the value represents a double.
      Returns:
      true if the value represents a double.
    • getDoubleValue

      public Double getDoubleValue()
      Returns the value as a Double, only if the value represents a double. Returns null if not.
      Returns:
      a double value.
    • isInteger

      public boolean isInteger()
      Indicates whether the value represents an integer.
      Returns:
      true if the value represents an integer.
    • getIntegerValue

      public Integer getIntegerValue()
      Returns the value as an integer, only if the value represents an integer. Return null if not.
      Returns:
      an integer value.
    • isLocalDate

      public boolean isLocalDate()
      Indicates whether the value represents a LocalDate.
      Returns:
      true if the value represents a LocalDate.
    • getLocalDateValue

      public LocalDate getLocalDateValue()
      Returns the value as a LocalDate, only if the value represents a LocalDate or a LocalDateTime. If the value represents the latter, the LocalDateTime is converted to a LocalDate. Returns null if not.
      Returns:
      a LocalDate or null.
    • isLocalDateTime

      public boolean isLocalDateTime()
      Indicates whether the value represents a LocalDateTime.
      Returns:
      true if the value represents a LocalDateTime.
    • getLocalDateTimeValue

      public LocalDateTime getLocalDateTimeValue()
      Returns the value as a LocalDateTime, only if the value represents a LocalDateTime. Returns null if not.
      Returns:
      a LocalDateTime or null.