Class EnclosedFragment

java.lang.Object
overit.geocall.sql.code.fragment.Fragment
overit.geocall.sql.code.fragment.EnclosedFragment

public class EnclosedFragment extends Fragment
The class extends Fragment and aims to enclose another fragment between a head and a tail string.
  • Field Details

    • _fragment

      protected Fragment _fragment
    • _header

      protected String _header
    • _trailer

      protected String _trailer
  • Constructor Details

    • EnclosedFragment

      public EnclosedFragment(Fragment fragment, String header, String trailer)
      The class's constructor.
      Parameters:
      fragment - The Fragmente you want to enclose.
      header - The Header string that enclose the fragment.
      trailer - The Tail string that enclose the fragment.
  • Method Details

    • appendTo

      public boolean appendTo(StringBuilder sb, String header, Criterion criterion, Map<String,Object> context)
      Description copied from class: Fragment
      This method is used to create the Fragment's SQL string.
      Specified by:
      appendTo in class Fragment
      Parameters:
      sb - The StringBuilder used to add the current piece (Fragment) of SQL cod, to create the complete SQL string.
      header - The string previus the 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.