public class Utils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
addNotNull(Collection col,
Object obj) |
static net.sf.jasperreports.engine.design.JRDesignStyle |
cloneStyle(net.sf.jasperreports.engine.design.JRDesignStyle style) |
static void |
copyProperties(Object dest,
Object orig)
This takes into account objects that breaks the JavaBean convention
and have as getter for Boolean objects an "isXXX" method.
|
static String |
escapeTextForExpression(String text)
When adding a text to an expression, we have to make sure that the String will not
break JasperReports expression syntax.
For example: if the title text is: November "2009" sales The double quotes (") must be escaped to \", and in java that would be \\\\\" To understand better, the expression can be tested in iReport expression editor. |
static boolean |
isEmpty(Collection col)
Returns true if collection is null or empty
|
static void |
main(String[] args) |
static boolean |
stringSet(String string)
Check whether
string has been set to
something other than "" or null . |
public static boolean isEmpty(Collection col)
col
- public static void addNotNull(Collection col, Object obj)
public static void copyProperties(Object dest, Object orig)
dest
- orig
- public static void main(String[] args)
public static String escapeTextForExpression(String text)
text
- public static net.sf.jasperreports.engine.design.JRDesignStyle cloneStyle(net.sf.jasperreports.engine.design.JRDesignStyle style)
public static final boolean stringSet(String string)
string
has been set to
something other than ""
or null
.string
- the String
to checkCopyright © 2006-2014 FDV Solutions. All Rights Reserved.