Organize imports and some parameterizing

TEO PLS REVIEW
This commit is contained in:
Redhuan D. Oon 2008-11-20 08:02:25 +00:00
parent a19c25c294
commit b6d001731a
2 changed files with 25 additions and 14 deletions

View File

@ -16,11 +16,15 @@
*****************************************************************************/
package org.compiere.report.core;
import java.math.*;
import java.sql.*;
import java.util.*;
import org.compiere.model.*;
import org.compiere.util.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.model.MLookupFactory;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Language;
import org.compiere.util.Msg;
/**
* Report Column
@ -189,7 +193,7 @@ public class RColumn
* @param colSQL SQL select code for column
* @param colClass class of column - determines display
*/
public RColumn (String colHeader, String colSQL, Class colClass)
public RColumn (String colHeader, String colSQL, Class<?> colClass)
{
m_colHeader = colHeader;
m_colSQL = colSQL;
@ -206,7 +210,7 @@ public class RColumn
/** Column Display SQL */
private String m_displaySQL;
/** Column Display Class */
private Class m_colClass;
private Class<?> m_colClass;
/** Display Type */
private int m_displayType = 0;
@ -267,11 +271,11 @@ public class RColumn
/**
* Column Display Class
*/
public Class getColClass()
public Class<?> getColClass()
{
return m_colClass;
}
public void setColClass(Class colClass)
public void setColClass(Class<?> colClass)
{
m_colClass = colClass;
}

View File

@ -16,9 +16,11 @@
*****************************************************************************/
package org.compiere.report.core;
import java.io.*;
import java.util.*;
import org.compiere.util.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Properties;
import org.compiere.util.CLogger;
/**
* Report Model.
@ -32,6 +34,11 @@ import org.compiere.util.*;
*/
public class RModel implements Serializable
{
/**
*
*/
private static final long serialVersionUID = 1283407521250413019L;
/**
* Constructor. Creates RModelData
* @param TableName
@ -298,7 +305,7 @@ public class RModel implements Serializable
* @param col index
* @return Column Class
*/
public Class getColumnClass (int col)
public Class<?> getColumnClass (int col)
{
if (col < 0 || col > m_data.cols.size())
throw new java.lang.IllegalArgumentException("Column invalid");
@ -335,7 +342,7 @@ public class RModel implements Serializable
return null;
// throw new java.lang.IllegalArgumentException("Column invalid");
//
ArrayList myRow = (ArrayList)m_data.rows.get(row);
ArrayList<Object> myRow = (ArrayList<Object>)m_data.rows.get(row);
// invalid column
if (myRow == null || col >= myRow.size())
return null;