Package overit.geocall.sql.code.fragment
Class DoubleFragmentSequence
java.lang.Object
overit.geocall.sql.code.fragment.DoubleFragment
overit.geocall.sql.code.fragment.DoubleFragmentSequence
- Direct Known Subclasses:
Values
The class extends
DoubleFragment and aims to representing a sequence of separated DoubleFragments.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList<DoubleFragment> protected Stringprotected StringFields inherited from class overit.geocall.sql.code.fragment.DoubleFragment
_criterion -
Constructor Summary
ConstructorsConstructorDescriptionDoubleFragmentSequence(String separator1, String separator2) Creates a new DoubleFragmentSequence -
Method Summary
Modifier and TypeMethodDescriptionadd(DoubleFragment fragment) Add a DoubleFragment to the sequence.booleanappendTo(StringBuilder sb1, String header1, StringBuilder sb2, String header2, Criterion criterion, Map<String, Object> context) This method is used to create the double Fragment's SQL string.clear()Clear all the DoubleFragment set on the sequence.Methods inherited from class overit.geocall.sql.code.fragment.DoubleFragment
addCriterion, getCriterion, replaceCriterion, toString
-
Field Details
-
_separator1
-
_separator2
-
_fragments
-
-
Constructor Details
-
DoubleFragmentSequence
Creates a new DoubleFragmentSequence- Parameters:
separator1- The separatorseparator2- The separator
-
-
Method Details
-
add
Add a DoubleFragment to the sequence.- Parameters:
fragment- The DoubleFragment to Add.- Returns:
- The DoubleFragment sequence with fragment added.
-
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:DoubleFragmentThis method is used to create the double Fragment's SQL string.- Specified by:
appendToin classDoubleFragment- 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:
trueif there's a Fragment to add,falseotherwise.
-