ar.com.fdvs.dj.util
Class Utils

java.lang.Object
  extended by ar.com.fdvs.dj.util.Utils

public class Utils
extends java.lang.Object


Method Summary
static void addNotNull(java.util.Collection col, java.lang.Object obj)
           
static net.sf.jasperreports.engine.design.JRDesignStyle cloneStyle(net.sf.jasperreports.engine.design.JRDesignStyle style)
           
static void copyProperties(java.lang.Object dest, java.lang.Object orig)
          This takes into account objects that breaks the JavaBean convention and have as getter for Boolean objects an "isXXX" method.
static java.lang.String escapeTextForExpression(java.lang.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(java.util.Collection col)
          Returns true if collection is null or empty
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isEmpty

public static boolean isEmpty(java.util.Collection col)
Returns true if collection is null or empty

Parameters:
col -
Returns:

addNotNull

public static void addNotNull(java.util.Collection col,
                              java.lang.Object obj)

copyProperties

public static void copyProperties(java.lang.Object dest,
                                  java.lang.Object orig)
This takes into account objects that breaks the JavaBean convention and have as getter for Boolean objects an "isXXX" method.

Parameters:
dest -
orig -

main

public static void main(java.lang.String[] args)

escapeTextForExpression

public static java.lang.String escapeTextForExpression(java.lang.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.

Parameters:
title -
Returns:

cloneStyle

public static net.sf.jasperreports.engine.design.JRDesignStyle cloneStyle(net.sf.jasperreports.engine.design.JRDesignStyle style)


Copyright © 2006-2011 FDV Solutions. All Rights Reserved.