Interface Statement<STMT_T,​RES_T>

Type Parameters:
STMT_T - statement type
RES_T - result type
All Known Subinterfaces:
AddStatement, DeleteStatement, FindStatement, InsertStatement, ModifyStatement, RemoveStatement, SelectStatement, SqlStatement, UpdateStatement
All Known Implementing Classes:
AddStatementImpl, DeleteStatementImpl, FilterableStatement, FindStatementImpl, InsertStatementImpl, ModifyStatementImpl, RemoveStatementImpl, SelectStatementImpl, SqlStatementImpl, UpdateStatementImpl

public interface Statement<STMT_T,​RES_T>
A statement is a query or state-affecting command against a database that returns a result.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Interface Description
    static class  Statement.LockContention
    The lock contention options for the locking modes available.
  • Method Summary

    Modifier and Type Method Description
    default STMT_T bind​(java.lang.Object... values)
    Bind an array of objects numerically starting at 0.
    default STMT_T bind​(java.lang.String argName, java.lang.Object value)
    Bind the named argument to the given value.
    default STMT_T bind​(java.util.List<java.lang.Object> values)
    Bind a list of objects numerically starting at 0.
    default STMT_T bind​(java.util.Map<java.lang.String,​java.lang.Object> values)
    Bind the set of arguments named by the keys in the map to the associated values in the map.
    default STMT_T clearBindings()
    Clear all bindings for this statement.
    RES_T execute()
    Execute the statement synchronously.
    java.util.concurrent.CompletableFuture<RES_T> executeAsync()
    Execute the statement asynchronously.
  • Method Details

    • execute

      RES_T execute()
      Execute the statement synchronously.
      Returns:
      result of statement execution
    • executeAsync

      java.util.concurrent.CompletableFuture<RES_T> executeAsync()
      Execute the statement asynchronously.
      Returns:
      CompletableFuture for result
    • clearBindings

      default STMT_T clearBindings()
      Clear all bindings for this statement.
      Returns:
      this statement
    • bind

      default STMT_T bind​(java.lang.String argName, java.lang.Object value)
      Bind the named argument to the given value.
      Parameters:
      argName - argument name
      value - object to bind
      Returns:
      this statement
    • bind

      default STMT_T bind​(java.util.Map<java.lang.String,​java.lang.Object> values)
      Bind the set of arguments named by the keys in the map to the associated values in the map.
      Parameters:
      values - the map containing key-value pairs to bind
      Returns:
      this statement
    • bind

      default STMT_T bind​(java.util.List<java.lang.Object> values)
      Bind a list of objects numerically starting at 0.
      Parameters:
      values - list of objects to bind
      Returns:
      this statement
    • bind

      default STMT_T bind​(java.lang.Object... values)
      Bind an array of objects numerically starting at 0.
      Parameters:
      values - one or more objects to bind
      Returns:
      this statement