Class ValueFragment

java.lang.Object
overit.geocall.sql.code.fragment.DoubleFragment
overit.geocall.sql.code.fragment.ValueFragment

public class ValueFragment extends DoubleFragment
The class extends DoubleFragment and aims to correctly formatting the clause's key given by input, adding them an '@' character at the start.
For example with a Criterion.EQUAL criterion on AUSENAME field, this will be translate in '@AUSENAME=....' .
  • Field Details

    • _key

      protected String _key
  • Constructor Details

    • ValueFragment

      public ValueFragment(String key)
      The class's constructor.
      Parameters:
      key - The key which you want to transform.
  • Method Details

    • appendTo

      public boolean appendTo(StringBuilder sb1, String header1, StringBuilder sb2, String header2, Criterion criterion, Map<String,Object> context)
      Description copied from class: DoubleFragment
      This method is used to create the double Fragment's SQL string.
      Specified by:
      appendTo in class DoubleFragment
      Parameters:
      sb1 - The StringBuilder used to add the first piece (Fragment) of SQL code, to create the complete SQL string.
      header1 - The string previus the first Fragment's code.
      sb2 - The StringBuilder used to add the second piece (Fragment) of SQL code, to create the complete SQL string.
      header2 - The string previus the second Fragment's code.
      criterion - The Criterion, set by default, to apply.
      context - The input values to define the clauses of the sql string.
      Returns:
      true if there's a Fragment to add, false otherwise.