Class EtlVariable.TextUtils

java.lang.Object
scriptella.core.EtlVariable.TextUtils
Enclosing class:
EtlVariable

public static class EtlVariable.TextUtils extends Object
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 Details

    • TextUtils

      public TextUtils()
  • Method Details

    • ifNull

      public Object ifNull(Object object, Object replacement)
      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

      public Object ifNull(Object object)
      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

      public Object nullIf(Object expr1, Object expr2)
      If expr1 = expr2 is true, return NULL else return expr1.
      Parameters:
      expr1 - first expression
      expr2 - second expression
      Returns:
      true if expr1 = expr2, otherwise null.