Package org.teiid.translator.jdbc
Class TemplateFunctionModifier
- java.lang.Object
-
- org.teiid.translator.jdbc.FunctionModifier
-
- org.teiid.translator.jdbc.TemplateFunctionModifier
-
public class TemplateFunctionModifier extends FunctionModifier
Modifier for cases where arguments need to be rearranged or new text needs to be added. E.g. new FunctionModifier() { public List<?> translate(Function function) { return Arrays.asList( "SDO_RELATE(", function.getParameters().get(0), ", ", function.getParameters().get(1), ", 'mask=touch')" ); } } new TemplateFunctionModifier("SDO_RELATE(", 0, ", ", 1, ", 'mask=touch')")
-
-
Constructor Summary
Constructors Constructor Description TemplateFunctionModifier(Object... parts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<?>
translate(Function function)
Return a List of translated parts (LanguageObject
s and Objects), or null if this FunctionModifier wishes to rely on the default translation of the conversion visitor.-
Methods inherited from class org.teiid.translator.jdbc.FunctionModifier
getCode
-
-
-
-
Constructor Detail
-
TemplateFunctionModifier
public TemplateFunctionModifier(Object... parts)
-
-
Method Detail
-
translate
public List<?> translate(Function function)
Description copied from class:FunctionModifier
Return a List of translated parts (LanguageObject
s and Objects), or null if this FunctionModifier wishes to rely on the default translation of the conversion visitor.- Specified by:
translate
in classFunctionModifier
- Parameters:
function
- IFunction to be translated- Returns:
- List of translated parts, or null
-
-