Interface ExecutableSelectOperation.TerminatingSelect<T>

All Known Subinterfaces:
ExecutableSelectOperation.ExecutableSelect<T>, ExecutableSelectOperation.SelectWithProjection<T>, ExecutableSelectOperation.SelectWithQuery<T>, ExecutableSelectOperation.SelectWithTable<T>
Enclosing interface:
ExecutableSelectOperation

public static interface ExecutableSelectOperation.TerminatingSelect<T>
Trigger SELECT query execution by calling one of the terminating methods.
  • Method Summary

    Modifier and Type
    Method
    Description
    all()
    Get all matching elements.
    long
    Get the number of matching elements.
    default boolean
    Check for the presence of matching elements.
    default Optional<T>
    Get the first result, or no result.
    Get the first result, or no result.
    default Optional<T>
    one()
    Get exactly zero or one result.
    Get exactly zero or one result.
    default Stream<T>
    Stream all matching elements.
  • Method Details

    • count

      long count()
      Get the number of matching elements.
      Returns:
      total number of matching elements.
    • exists

      default boolean exists()
      Check for the presence of matching elements.
      Returns:
      true if at least one matching element exists.
      See Also:
    • first

      default Optional<T> first()
      Get the first result, or no result.
      Returns:
      the first result or Optional.empty() if no match found.
      See Also:
    • firstValue

      @Nullable T firstValue()
      Get the first result, or no result.
      Returns:
      the first result or null if no match found.
    • one

      default Optional<T> one()
      Get exactly zero or one result.
      Returns:
      a single result or Optional.empty() if no match found.
      Throws:
      IncorrectResultSizeDataAccessException - if more than one match found.
      See Also:
    • oneValue

      @Nullable T oneValue()
      Get exactly zero or one result.
      Returns:
      the single result or null if no match found.
      Throws:
      IncorrectResultSizeDataAccessException - if more than one match found.
    • all

      List<T> all()
      Get all matching elements.
      Returns:
      a List of all the matching elements; never null.
      See Also:
    • stream

      default Stream<T> stream()
      Stream all matching elements.
      Returns:
      a Stream wrapping the Cassandra ResultSet, which needs to be closed; never null.
      See Also: