java.lang.Object
com.github.fabriciofx.cactoos.jdbc.params.ParamsOf
All Implemented Interfaces:
Params, Iterable<Param>

public final class ParamsOf extends Object implements Params
Named Query Params.

There is no thread-safety guarantee.

Since:
0.4
  • Constructor Details

    • ParamsOf

      public ParamsOf(Params params, Param... prms)
      Ctor.
      Parameters:
      params - Params
      prms - Array of Param
    • ParamsOf

      public ParamsOf(Param... prms)
      Ctor.
      Parameters:
      prms - Array of Param
    • ParamsOf

      public ParamsOf(List<Param> prms)
      Ctor.
      Parameters:
      prms - List of Param
  • Method Details

    • prepare

      public PreparedStatement prepare(PreparedStatement stmt) throws Exception
      Description copied from interface: Params
      Set the PreparedStatement with all query parameters.
      Specified by:
      prepare in interface Params
      Parameters:
      stmt - The PreparedStatement
      Returns:
      The setted PreparedStatement
      Throws:
      Exception - If fails
    • contains

      public boolean contains(String name, int index)
      Description copied from interface: Params
      Check if Params contains a param at position.
      Specified by:
      contains in interface Params
      Parameters:
      name - The name of the parameter
      index - The position of the parameter in the PreparedStatement
      Returns:
      True if contains or false if don't
    • iterator

      public Iterator<Param> iterator()
      Specified by:
      iterator in interface Iterable<Param>