Interface EventQueryResultEntry
-
public interface EventQueryResultEntryRepresents 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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<String>columns()The list of columns returned by the query.List<Object>getIdentifiers()Returns the identifiers that uniquely identify this result entry.List<Object>getSortValues()Returns the list of values to use to compare the order of this entry to other entries.<R> RgetValue(String column)Returns the value for the givencolumn, casting it to the desired type.default booleangetValueAsBoolean(String column)Returns thebooleanvalue associated with the given column.default doublegetValueAsDouble(String column)Returns thedoublevalue associated with the given column.default longgetValueAsLong(String column)Returns thelongvalue associated with the given column.default StringgetValueAsString(String column)Returns theStringvalue associated with the given column.
-
-
-
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 givencolumn, casting it to the desired type.- 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 theStringvalue 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 aString
-
getValueAsLong
default long getValueAsLong(String column)
Returns thelongvalue 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 along
-
getValueAsDouble
default double getValueAsDouble(String column)
Returns thedoublevalue 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 adouble
-
getValueAsBoolean
default boolean getValueAsBoolean(String column)
Returns thebooleanvalue 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 aboolean
-
-