* reorganized imports
* commented some unused variables * fixed java 5 warnings
This commit is contained in:
parent
874cd059de
commit
8805fceef2
|
@ -16,19 +16,45 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.compiere.model;
|
package org.compiere.model;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.Serializable;
|
||||||
import java.math.*;
|
import java.io.StringWriter;
|
||||||
import java.sql.*;
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.sql.Blob;
|
||||||
import java.util.logging.*;
|
import java.sql.Clob;
|
||||||
import javax.xml.parsers.*;
|
import java.sql.PreparedStatement;
|
||||||
import javax.xml.transform.*;
|
import java.sql.ResultSet;
|
||||||
import javax.xml.transform.dom.*;
|
import java.sql.SQLException;
|
||||||
import javax.xml.transform.stream.*;
|
import java.sql.Timestamp;
|
||||||
import org.compiere.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
|
import javax.xml.transform.Transformer;
|
||||||
|
import javax.xml.transform.TransformerFactory;
|
||||||
|
import javax.xml.transform.dom.DOMSource;
|
||||||
|
import javax.xml.transform.stream.StreamResult;
|
||||||
|
|
||||||
|
import org.compiere.Adempiere;
|
||||||
import org.compiere.acct.Doc;
|
import org.compiere.acct.Doc;
|
||||||
import org.compiere.util.*;
|
import org.compiere.util.CLogMgt;
|
||||||
import org.w3c.dom.*;
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.CacheMgt;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.DBException;
|
||||||
|
import org.compiere.util.DisplayType;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.Evaluatee;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
|
import org.compiere.util.SecureEngine;
|
||||||
|
import org.compiere.util.Trace;
|
||||||
|
import org.compiere.util.Trx;
|
||||||
|
import org.w3c.dom.Document;
|
||||||
|
import org.w3c.dom.Element;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Persistent Object.
|
* Persistent Object.
|
||||||
|
@ -1243,7 +1269,7 @@ public abstract class PO
|
||||||
for (index = 0; index < size; index++)
|
for (index = 0; index < size; index++)
|
||||||
{
|
{
|
||||||
String columnName = p_info.getColumnName(index);
|
String columnName = p_info.getColumnName(index);
|
||||||
Class clazz = p_info.getColumnClass(index);
|
Class<?> clazz = p_info.getColumnClass(index);
|
||||||
int dt = p_info.getColumnDisplayType(index);
|
int dt = p_info.getColumnDisplayType(index);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1306,7 +1332,7 @@ public abstract class PO
|
||||||
String value = (String)hmIn.get(columnName);
|
String value = (String)hmIn.get(columnName);
|
||||||
if (value == null)
|
if (value == null)
|
||||||
continue;
|
continue;
|
||||||
Class clazz = p_info.getColumnClass(index);
|
Class<?> clazz = p_info.getColumnClass(index);
|
||||||
int dt = p_info.getColumnDisplayType(index);
|
int dt = p_info.getColumnDisplayType(index);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1368,7 +1394,7 @@ public abstract class PO
|
||||||
// Display Type
|
// Display Type
|
||||||
int dt = p_info.getColumnDisplayType(i);
|
int dt = p_info.getColumnDisplayType(i);
|
||||||
// Based on class of definition, not class of value
|
// Based on class of definition, not class of value
|
||||||
Class c = p_info.getColumnClass(i);
|
Class<?> c = p_info.getColumnClass(i);
|
||||||
String stringValue = null;
|
String stringValue = null;
|
||||||
if (c == Object.class)
|
if (c == Object.class)
|
||||||
; // saveNewSpecial (value, i));
|
; // saveNewSpecial (value, i));
|
||||||
|
@ -1400,11 +1426,11 @@ public abstract class PO
|
||||||
// Custom Columns
|
// Custom Columns
|
||||||
if (m_custom != null)
|
if (m_custom != null)
|
||||||
{
|
{
|
||||||
Iterator it = m_custom.keySet().iterator();
|
Iterator<String> it = m_custom.keySet().iterator();
|
||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
{
|
{
|
||||||
String column = (String)it.next();
|
String column = (String)it.next();
|
||||||
int index = p_info.getColumnIndex(column);
|
// int index = p_info.getColumnIndex(column);
|
||||||
String value = (String)m_custom.get(column);
|
String value = (String)m_custom.get(column);
|
||||||
if (value != null)
|
if (value != null)
|
||||||
hmOut.put(column, value);
|
hmOut.put(column, value);
|
||||||
|
@ -2076,7 +2102,7 @@ public abstract class PO
|
||||||
|| p_info.isVirtualColumn(i))
|
|| p_info.isVirtualColumn(i))
|
||||||
continue;
|
continue;
|
||||||
// we have a change
|
// we have a change
|
||||||
Class c = p_info.getColumnClass(i);
|
Class<?> c = p_info.getColumnClass(i);
|
||||||
int dt = p_info.getColumnDisplayType(i);
|
int dt = p_info.getColumnDisplayType(i);
|
||||||
String columnName = p_info.getColumnName(i);
|
String columnName = p_info.getColumnName(i);
|
||||||
//
|
//
|
||||||
|
@ -2178,7 +2204,7 @@ public abstract class PO
|
||||||
// Custom Columns (cannot be logged as no column)
|
// Custom Columns (cannot be logged as no column)
|
||||||
if (m_custom != null)
|
if (m_custom != null)
|
||||||
{
|
{
|
||||||
Iterator it = m_custom.keySet().iterator();
|
Iterator<String> it = m_custom.keySet().iterator();
|
||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
{
|
{
|
||||||
if (changes)
|
if (changes)
|
||||||
|
@ -2336,7 +2362,7 @@ public abstract class PO
|
||||||
sqlInsert.append(p_info.getColumnName(i));
|
sqlInsert.append(p_info.getColumnName(i));
|
||||||
//
|
//
|
||||||
// Based on class of definition, not class of value
|
// Based on class of definition, not class of value
|
||||||
Class c = p_info.getColumnClass(i);
|
Class<?> c = p_info.getColumnClass(i);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (c == Object.class) // may have need to deal with null values differently
|
if (c == Object.class) // may have need to deal with null values differently
|
||||||
|
@ -2397,7 +2423,7 @@ public abstract class PO
|
||||||
// Custom Columns
|
// Custom Columns
|
||||||
if (m_custom != null)
|
if (m_custom != null)
|
||||||
{
|
{
|
||||||
Iterator it = m_custom.keySet().iterator();
|
Iterator<String> it = m_custom.keySet().iterator();
|
||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
{
|
{
|
||||||
String column = (String)it.next();
|
String column = (String)it.next();
|
||||||
|
@ -2498,7 +2524,7 @@ public abstract class PO
|
||||||
String colName = p_info.getColumnName(index);
|
String colName = p_info.getColumnName(index);
|
||||||
String colClass = p_info.getColumnClass(index).toString();
|
String colClass = p_info.getColumnClass(index).toString();
|
||||||
String colValue = value == null ? "null" : value.getClass().toString();
|
String colValue = value == null ? "null" : value.getClass().toString();
|
||||||
int dt = p_info.getColumnDisplayType(index);
|
// int dt = p_info.getColumnDisplayType(index);
|
||||||
|
|
||||||
log.log(Level.SEVERE, "Unknown class for column " + colName
|
log.log(Level.SEVERE, "Unknown class for column " + colName
|
||||||
+ " (" + colClass + ") - Value=" + colValue);
|
+ " (" + colClass + ") - Value=" + colValue);
|
||||||
|
@ -3496,7 +3522,7 @@ public abstract class PO
|
||||||
// Display Type
|
// Display Type
|
||||||
int dt = p_info.getColumnDisplayType(i);
|
int dt = p_info.getColumnDisplayType(i);
|
||||||
// Based on class of definition, not class of value
|
// Based on class of definition, not class of value
|
||||||
Class c = p_info.getColumnClass(i);
|
Class<?> c = p_info.getColumnClass(i);
|
||||||
if (value == null || value.equals (Null.NULL))
|
if (value == null || value.equals (Null.NULL))
|
||||||
;
|
;
|
||||||
else if (c == Object.class)
|
else if (c == Object.class)
|
||||||
|
@ -3526,11 +3552,11 @@ public abstract class PO
|
||||||
// Custom Columns
|
// Custom Columns
|
||||||
if (m_custom != null)
|
if (m_custom != null)
|
||||||
{
|
{
|
||||||
Iterator it = m_custom.keySet().iterator();
|
Iterator<String> it = m_custom.keySet().iterator();
|
||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
{
|
{
|
||||||
String columnName = (String)it.next();
|
String columnName = (String)it.next();
|
||||||
int index = p_info.getColumnIndex(columnName);
|
// int index = p_info.getColumnIndex(columnName);
|
||||||
String value = (String)m_custom.get(columnName);
|
String value = (String)m_custom.get(columnName);
|
||||||
//
|
//
|
||||||
Element col = document.createElement(columnName);
|
Element col = document.createElement(columnName);
|
||||||
|
|
Loading…
Reference in New Issue