Interface SingleQueryable<T>

    • Method Summary

      Modifier and Type Method Description
      java.util.Optional<T> first()
      Gets the first value from the database result.
      java.lang.String getQuery()
      Responsible for building and returning the individual DQL statement.
    • Method Detail

      • first

        java.util.Optional<T> first()
        Gets the first value from the database result. This method should be used when only one result is expected.
        Returns:
        The first row as an entity wrapped in an Optional if there is at least one row. Otherwise Optional.empty() is returned. If the value from the database is null, an empty Optional is also returned.
      • getQuery

        java.lang.String getQuery()
        Responsible for building and returning the individual DQL statement.
        Returns:
        The DQL statement which fetches data from the database.