Class DoubleFragmentSequence

java.lang.Object
overit.geocall.sql.code.fragment.DoubleFragment
overit.geocall.sql.code.fragment.DoubleFragmentSequence
Direct Known Subclasses:
Values

public class DoubleFragmentSequence extends DoubleFragment
The class extends DoubleFragment and aims to representing a sequence of separated DoubleFragments.
  • Field Details

  • Constructor Details

    • DoubleFragmentSequence

      public DoubleFragmentSequence(String separator1, String separator2)
      Creates a new DoubleFragmentSequence
      Parameters:
      separator1 - The separator
      separator2 - The separator
  • Method Details

    • add

      public DoubleFragmentSequence add(DoubleFragment fragment)
      Add a DoubleFragment to the sequence.
      Parameters:
      fragment - The DoubleFragment to Add.
      Returns:
      The DoubleFragment sequence with fragment added.
    • clear

      public DoubleFragmentSequence clear()
      Clear all the DoubleFragment set on the sequence.
      Returns:
      An empty FragmentSequence.
    • 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.