[ 1842534 ] Grant independence to GenerateModel from AD_Process_ID

http://sourceforge.net/tracker/index.php?func=detail&aid=1842534&group_id=176962&atid=879335
This commit is contained in:
vpj-cd 2007-12-02 17:34:28 +00:00
parent f3a7f94b77
commit 2b4ec11d8d
1 changed files with 2 additions and 10 deletions

View File

@ -420,19 +420,12 @@ public class MProcess extends X_AD_Process
* @param String tableName
* @return int retValue
*/
public static int getProcess_ID(String value) {
public static int getProcess_ID(String value, String trxname) {
int retValue = 0;
String SQL = "SELECT AD_Process_ID FROM AD_Process WHERE value = ?";
try
{
if (DB.isRemoteObjects())
{
Server server = CConnection.get().getServer();
retValue = server.getTableID(value);
}
else
{
PreparedStatement pstmt = DB.prepareStatement(SQL, null);
PreparedStatement pstmt = DB.prepareStatement(SQL, trxname);
pstmt.setString(1, value);
ResultSet rs = pstmt.executeQuery();
if (rs.next())
@ -440,7 +433,6 @@ public class MProcess extends X_AD_Process
rs.close();
pstmt.close();
}
}
catch (Exception e)
{
retValue = -1;