Interface DbStatement<D extends DbStatement<D>>

Type Parameters:
D - Type of the descendant of this class
All Known Subinterfaces:
DbStatementDml, DbStatementGet, DbStatementQuery
All Known Implementing Classes:
DbStatementBase, JdbcStatement, MongoDbStatementDml, MongoDbStatementGet, MongoDbStatementQuery

public interface DbStatement<D extends DbStatement<D>>
Database statement that can process parameters.

Once parameters are set using one of the params methods, all other methods throw an IllegalStateException.

Once a parameter is added using addParam(Object) or addParam(String, Object), all other params methods throw an IllegalStateException.

  • Method Summary

    Modifier and Type
    Method
    Description
    addParam(boolean parameter)
    Add next boolean parameter to the list of ordered parameters (e.g.
    addParam(byte parameter)
    Add next byte parameter to the list of ordered parameters (e.g.
    addParam(byte[] parameter)
    Add next byte[] parameter to the list of ordered parameters (e.g.
    addParam(double parameter)
    Add next double parameter to the list of ordered parameters (e.g.
    addParam(float parameter)
    Add next float parameter to the list of ordered parameters (e.g.
    addParam(int parameter)
    Add next integer parameter to the list of ordered parameters (e.g.
    addParam(long parameter)
    Add next long parameter to the list of ordered parameters (e.g.
    addParam(short parameter)
    Add next short parameter to the list of ordered parameters (e.g.
    addParam(Object parameter)
    Add next parameter to the list of ordered parameters (e.g.
    addParam(String parameter)
    Add next String parameter to the list of ordered parameters (e.g.
    addParam(String name, boolean parameter)
    Add next boolean parameter to the map of named parameters (e.g.
    addParam(String name, byte parameter)
    Add next byte parameter to the map of named parameters (e.g.
    addParam(String name, byte[] parameter)
    Add next byte[] parameter to the map of named parameters (e.g.
    addParam(String name, double parameter)
    Add next double parameter to the map of named parameters (e.g.
    addParam(String name, float parameter)
    Add next float parameter to the map of named parameters (e.g.
    addParam(String name, int parameter)
    Add next int parameter to the map of named parameters (e.g.
    addParam(String name, long parameter)
    Add next long parameter to the map of named parameters (e.g.
    addParam(String name, short parameter)
    Add next short parameter to the map of named parameters (e.g.
    addParam(String name, Object parameter)
    Add next parameter to the map of named parameters (e.g.
    addParam(String name, String parameter)
    Add next String parameter to the map of named parameters (e.g.
    addParam(String name, BigDecimal parameter)
    Add next BigDecimal parameter to the map of named parameters (e.g.
    addParam(String name, BigInteger parameter)
    Add next BigInteger parameter to the map of named parameters (e.g.
    addParam(BigDecimal parameter)
    Add next BigDecimal parameter to the list of ordered parameters (e.g.
    addParam(BigInteger parameter)
    Add next BigInteger parameter to the list of ordered parameters (e.g.
    indexedParam(Object parameters)
    Configure parameters using Object instance with registered mapper.
    namedParam(Object parameters)
    Configure parameters using Object instance with registered mapper.
    default D
    params(Object... parameters)
    Configure parameters from an array by order.
    params(List<?> parameters)
    Configure parameters from a List by order.
    params(Map<String,?> parameters)
    Configure named parameters.
  • Method Details

    • params

      D params(List<?> parameters)
      Configure parameters from a List by order. The statement must use indexed parameters and configure them by order in the provided array.
      Parameters:
      parameters - ordered parameters to set on this statement, never null
      Returns:
      updated db statement
    • params

      default D params(Object... parameters)
      Configure parameters from an array by order. The statement must use indexed parameters and configure them by order in the provided array.
      Parameters:
      parameters - ordered parameters to set on this statement
      Returns:
      updated db statement
    • params

      D params(Map<String,?> parameters)
      Configure named parameters. The statement must use named parameters and configure them from the provided map.
      Parameters:
      parameters - named parameters to set on this statement
      Returns:
      updated db statement
    • namedParam

      D namedParam(Object parameters)
      Configure parameters using Object instance with registered mapper. The statement must use named parameters and configure them from the map provided by mapper.
      Parameters:
      parameters - Object instance containing parameters
      Returns:
      updated db statement
    • indexedParam

      D indexedParam(Object parameters)
      Configure parameters using Object instance with registered mapper. The statement must use indexed parameters and configure them by order in the array provided by mapper.
      Parameters:
      parameters - Object instance containing parameters
      Returns:
      updated db statement
    • addParam

      D addParam(Object parameter)
      Add next parameter to the list of ordered parameters (e.g. the ones that use ? in SQL).
      Parameters:
      parameter - next parameter to set on this statement
      Returns:
      updated db statement
    • addParam

      D addParam(boolean parameter)
      Add next boolean parameter to the list of ordered parameters (e.g. the ones that use ? in SQL).
      Parameters:
      parameter - next parameter to set on this statement
      Returns:
      updated db statement
    • addParam

      D addParam(String parameter)
      Add next String parameter to the list of ordered parameters (e.g. the ones that use ? in SQL).
      Parameters:
      parameter - next parameter to set on this statement
      Returns:
      updated db statement
    • addParam

      D addParam(byte parameter)
      Add next byte parameter to the list of ordered parameters (e.g. the ones that use ? in SQL).
      Parameters:
      parameter - next parameter to set on this statement
      Returns:
      updated db statement
    • addParam

      D addParam(short parameter)
      Add next short parameter to the list of ordered parameters (e.g. the ones that use ? in SQL).
      Parameters:
      parameter - next parameter to set on this statement
      Returns:
      updated db statement
    • addParam

      D addParam(int parameter)
      Add next integer parameter to the list of ordered parameters (e.g. the ones that use ? in SQL).
      Parameters:
      parameter - next parameter to set on this statement
      Returns:
      updated db statement
    • addParam

      D addParam(long parameter)
      Add next long parameter to the list of ordered parameters (e.g. the ones that use ? in SQL).
      Parameters:
      parameter - next parameter to set on this statement
      Returns:
      updated db statement
    • addParam

      D addParam(float parameter)
      Add next float parameter to the list of ordered parameters (e.g. the ones that use ? in SQL).
      Parameters:
      parameter - next parameter to set on this statement
      Returns:
      updated db statement
    • addParam

      D addParam(double parameter)
      Add next double parameter to the list of ordered parameters (e.g. the ones that use ? in SQL).
      Parameters:
      parameter - next parameter to set on this statement
      Returns:
      updated db statement
    • addParam

      D addParam(BigInteger parameter)
      Add next BigInteger parameter to the list of ordered parameters (e.g. the ones that use ? in SQL).
      Parameters:
      parameter - next parameter to set on this statement
      Returns:
      updated db statement
    • addParam

      D addParam(BigDecimal parameter)
      Add next BigDecimal parameter to the list of ordered parameters (e.g. the ones that use ? in SQL).
      Parameters:
      parameter - next parameter to set on this statement
      Returns:
      updated db statement
    • addParam

      D addParam(byte[] parameter)
      Add next byte[] parameter to the list of ordered parameters (e.g. the ones that use ? in SQL).
      Parameters:
      parameter - next parameter to set on this statement
      Returns:
      updated db statement
    • addParam

      D addParam(String name, Object parameter)
      Add next parameter to the map of named parameters (e.g. the ones that use :name in Helidon JDBC SQL integration).
      Parameters:
      name - name of parameter
      parameter - value of parameter
      Returns:
      updated db statement
    • addParam

      D addParam(String name, boolean parameter)
      Add next boolean parameter to the map of named parameters (e.g. the ones that use :name in Helidon JDBC SQL integration).
      Parameters:
      name - name of parameter
      parameter - value of parameter
      Returns:
      updated db statement
    • addParam

      D addParam(String name, String parameter)
      Add next String parameter to the map of named parameters (e.g. the ones that use :name in Helidon JDBC SQL integration).
      Parameters:
      name - name of parameter
      parameter - value of parameter
      Returns:
      updated db statement
    • addParam

      D addParam(String name, byte parameter)
      Add next byte parameter to the map of named parameters (e.g. the ones that use :name in Helidon JDBC SQL integration).
      Parameters:
      name - name of parameter
      parameter - value of parameter
      Returns:
      updated db statement
    • addParam

      D addParam(String name, short parameter)
      Add next short parameter to the map of named parameters (e.g. the ones that use :name in Helidon JDBC SQL integration).
      Parameters:
      name - name of parameter
      parameter - value of parameter
      Returns:
      updated db statement
    • addParam

      D addParam(String name, int parameter)
      Add next int parameter to the map of named parameters (e.g. the ones that use :name in Helidon JDBC SQL integration).
      Parameters:
      name - name of parameter
      parameter - value of parameter
      Returns:
      updated db statement
    • addParam

      D addParam(String name, long parameter)
      Add next long parameter to the map of named parameters (e.g. the ones that use :name in Helidon JDBC SQL integration).
      Parameters:
      name - name of parameter
      parameter - value of parameter
      Returns:
      updated db statement
    • addParam

      D addParam(String name, float parameter)
      Add next float parameter to the map of named parameters (e.g. the ones that use :name in Helidon JDBC SQL integration).
      Parameters:
      name - name of parameter
      parameter - value of parameter
      Returns:
      updated db statement
    • addParam

      D addParam(String name, double parameter)
      Add next double parameter to the map of named parameters (e.g. the ones that use :name in Helidon JDBC SQL integration).
      Parameters:
      name - name of parameter
      parameter - value of parameter
      Returns:
      updated db statement
    • addParam

      D addParam(String name, BigInteger parameter)
      Add next BigInteger parameter to the map of named parameters (e.g. the ones that use :name in Helidon JDBC SQL integration).
      Parameters:
      name - name of parameter
      parameter - value of parameter
      Returns:
      updated db statement
    • addParam

      D addParam(String name, BigDecimal parameter)
      Add next BigDecimal parameter to the map of named parameters (e.g. the ones that use :name in Helidon JDBC SQL integration).
      Parameters:
      name - name of parameter
      parameter - value of parameter
      Returns:
      updated db statement
    • addParam

      D addParam(String name, byte[] parameter)
      Add next byte[] parameter to the map of named parameters (e.g. the ones that use :name in Helidon JDBC SQL integration).
      Parameters:
      name - name of parameter
      parameter - value of parameter
      Returns:
      updated db statement