Package scriptella.core
Class EtlVariable.TextUtils
java.lang.Object
scriptella.core.EtlVariable.TextUtils
- Enclosing class:
- EtlVariable
Utility class for ETL file expressions.
Provides text operations.
Note: As of version 1.1 the same functionality can be achieved by directly using JEXL2.0 syntax elements like ternary operators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSubstitute an object with empty string when a null value is encountered.Substitute an object when a null value is encountered.If expr1 = expr2 is true, return NULL else return expr1.
-
Constructor Details
-
TextUtils
public TextUtils()
-
-
Method Details
-
ifNull
Substitute an object when a null value is encountered.- Parameters:
object- object to check.replacement- replacement object.- Returns:
- object or replacement if object==null
-
ifNull
Substitute an object with empty string when a null value is encountered.- Parameters:
object- object to check.- Returns:
- object or empty string if object==null.
-
nullIf
If expr1 = expr2 is true, return NULL else return expr1.- Parameters:
expr1- first expressionexpr2- second expression- Returns:
- true if expr1 = expr2, otherwise null.
-