Class BooleanContainer

java.lang.Object
com.cryptoalgo.oursql.model.db.data.Container<Boolean>
com.cryptoalgo.oursql.model.db.data.BooleanContainer

public class BooleanContainer extends Container<Boolean>
A container for the boolean SQL type.
  • Constructor Details

    • BooleanContainer

      public BooleanContainer(String boxValue)
      Create an instance of the container with raw content. Raw value must be a valid boolean representation.
      Parameters:
      boxValue - Raw content to unbox into this container
  • Method Details

    • unbox

      protected Boolean unbox(String val)
      Description copied from class: Container
      "Unbox" a raw string to the boxed type
      Specified by:
      unbox in class Container<Boolean>
      Parameters:
      val - Raw string for unboxing
      Returns:
      Boxed type representing the string
    • getFinalValue

      public String getFinalValue(@NotNull @NotNull String input)
      Description copied from class: Container
      Get the final value from a user input for committing
      Overrides:
      getFinalValue in class Container<Boolean>
      Parameters:
      input - Raw input
      Returns:
      Output to be used for the commit operation
    • isValid

      public boolean isValid(String value)
      Specified by:
      isValid in class Container<Boolean>
      Parameters:
      value - Value to be checked
      Returns:
      true if value can be cast to the type of this container
    • toString

      public String toString()
      Specified by:
      toString in class Container<Boolean>
    • toSQLString

      public String toSQLString()
      Description copied from class: Container
      Get an escaped string representation of the value in this container. Value contained should be escaped and ready for insertion into a SQL query.
      Overrides:
      toSQLString in class Container<Boolean>
      Returns:
      Escaped string representation of the value in this container