[ 1712241 ] Delete hard code to set a Column, Tab , Window
- partial revert of revision 2414 - enhance logging
This commit is contained in:
parent
4f047fdb87
commit
cf7a8ea39c
|
@ -18,6 +18,8 @@ package org.compiere.model;
|
||||||
|
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.util.*;
|
import org.compiere.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -63,6 +65,8 @@ public class MColumn extends X_AD_Column
|
||||||
/** Cache */
|
/** Cache */
|
||||||
private static CCache<Integer,MColumn> s_cache = new CCache<Integer,MColumn>("AD_Column", 20);
|
private static CCache<Integer,MColumn> s_cache = new CCache<Integer,MColumn>("AD_Column", 20);
|
||||||
|
|
||||||
|
/** Static Logger */
|
||||||
|
private static CLogger s_log = CLogger.getCLogger (MColumn.class);
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Standard Constructor
|
* Standard Constructor
|
||||||
|
@ -509,6 +513,7 @@ public class MColumn extends X_AD_Column
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
|
s_log.log(Level.SEVERE, SQL, e);
|
||||||
retValue = -1;
|
retValue = -1;
|
||||||
}
|
}
|
||||||
return retValue;
|
return retValue;
|
||||||
|
|
|
@ -435,6 +435,7 @@ public class MProcess extends X_AD_Process
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
s_log.log(Level.SEVERE, SQL, e);
|
||||||
retValue = -1;
|
retValue = -1;
|
||||||
}
|
}
|
||||||
return retValue;
|
return retValue;
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.sql.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import java.util.logging.*;
|
import java.util.logging.*;
|
||||||
|
|
||||||
import org.compiere.util.*;
|
import org.compiere.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,6 +100,10 @@ public class MTab extends X_AD_Tab
|
||||||
/** The Fields */
|
/** The Fields */
|
||||||
private MField[] m_fields = null;
|
private MField[] m_fields = null;
|
||||||
|
|
||||||
|
/** Static Logger */
|
||||||
|
private static CLogger s_log = CLogger.getCLogger (MTab.class);
|
||||||
|
|
||||||
|
/** Packages for Model Classes */
|
||||||
/**
|
/**
|
||||||
* Get Fields
|
* Get Fields
|
||||||
* @param reload reload data
|
* @param reload reload data
|
||||||
|
@ -179,6 +184,7 @@ public class MTab extends X_AD_Tab
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
|
s_log.log(Level.SEVERE, SQL, e);
|
||||||
retValue = -1;
|
retValue = -1;
|
||||||
}
|
}
|
||||||
return retValue;
|
return retValue;
|
||||||
|
|
|
@ -761,6 +761,7 @@ public class MTable extends X_AD_Table
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
s_log.log(Level.SEVERE, SQL, e);
|
||||||
retValue = -1;
|
retValue = -1;
|
||||||
}
|
}
|
||||||
return retValue;
|
return retValue;
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.awt.*;
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.logging.*;
|
import java.util.logging.*;
|
||||||
|
|
||||||
import org.compiere.util.*;
|
import org.compiere.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -234,6 +235,7 @@ public class MWindow extends X_AD_Window
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
|
s_log.log(Level.SEVERE, SQL, e);
|
||||||
retValue = -1;
|
retValue = -1;
|
||||||
}
|
}
|
||||||
return retValue;
|
return retValue;
|
||||||
|
|
|
@ -79,6 +79,7 @@ public class MPrintFormat extends X_AD_PrintFormat
|
||||||
/** Table Format */
|
/** Table Format */
|
||||||
private MPrintTableFormat m_tFormat;
|
private MPrintTableFormat m_tFormat;
|
||||||
|
|
||||||
|
/** Static Logger */
|
||||||
private static CLogger s_log = CLogger.getCLogger (MPrintFormat.class);
|
private static CLogger s_log = CLogger.getCLogger (MPrintFormat.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -841,33 +842,6 @@ public class MPrintFormat extends X_AD_PrintFormat
|
||||||
s_formats.put(key, null);
|
s_formats.put(key, null);
|
||||||
} // deleteFromCache
|
} // deleteFromCache
|
||||||
|
|
||||||
//begin vpj-cd e-evolution
|
|
||||||
/**
|
|
||||||
* Get ID of Print Format use Name
|
|
||||||
* @param String formatName
|
|
||||||
* @return int retValue
|
|
||||||
*/
|
|
||||||
public static int getPrintFormat_ID(String formatName) {
|
|
||||||
int retValue = 0;
|
|
||||||
String SQL = "SELECT AD_PrintFormat_ID FROM AD_PrintFormat WHERE Name = ?";
|
|
||||||
try
|
|
||||||
{
|
|
||||||
PreparedStatement pstmt = DB.prepareStatement(SQL, null);
|
|
||||||
pstmt.setString(1, formatName);
|
|
||||||
ResultSet rs = pstmt.executeQuery();
|
|
||||||
if (rs.next())
|
|
||||||
retValue = rs.getInt(1);
|
|
||||||
rs.close();
|
|
||||||
pstmt.close();
|
|
||||||
}
|
|
||||||
catch (SQLException e)
|
|
||||||
{
|
|
||||||
retValue = -1;
|
|
||||||
}
|
|
||||||
return retValue;
|
|
||||||
}
|
|
||||||
//end vpj-cd e-evolution
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param AD_Table_ID
|
* @param AD_Table_ID
|
||||||
* @param AD_Client_ID use -1 to retrieve from all client
|
* @param AD_Client_ID use -1 to retrieve from all client
|
||||||
|
|
Loading…
Reference in New Issue