Interface EventQueryResultEntry


  • public interface EventQueryResultEntry
    Represents a single result from an Event Query.

    Entries may represent an update to previous entries. The getIdentifiers() result will be equal to the entry that it is an update for. The number of entries will be the same for all results of the same query.

    If entries represent an ordered result, the getSortValues() will return a list of values to sort on. The number of values will be equal in all entries for the same query.

    Since:
    4.5.1
    Author:
    Allard Buijze
    • Method Detail

      • columns

        List<String> columns()
        The list of columns returned by the query. Will return the same value for all result entries of the same query.
        Returns:
        the names of the columns returned in this entry
      • getValue

        <R> R getValue​(String column)
        Returns the value for the given column, casting it to the desired type.

        The returned value can be a String, Double, Long or Boolean

        Type Parameters:
        R - the type to cast the result to
        Parameters:
        column - the name of the column to return the data for
        Returns:
        the value associated with the given column
      • getIdentifiers

        List<Object> getIdentifiers()
        Returns the identifiers that uniquely identify this result entry. When multiple entries have equal identifier, the second result entry represents an updated version of the first.
        Returns:
        the identifiers for this entry
      • getSortValues

        List<Object> getSortValues()
        Returns the list of values to use to compare the order of this entry to other entries. Two entries with the same sort values cannot be considered equal, but rather don't have a defined order between them.
        Returns:
        the values to compare the order of entries
      • getValueAsString

        default String getValueAsString​(String column)
        Returns the String value associated with the given column.
        Parameters:
        column - the name of the column to return the value for
        Returns:
        the value associated with the column
        Throws:
        ClassCastException - when the value associated with the column is not a String
      • getValueAsLong

        default long getValueAsLong​(String column)
        Returns the long value associated with the given column.
        Parameters:
        column - the name of the column to return the value for
        Returns:
        the value associated with the column
        Throws:
        ClassCastException - when the value associated with the column is not a long
      • getValueAsDouble

        default double getValueAsDouble​(String column)
        Returns the double value associated with the given column.
        Parameters:
        column - the name of the column to return the value for
        Returns:
        the value associated with the column
        Throws:
        ClassCastException - when the value associated with the column is not a double
      • getValueAsBoolean

        default boolean getValueAsBoolean​(String column)
        Returns the boolean value associated with the given column.
        Parameters:
        column - the name of the column to return the value for
        Returns:
        the value associated with the column
        Throws:
        ClassCastException - when the value associated with the column is not a boolean