java.lang.Object
com.github.fabriciofx.cactoos.jdbc.param.TextOf
All Implemented Interfaces:
Param, org.cactoos.Text

public final class TextOf extends Object implements Param
String param.
Since:
0.2
  • Constructor Details

    • TextOf

      public TextOf(String name, String value)
      Ctor.
      Parameters:
      name - The id
      value - The data
    • TextOf

      public TextOf(String name, org.cactoos.Text value)
      Ctor.
      Parameters:
      name - The id
      value - The data
    • TextOf

      public TextOf(org.cactoos.Text name, String value)
      Ctor.
      Parameters:
      name - The id
      value - The data
    • TextOf

      public TextOf(org.cactoos.Text name, org.cactoos.Text value)
      Ctor.
      Parameters:
      name - The id
      value - The data
  • Method Details

    • name

      public String name()
      Description copied from interface: Param
      Get the data name.
      Specified by:
      name in interface Param
      Returns:
      The name
    • prepare

      public void prepare(PreparedStatement stmt, int index) throws Exception
      Description copied from interface: Param
      Set the PreparedStatement with data.
      Specified by:
      prepare in interface Param
      Parameters:
      stmt - The PreparedStatement
      index - The position of the parameter in the PreparedStatement
      Throws:
      Exception - If fails
    • asString

      public String asString() throws Exception
      Specified by:
      asString in interface org.cactoos.Text
      Throws:
      Exception