scriptella.expression
Class EtlVariable.TextUtils

java.lang.Object
  extended by scriptella.expression.EtlVariable.TextUtils
Enclosing class:
EtlVariable

public static class EtlVariable.TextUtils
extends java.lang.Object

Utility class for ETL file expressions.

Provides text operations.


Constructor Summary
EtlVariable.TextUtils()
           
 
Method Summary
 java.lang.Object ifNull(java.lang.Object object)
          Substitute an object with empty string when a null value is encountered.
 java.lang.Object ifNull(java.lang.Object object, java.lang.Object replacement)
          Substitute an object when a null value is encountered.
 java.lang.Object nullIf(java.lang.Object expr1, java.lang.Object expr2)
          If expr1 = expr2 is true, return NULL else return expr1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EtlVariable.TextUtils

public EtlVariable.TextUtils()
Method Detail

ifNull

public java.lang.Object ifNull(java.lang.Object object,
                               java.lang.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 java.lang.Object ifNull(java.lang.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 java.lang.Object nullIf(java.lang.Object expr1,
                               java.lang.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.


Copyright © Copyright 2006-2009 The Scriptella Project Team.