Class Values


public class Values extends DoubleFragmentSequence
The class extends DoubleFragmentSequence and aims to define a sql's fragment to represent the values in the INSERT and in the UPDATE sql's statement.
This class defina a specific structure with which the values must be created, for example separated by a comma.
  • Constructor Details

    • Values

      public Values(String separator)
      Creates a new Values
      Parameters:
      separator - The separator
  • Method Details

    • addValue

      public Values addValue(String field)
      Adds a value to the value's list used in the current sql's fragment.
      Parameters:
      field - The field to add.
      Returns:
      The list with the filed plus the value added.
    • addValue

      public Values addValue(Criterion criterion, String field)
      Adds a value to the value's list used in the current sql's fragment and replace the current criterion withthe new one passed by parameter.
      Parameters:
      criterion - The new criterion to replace the oldest.
      field - The field to add.
      Returns:
      The list with the filed plus the value added.
    • addValues

      public Values addValues(String... fieldRe)
      Adds a field's array to the value's list used in the current sql's fragment.
      Parameters:
      fieldRe - The field's array to add.
      Returns:
      The list with the filed plus the values added.
    • addValues

      public Values addValues(Criterion criterion, String... fieldRe)
      Adds a field's array to the value's list used in the current sql's fragment and replace the current criterion withthe new one passed by parameter.
      Parameters:
      criterion - The new criterion to replace the oldest.
      fieldRe - The field's array to add.
      Returns:
      The list with the filed plus the values added.