Package overit.geocall.sql.code.fragment
Class ValuesFragment
java.lang.Object
overit.geocall.sql.code.fragment.DoubleFragment
overit.geocall.sql.code.fragment.ValuesFragment
The class extends
For example it can be used in the INSERT statement like this " INSERT INTO AUSENAME (field1,filed2,field3) .....".
DoubleFragment and aims to implement a list of ValueFragment. This class allow to create a list of value separated by a comma.For example it can be used in the INSERT statement like this " INSERT INTO AUSENAME (field1,filed2,field3) .....".
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Pattern[]protected Stringprotected Stringprotected StringFields inherited from class overit.geocall.sql.code.fragment.DoubleFragment
_criterion -
Constructor Summary
ConstructorsConstructorDescriptionValuesFragment(String[] re, String separator1, String separator2) The class's constructor that create the double fargment and set the separator between the values inside the fragments. -
Method Summary
Modifier and TypeMethodDescriptionbooleanappendTo(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.Methods inherited from class overit.geocall.sql.code.fragment.DoubleFragment
addCriterion, getCriterion, replaceCriterion, toString
-
Field Details
-
_separator1
-
_separator2
-
_re
-
_separator
-
-
Constructor Details
-
ValuesFragment
The class's constructor that create the double fargment and set the separator between the values inside the fragments.- Parameters:
re- The value pattern's arrayseparator1- The first separator, for the first fragment.separator2- The Second separator, for the second fragment.
-
-
Method Details
-
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.
-