Little utility with helper methods that all the delegates can use.
| Type Params | Return Type | Name and description |
|---|---|---|
|
static java.lang.Object |
expandExpressions(java.lang.Object expression, java.lang.Object databaseChangeLog)Helper method that expands a text expression, replacing variables inside strings with their values from the database change log parameters. |
|
static boolean |
parseTruth(java.lang.Object value, java.lang.Object defaultValue)Helper method to determine the truth of a value. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Helper method that expands a text expression, replacing variables inside strings with their values from the database change log parameters.
expression - the text to expand, or null if the expression is null.databaseChangeLog - the database change log Helper method to determine the truth of a value. We need this because
Groovy's asBoolean method for Strings treats any non-empty string
as true, including the string whose contents are "false". This means
that a property whose value is "false" would be set to true in a simple
if statement.
We get around this problem by using the toBoolean method if the
given value is a String. This way, only the strings "1", "true", and
"y" are treated as true. All others are treated as false.
Examples of "true" values are true, 1, and "true".
Examples of "false" are false, 0, and "false".
value - the value to parsedefaultValue - the default value to use if there is no value given.