Initial integration of 2Pack from Robert Klein, please consider it in alpha stage

This commit is contained in:
Carlos Ruiz 2006-12-12 08:47:01 +00:00
parent f0329c4de9
commit 18cda4327a
18 changed files with 10979 additions and 0 deletions

View File

@ -0,0 +1,121 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*
* Copyright (C) 2005 Robert Klein. robeklein@hotmail.com
* _____________________________________________
*****************************************************************************/
package org.compiere.PackOut;
import java.io.*;
import java.util.zip.*;
import java.util.*;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Target;
import org.apache.tools.ant.taskdefs.Zip;
import org.apache.tools.ant.taskdefs.GZip;
import org.apache.tools.ant.taskdefs.Tar;
import org.apache.tools.ant.taskdefs.Expand;
/**
* Compress package
*
* @author Rob Klein
* @version $Id: ImportFAJournal2.java,v 1.0 $
*
*/
public class CreateZipFile {
/**
* Zip the srcFolder into the destFileZipFile. All the folder subtree of the src folder is added to the destZipFile
* archive.
*
*
* @param srcFolder File, the path of the srcFolder
* @param destZipFile File, the path of the destination zipFile. This file will be created or erased.
*/
static public void zipFolder(File srcFolder, File destZipFile, String includesdir)
{
Zip zipper = new Zip();
zipper.setDestFile(destZipFile);
zipper.setBasedir(srcFolder);
zipper.setIncludes(includesdir);
zipper.setUpdate(true);
zipper.setCompress(true);
zipper.setCaseSensitive(false);
zipper.setFilesonly(false);
zipper.setTaskName("zip");
zipper.setTaskType("zip");
zipper.setProject(new Project());
zipper.setOwningTarget(new Target());
zipper.execute();
System.out.println(destZipFile);
}
static public void tarFolder(File srcFolder, File destTarFile, String includesdir)
{
Tar tarer = new Tar();
tarer.setDestFile(destTarFile);
tarer.setBasedir(srcFolder);
tarer.setIncludes(includesdir);
tarer.setCaseSensitive(false);
tarer.setTaskName("tar");
tarer.setTaskType("tar");
tarer.setProject(new Project());
tarer.setOwningTarget(new Target());
tarer.execute();
}
static public void gzipFile(File srcFile, File destFile)
{
GZip GZiper = new GZip();
GZiper.setDestfile(destFile);
GZiper.setSrc(srcFile);
GZiper.setTaskName("gzip");
GZiper.setTaskType("gzip");
GZiper.setProject(new Project());
GZiper.setOwningTarget(new Target());
GZiper.execute();
}
static public void unpackFile(File zipFilepath, File destinationDir)
{
Expand Unzipper = new Expand();
Unzipper.setDest(destinationDir);
Unzipper.setSrc(zipFilepath);
Unzipper.setTaskType ("unzip");
Unzipper.setTaskName ("unzip");
Unzipper.setProject(new Project());
Unzipper.setOwningTarget(new Target());
Unzipper.execute();
}
static public String getParentDir(File zipFilepath)
{
String ParentDir=null;
try {
ZipFile zipFile = new ZipFile(zipFilepath);
Enumeration entries = zipFile.entries();
ZipEntry entry = (ZipEntry)entries.nextElement();
File tempfile = new File(entry.getName());
while (tempfile.getParent()!=null)
tempfile = tempfile.getParentFile();
return tempfile.getName();
} catch (IOException ioe) {
System.err.println("Unhandled exception:");
ioe.printStackTrace();
return "";
}
}
}// CreateZipFile

View File

@ -0,0 +1,107 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*
* Copyright (C) 2004 Marco LOMBARDO. lombardo@mayking.com
* Contributor(s): __________________________________________
*****************************************************************************/
// ----------------------------------------------------------------------
// Generic PO.
// Used to insert/update data from a adempieredata.xml file.
package org.compiere.PackOut;
// import for GenericPO
import java.util.*;
import java.sql.*;
import java.math.*;
import org.compiere.util.*;
import org.compiere.model.*;
public class IntGenericPO extends PO {
//private Logger log = Logger.getCLogger(getClass());
/** Standard Constructor */
public IntGenericPO (Properties ctx, int ID)
{
super (ctx, ID,null,null);
}
/** Load Constructor */
public IntGenericPO (Properties ctx, ResultSet rs)
{
super (ctx, 0, null, rs);
}
private int Table_ID = 0;
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
Table_ID = Integer.valueOf(ctx.getProperty("adempieredataTable_ID")).intValue();
//log.info("Table_ID: "+Table_ID);
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("GenericPO[Table=").append(""+Table_ID+",ID=").append(get_ID()).append("]");
return sb.toString();
}
public static final int AD_ORGTRX_ID_AD_Reference_ID=130;
/** Set Trx Organization.
Performing or initiating organization */
public void setAD_OrgTrx_ID (int AD_OrgTrx_ID)
{
if (AD_OrgTrx_ID == 0) set_Value ("AD_OrgTrx_ID", null);
else
set_Value ("AD_OrgTrx_ID", new Integer(AD_OrgTrx_ID));
}
/** Get Trx Organization.
Performing or initiating organization */
public int getAD_OrgTrx_ID()
{
Integer ii = (Integer)get_Value("AD_OrgTrx_ID");
if (ii == null) return 0;
return ii.intValue();
}
// setValue
public void setValue(String columnName, Object value) {
set_Value(columnName, value);
}
// setValueNoCheck
public void setValueNoCheck(String columnName, Object value) {
set_ValueNoCheck(columnName, value);
}
// setValue
public void setValue(int index, Object value) {
set_Value(index, value);
}
public void copyRS(PO From, PO To) {
copyValues(From, To);
}
@Override
protected int get_AccessLevel() {
// TODO Auto-generated method stub
return 0;
}
} // GenericPO

View File

@ -0,0 +1,158 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*
* Copyright (C) 2005 Robert KLEIN. robeklein@hotmail.com
*
*****************************************************************************/
package org.compiere.PackOut;
import java.io.File;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.parsers.SAXParser;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.CLogger;
import org.compiere.model.*;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Ini;
import org.compiere.util.Util;
import java.util.logging.*;
/**
* IntPackIn Tool.
* @author: Robert KLEIN. robeklein@hotmail.com
*/
public class IntPackIn extends SvrProcess
{
/** Logger */
private CLogger log = CLogger.getCLogger("PackIn");
public static String m_UpdateMode = "false";
public static String m_Database = "Oracle";
public static String m_Package_Dir = null;
public int p_IntPackIn_ID = 0;
protected void prepare()
{
p_IntPackIn_ID = getRecord_ID();
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
}
} // prepare
/**
* Uses PackInHandler to update AD.
* @param fileName xml file to read
* @return status message
*/
public String importXML (String fileName) {
log.info("importXML:" + fileName);
File in = new File (fileName);
if (!in.exists()) {
String msg = "File does not exist: " + fileName;
log.info("importXML:" + msg);
return msg;
}
try {
log.info("starting");
System.setProperty("javax.xml.parsers.SAXParserFactory",
"org.apache.xerces.jaxp.SAXParserFactoryImpl");
IntPackInHandler handler = new IntPackInHandler();
handler.set_TrxName(get_TrxName());
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
String msg = "Start Parser";
log.info (msg);
parser.parse(in, handler);
msg = "End Parser";
log.info (msg);
return "OK.";
}
catch (Exception e) {
log.log(Level.SEVERE,"importXML:", e);
return e.toString();
}
}
/**
* Doit
* @return ""
*
*/
protected String doIt()
{
X_AD_Package_Imp_Proc IntPackIn = new X_AD_Package_Imp_Proc(
getCtx(),p_IntPackIn_ID, null);
// Create Target directory if required
String fileSeperator=null;
File tempfile = new File("");
fileSeperator = tempfile.separator;
File targetDir = new
File(IntPackIn.getAD_Package_Dir()+fileSeperator+"packages");
if (!targetDir.exists()){
boolean success = (new File(IntPackIn.getAD_Package_Dir()+fileSeperator+"packages")).mkdirs();
if (!success) {
log.info("Target directory creation failed");
}
}
//Unzip package
File zipFilepath = new File(IntPackIn.getAD_Package_Source());
String PackageName = CreateZipFile.getParentDir(zipFilepath);
CreateZipFile.unpackFile(zipFilepath,targetDir);
String dict_file = IntPackIn.getAD_Package_Dir()+fileSeperator+"packages"+fileSeperator+PackageName
+fileSeperator+"dict"+fileSeperator+"PackOut.xml";
log.info("dict file->"+dict_file);
IntPackIn impXML = new IntPackIn();
if(IntPackIn.isAD_Override_Dict()== true)
impXML.m_UpdateMode = "true";
else
impXML.m_UpdateMode = "false";
impXML.m_Package_Dir=IntPackIn.getAD_Package_Dir()+fileSeperator+"packages"+fileSeperator+PackageName
+fileSeperator;
if (DB.isOracle())
impXML.m_Database = "Oracle";
/* else if (DB.isSybase())
impXML.m_Database = "Sybase";
*/
//call XML Handler
impXML.importXML(dict_file);
//Generate Model Classes
String args[] = {IntPackIn.getAD_Package_Dir()+"/dbPort/src/org/compiere/model/", "org.compiere.model","'U'"};
org.compiere.util.GenerateModel.main(args) ;
return "";
} // doIt
} // IntPackIn

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,462 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*
* Copyright (C) 2005 Robert Klein. robeklein@hotmail.com
* _____________________________________________
*****************************************************************************/
package org.compiere.PackOut;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.*;
import org.compiere.model.*;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.process.*;
/**
* Reverse Package Install.
*
* @author Robert Klein
*
*/
public class PackRoll extends SvrProcess
{
/** Package from Record */
private int m_AD_Package_Imp_ID = 0;
private String m_Processing = null;
StringBuffer sql = null;
StringBuffer sqlB = null;
String columnIDName=null;
StringBuffer sqlC = null;
StringBuffer sqlD = null;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("Processing"))
m_Processing = (String)para[i].getParameter();
else
log.log(Level.SEVERE, "prepare - Unknown Parameter: " + name);
}
m_AD_Package_Imp_ID = getRecord_ID();
} // prepare
/**
* Perform process.
* @return Message (translated text)
* @throws Exception if not successful
*/
protected String doIt() throws Exception
{
sqlB = new StringBuffer ("UPDATE AD_Package_Imp "
+ "SET PK_Status = 'Uninstalling' "
+ "WHERE AD_Package_Imp_ID = " + m_AD_Package_Imp_ID);
int no = DB.executeUpdate (sqlB.toString(), get_TrxName());
log.info("Starting Package Reversal");
//select all records that are new or have been updated by package install
sql = new StringBuffer ("SELECT * "
+ "FROM AD_Package_Imp_Detail "
+ "WHERE AD_Package_Imp_ID=" + m_AD_Package_Imp_ID
+ " ORDER BY AD_Package_Imp_Detail_ID DESC");
log.info(sql.toString());
int x = 0;
PreparedStatement pstmt = null;
try
{
pstmt = DB.prepareStatement (sql.toString (), null);
ResultSet rs = pstmt.executeQuery ();
while (rs.next())
{
if (rs.getString("Type").compareTo("file") == 0){
sqlB = new StringBuffer ("SELECT * "
+ "FROM AD_Package_Imp_Backup "
+ "WHERE AD_Package_Imp_Detail_ID=" + rs.getInt("AD_Package_Imp_Detail_ID")
+ " AND AD_Package_Imp_ID=" + rs.getInt("AD_Package_Imp_ID")
);
PreparedStatement pstmt2 = null;
try
{
pstmt2 = DB.prepareStatement (sqlB.toString (), get_TrxName());
ResultSet rs2 = pstmt2.executeQuery ();
while (rs2.next())
{
if (rs2.getString("AD_Package_Imp_Bck_Dir") != null && rs2.getString("AD_Package_Imp_Org_Dir") != null ){
copyFile (rs2.getString("AD_Package_Imp_Bck_Dir"),rs2.getString("AD_Package_Imp_Org_Dir"));
}
//Update uninstall field for column
sqlD = new StringBuffer ("UPDATE AD_Package_Imp_Backup"
+ " SET Uninstall = 'Y'"
+ " WHERE AD_Package_Imp_Backup_ID = "+ rs2.getInt("AD_Package_Imp_Backup_ID"));
no = DB.executeUpdate(sqlD.toString(), null);
// Update uninstall field for record
sqlD = new StringBuffer ("UPDATE AD_Package_Imp_Detail"
+ " SET Uninstall = 'Y'"
+ " WHERE AD_Package_Imp_Detail_ID = "+ rs.getInt("AD_Package_Imp_Detail_ID"));
no = DB.executeUpdate(sqlD.toString(), null);
}
rs2.close ();
pstmt2.close ();
pstmt2 = null;
}
catch (Exception e)
{
log.log(Level.SEVERE, "doIt", e);
}
finally
{
try
{
if (pstmt2 != null)
pstmt2.close ();
}
catch (Exception e)
{}
pstmt2 = null;
}
}
else {
String tableName = rs.getString("TableName");
int recordID = rs.getInt("AD_Original_ID");
//determine if record is an update to the original
//if record is an update then update record with backup settings
//else inactivate record
if (rs.getString("ACTION").compareTo("Update")== 0){
//select all backed up columns for the record
sqlB = new StringBuffer ("SELECT * "
+ "FROM AD_Package_Imp_Backup "
+ "WHERE AD_Package_Imp_Detail_ID=" + rs.getInt("AD_Package_Imp_Detail_ID")
+ " AND AD_Package_Imp_ID=" + rs.getInt("AD_Package_Imp_ID")
);
PreparedStatement pstmt2 = null;
try
{
pstmt2 = DB.prepareStatement (sqlB.toString (), get_TrxName());
ResultSet rs2 = pstmt2.executeQuery ();
while (rs2.next())
{
sql = new StringBuffer ("SELECT IsKey FROM AD_Column WHERE AD_Column_ID = ?");
String IsKey = DB.getSQLValueString(get_TrxName(),sql.toString(),rs2.getInt("AD_Column_ID"));
//Get Table value
sql = new StringBuffer ("SELECT TableName FROM AD_Table WHERE AD_Table_ID = ?");
tableName = DB.getSQLValueString(get_TrxName(),sql.toString(),rs2.getInt("AD_Table_ID"));
//Get Column Name
sql = new StringBuffer ("SELECT ColumnName FROM AD_Column WHERE AD_Column_ID = ?");
String columnName = DB.getSQLValueString(get_TrxName(),sql.toString(),rs2.getInt("AD_Column_ID"));
//log.info(columnName);
//Update columns for record
//TODO make process more efficient!
if ( IsKey.equals("Y")||columnName.startsWith("Created"))
; // ignore is a Key Column or if it references a Created(By) Column
//Update "Updated" field with current date
else if ( columnName.equals("Updated")){
//Format Date
//TODO Correct to include proper time of update
Date today = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yyyy");
String colDate = formatter.format(today);
sqlC = new StringBuffer ("UPDATE " + tableName
+ " SET " + columnName + " = '"
+ colDate
+ "' WHERE " + columnIDName+" = "+ recordID);
no = DB.executeUpdate(sqlC.toString(), null);
//Update uninstall field
sqlD = new StringBuffer ("UPDATE AD_Package_Imp_Backup"
+ " SET Uninstall = 'Y'"
+ " WHERE AD_Package_Imp_Backup_ID = "+ rs2.getInt("AD_Package_Imp_Backup_ID"));
no = DB.executeUpdate(sqlD.toString(), null);
}
// Update "UpdatedBy" field with current user
else if ( columnName.equals("UpdatedBy")){
sqlC = new StringBuffer ("UPDATE " + tableName
+ " SET " + columnName + " = '"
+ Env.getAD_User_ID(Env.getCtx())
+ "' WHERE " + columnIDName+" = "+ recordID);
no = DB.executeUpdate(sqlC.toString(), null);
sqlD = new StringBuffer ("UPDATE AD_Package_Imp_Backup"
+ " SET Uninstall = 'Y'"
+ " WHERE AD_Package_Imp_Backup_ID = "+ rs2.getInt("AD_Package_Imp_Backup_ID"));
no = DB.executeUpdate(sqlD.toString(), null);
}
// Update all other fields with backup information
else{
int v_AD_Reference_ID = rs2.getInt("AD_Reference_ID");
// Adjust for Column reference table
if (tableName.equals("AD_Ref_Table")){
columnIDName = "AD_Reference_ID";
}
else if (tableName.equals("AD_TreeNodeMM")){
columnIDName = "Node_ID";
}
else {
columnIDName = tableName+"_ID";
}
//Update columns that are Strings adjusting for single quotes
if (v_AD_Reference_ID == 10 || v_AD_Reference_ID == 14 || v_AD_Reference_ID == 34 || v_AD_Reference_ID == 17)
if (rs2.getObject("ColValue").toString().equals("null")){
;//Ignore null values
}
else{
sqlC = new StringBuffer ("UPDATE " + tableName
+ " SET " + columnName + " = "
+ "'" + rs2.getObject("ColValue").toString().replaceAll("'","''") + "'"
+ " WHERE " + columnIDName+" = "+ recordID);}
//Update true/false columns
else if (v_AD_Reference_ID == 20|| v_AD_Reference_ID == 28){
sqlC = new StringBuffer ("UPDATE " + tableName
+ " SET " + columnName + " = "
+ (rs2.getObject("ColValue").toString().equals("true") ? "'Y'" : "'N'")
+ " WHERE " + columnIDName+" = "+ recordID);}
//Update columns that are Strings adjusting for single quotes
else if ( v_AD_Reference_ID == 13|| v_AD_Reference_ID == 18|| v_AD_Reference_ID == 19|| v_AD_Reference_ID == 21|| v_AD_Reference_ID == 25|| v_AD_Reference_ID == 27|| v_AD_Reference_ID == 30|| v_AD_Reference_ID == 31|| v_AD_Reference_ID == 35)
sqlC = new StringBuffer ("UPDATE " + tableName
+ " SET " + columnName + " = "
+ rs2.getObject("ColValue").toString().replaceAll("'","''")
+ " WHERE " + columnIDName+" = "+ recordID);
//Update columns that are numbers
else if ( v_AD_Reference_ID == 11|| v_AD_Reference_ID == 12|| v_AD_Reference_ID == 22|| v_AD_Reference_ID == 29)
sqlC = new StringBuffer ("UPDATE " + tableName
+ " SET " + columnName + " = "
+ rs2.getObject("ColValue").toString().replaceAll("'","''")
+ " WHERE " + columnIDName+" = "+ recordID);
//Update columns that are dates
else if (v_AD_Reference_ID == 15|| v_AD_Reference_ID == 16)
//TODO Develop portable code to update date columns
;// ignore
else // 23-Binary, 24-Radio, 26-RowID, 32-Image not supported
;// ignore
//execute update
no = DB.executeUpdate(sqlC.toString(), null);
//Update uninstall field for column
sqlD = new StringBuffer ("UPDATE AD_Package_Imp_Backup"
+ " SET Uninstall = 'Y'"
+ " WHERE AD_Package_Imp_Backup_ID = "+ rs2.getInt("AD_Package_Imp_Backup_ID"));
no = DB.executeUpdate(sqlD.toString(), null);
// Update uninstall field for record
sqlD = new StringBuffer ("UPDATE AD_Package_Imp_Detail"
+ " SET Uninstall = 'Y'"
+ " WHERE AD_Package_Imp_Detail_ID = "+ rs.getInt("AD_Package_Imp_Detail_ID"));
no = DB.executeUpdate(sqlD.toString(), null);
}
}
rs2.close ();
pstmt2.close ();
pstmt2 = null;
}
catch (Exception e)
{
log.log(Level.SEVERE, "doIt", e);
}
finally
{
try
{
if (pstmt2 != null)
pstmt2.close ();
}
catch (Exception e)
{}
pstmt2 = null;
}
} // ********* Update Loop
//Inactivate new records
else if (rs.getString("ACTION").compareTo("New")==0){
if (tableName.equals("AD_Ref_Table"))
columnIDName = "AD_Reference_ID";
else if (tableName.equals("AD_TreeNodeMM"))
columnIDName = "Node_ID";
else
columnIDName = tableName+"_ID";
sqlC = new StringBuffer ("UPDATE " + tableName
+ " SET IsActive = 'N'"
+ " WHERE " + columnIDName+" = "+ recordID);
// execute update
no = DB.executeUpdate(sqlC.toString(), null);
// Update uninstall field for record
sqlD = new StringBuffer ("UPDATE AD_Package_Imp_Detail"
+ " SET Uninstall = 'Y'"
+ " WHERE AD_Package_Imp_Detail_ID = "+ rs.getInt("AD_Package_Imp_Detail_ID"));
no = DB.executeUpdate(sqlD.toString(), null);
}
}
}
rs.close ();
pstmt.close ();
pstmt = null;
}
catch (Exception e)
{
log.log(Level.SEVERE, "doIt", e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
//Update uninstall field for package
sqlD = new StringBuffer ("UPDATE AD_Package_Imp"
+ " SET Uninstall = 'Y'"
+ " WHERE AD_Package_Imp_ID = "+ m_AD_Package_Imp_ID);
no = DB.executeUpdate(sqlD.toString(), null);
sqlB = new StringBuffer ("UPDATE AD_Package_Imp "
+ " SET PK_Status = 'Uninstalled'"
+ " WHERE AD_Package_Imp_ID = " + m_AD_Package_Imp_ID);
no = DB.executeUpdate (sqlB.toString(), get_TrxName());
log.info("Package Reversal Completed");
return "";
} // doIt
/**
* Open input file for processing
*
* @param String file with path
*
*/
public FileInputStream OpenInputfile (String filePath) {
FileInputStream fileTarget = null;
try {
fileTarget = new FileInputStream(filePath);
}
catch (FileNotFoundException e ) {
System.out.println("Can't find file ");
return null;
}
return fileTarget;
}
/**
* Open output file for processing
*
* @param String file with path
*
*/
public OutputStream OpenOutputfile (String filePath) {
OutputStream fileTarget = null;
try {
fileTarget = new FileOutputStream(filePath);
}
catch (FileNotFoundException e ) {
System.out.println("Can't find file ");
return null;
}
return fileTarget;
}
/**
* Copyfile
*
* @param String file with path
*
*/
public int copyFile (String sourceFile,String targetFile) {
OutputStream target= OpenOutputfile ( targetFile);
InputStream source = OpenInputfile (sourceFile);
int byteCount = 0;
int success = 0;
try {
while (true) {
int data = source.read();
if (data < 0)
break;
target.write(data);
byteCount++;
}
source.close();
target.close();
System.out.println("Successfully copied " + byteCount + " bytes.");
}
catch (Exception e) {
System.out.println("Error occurred while copying. "+ byteCount + " bytes copied.");
System.out.println(e.toString());
success = -1;
}
return success;
}
} // PackRoll

View File

@ -0,0 +1,147 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.sql.*;
import java.util.*;
import java.util.logging.*;
import org.compiere.model.X_AD_Package_Exp_Detail;
import org.compiere.model.X_AD_Package_Exp;
import org.compiere.util.*;
/**
* Package Export Model
*
* @author Rob Klein
* @version $Id: MMenu.java,v 1.0 2006/01/07 Exp $
*/
public class MPackageExp extends X_AD_Package_Exp
{
/**
* MPackageExp
* @param ctx
* @param int
*/
public MPackageExp (Properties ctx, int AD_Package_Exp_ID, String trxName)
{
super(ctx, AD_Package_Exp_ID, trxName);
} // MPackageExp
/**
* MPackageExp
* @param ctx
* @param rs
*/
public MPackageExp (Properties ctx, ResultSet rs, String trxName)
{
super(ctx, rs, trxName);
} // MPackageExp
/**
* After Save
* @param newRecord new
* @param success success
* @return success
*/
protected boolean afterSave (boolean newRecord, boolean success)
{
X_AD_Package_Exp PackSummary =new X_AD_Package_Exp(Env.getCtx(), getAD_Package_Exp_ID(), null);
String sql = "SELECT count(*) FROM AD_Package_Exp_Detail WHERE AD_Package_Exp_ID = ?";
int recordCount = DB.getSQLValue(null, sql,getAD_Package_Exp_ID());
if (recordCount == 0){
sql = "SELECT * FROM AD_Package_Exp_Common";
PreparedStatement pstmt = null;
try
{
pstmt = DB.prepareStatement (sql, get_TrxName());
ResultSet rs = pstmt.executeQuery ();
int i = 1;
while (rs.next()){
X_AD_Package_Exp_Detail PackDetail =new X_AD_Package_Exp_Detail(Env.getCtx(), 0, null);
PackDetail.setAD_Client_ID(PackSummary.getAD_Client_ID());
PackDetail.setAD_Org_ID(PackSummary.getAD_Org_ID());
PackDetail.setAD_Package_Exp_ID(getAD_Package_Exp_ID());
PackDetail.setPK_Name(PackSummary.getPK_Name());
PackDetail.setType(rs.getString("TYPE"));
PackDetail.setFileName(rs.getString("FILENAME"));
PackDetail.setDescription(rs.getString("DESCRIPTION"));
PackDetail.setTarget_Directory(rs.getString("TARGET_DIRECTORY"));
PackDetail.setFile_Directory(rs.getString("FILE_DIRECTORY"));
PackDetail.setDestination_Directory(rs.getString("DESTINATION_DIRECTORY"));
PackDetail.setSQLStatement(rs.getString("SQLSTATEMENT"));
PackDetail.setAD_Workflow_ID(rs.getInt("AD_WORKFLOW_ID"));
PackDetail.setAD_Window_ID(rs.getInt("AD_WINDOW_ID"));
PackDetail.setAD_Role_ID(rs.getInt("AD_ROLE_ID"));
PackDetail.setAD_Process_ID(rs.getInt("AD_PROCESS_ID"));
PackDetail.setAD_Menu_ID(rs.getInt("AD_MENU_ID"));
PackDetail.setDBType(rs.getString("DBTYPE"));
PackDetail.setAD_ImpFormat_ID(rs.getInt("AD_IMPFORMAT_ID"));
PackDetail.setAD_Workbench_ID(rs.getInt("AD_WORKBENCH_ID"));
PackDetail.setAD_Table_ID(rs.getInt("AD_TABLE_ID"));
PackDetail.setAD_Form_ID(rs.getInt("AD_FORM_ID"));
PackDetail.setAD_ReportView_ID(rs.getInt("AD_REPORTVIEW_ID"));
PackDetail.setLine(i*10);
PackDetail.save();
i++;
}
}
catch (Exception e)
{
log.info( sql+ e);
}
try
{
if (pstmt != null)
pstmt.close ();
pstmt = null;
}
catch (Exception e)
{
pstmt = null;
}
}
return true;
} // afterSave
/**
* Before Delete
* @param success
* @return deleted
*/
protected boolean afterDelete (boolean success)
{
String sql = "DELETE FROM AD_Package_Exp_Detail WHERE AD_Package_Exp_ID = "+ getAD_Package_Exp_ID();
int deleteSuccess = DB.executeUpdate(sql, get_TrxName());
if (deleteSuccess == -1)
return false;
return true;
} // afterDelete
} // MPackageExp

View File

@ -0,0 +1,78 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.sql.*;
import java.util.*;
import java.util.logging.*;
import org.compiere.model.X_AD_Package_Exp_Detail;
import org.compiere.util.*;
/**
* Menu Model
*
* @author Jorg Janke
* @version $Id: MMenu.java,v 1.5 2005/05/14 05:32:16 jjanke Exp $
*/
public class MPackageExpCommon extends X_AD_Package_Exp_Common
{
/**
* MPackageExpDetail
* @param ctx
* @param int
*/
public MPackageExpCommon (Properties ctx, int AD_Package_Exp_Common_ID, String trxName)
{
super(ctx, AD_Package_Exp_Common_ID, trxName);
} // MPackageExp
/**
* MPackageExp
* @param ctx
* @param rs
*/
public MPackageExpCommon (Properties ctx, ResultSet rs, String trxName)
{
super(ctx, rs, trxName);
} // MPackageExp
/**
* After Save
* @param newRecord new
* @param success success
* @return success
*/
protected boolean afterSave (boolean newRecord, boolean success)
{
X_AD_Package_Exp_Common PackCommon =new X_AD_Package_Exp_Common(Env.getCtx(), getAD_Package_Exp_Common_ID(), null);
String sql = "SELECT max(Line) FROM AD_Package_Exp_Common";
int lineNo = DB.getSQLValue(null, sql);
if(PackCommon.getLine()==0){
PackCommon.setLine(lineNo+10);
PackCommon.save();}
return true;
} // afterSave
} // MMenu

View File

@ -0,0 +1,78 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.sql.*;
import java.util.*;
import java.util.logging.*;
import org.compiere.model.X_AD_Package_Exp_Detail;
import org.compiere.util.*;
/**
* Menu Model
*
* @author Jorg Janke
* @version $Id: MMenu.java,v 1.5 2005/05/14 05:32:16 jjanke Exp $
*/
public class MPackageExpDetail extends X_AD_Package_Exp_Detail
{
/**
* MPackageExpDetail
* @param ctx
* @param int
*/
public MPackageExpDetail (Properties ctx, int AD_Package_Exp_ID, String trxName)
{
super(ctx, AD_Package_Exp_ID, trxName);
} // MPackageExp
/**
* MPackageExp
* @param ctx
* @param rs
*/
public MPackageExpDetail (Properties ctx, ResultSet rs, String trxName)
{
super(ctx, rs, trxName);
} // MPackageExp
/**
* After Save
* @param newRecord new
* @param success success
* @return success
*/
protected boolean afterSave (boolean newRecord, boolean success)
{
X_AD_Package_Exp_Detail PackDetail =new X_AD_Package_Exp_Detail(Env.getCtx(), getAD_Package_Exp_Detail_ID(), null);
String sql = "SELECT max(Line) FROM AD_Package_Exp_Detail WHERE AD_Package_Exp_ID = ?";
int lineNo = DB.getSQLValue(null, sql,getAD_Package_Exp_ID());
if(PackDetail.getLine()==0){
PackDetail.setLine(lineNo+10);
PackDetail.save();}
return true;
} // afterSave
} // MMenu

View File

@ -0,0 +1,366 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software;
you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program;
if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
/** Generated Model - DO NOT CHANGE */
import java.util.*;
import java.sql.*;
import java.math.*;
import org.compiere.util.*;
/** Generated Model for AD_Package_Exp
* @author Jorg Janke (generated)
* @version Release 3.1.2 - $Id$ */
public class X_AD_Package_Exp extends PO
{
/** Standard Constructor
@param ctx context
@param AD_Package_Exp_ID id
@param trxName transaction
*/
public X_AD_Package_Exp (Properties ctx, int AD_Package_Exp_ID, String trxName)
{
super (ctx, AD_Package_Exp_ID, trxName);
/** if (AD_Package_Exp_ID == 0)
{
setAD_Package_Exp_ID (0);
setDescription (null);
setEMail (null);
setFile_Directory (null);
setInstructions (null);
setPK_Name (null);
setPK_Version (null);
setProcessing (false);
setReleaseNo (null);
setUserName (null);
setVersion (null);
}
*/
}
/** Load Constructor
@param ctx context
@param rs result set
@param trxName transaction
*/
public X_AD_Package_Exp (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AD_Table_ID=1000005 */
public static final int Table_ID=MTable.getTable_ID("AD_Package_Exp");
/** TableName=AD_Package_Exp */
public static final String Table_Name="AD_Package_Exp";
protected static KeyNamePair Model = new KeyNamePair(Table_ID,"AD_Package_Exp");
protected BigDecimal accessLevel = new BigDecimal(4);
/** AccessLevel
@return 4 - System
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_Package_Exp[").append(get_ID()).append("]");
return sb.toString();
}
/** Set AD_Package_Exp_ID.
@param AD_Package_Exp_ID AD_Package_Exp_ID */
public void setAD_Package_Exp_ID (int AD_Package_Exp_ID)
{
if (AD_Package_Exp_ID < 1) throw new IllegalArgumentException ("AD_Package_Exp_ID is mandatory.");
set_Value ("AD_Package_Exp_ID", new Integer(AD_Package_Exp_ID));
}
/** Get AD_Package_Exp_ID.
@return AD_Package_Exp_ID */
public int getAD_Package_Exp_ID()
{
Integer ii = (Integer)get_Value("AD_Package_Exp_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getAD_Package_Exp_ID()));
}
/** AD_Package_Type AD_Reference_ID=1000001 */
public static final int AD_PACKAGE_TYPE_AD_Reference_ID=1000001;
/** Local Transfer = L */
public static final String AD_PACKAGE_TYPE_LocalTransfer = "L";
/** Remote Transfer = R */
public static final String AD_PACKAGE_TYPE_RemoteTransfer = "R";
/** XML File = X */
public static final String AD_PACKAGE_TYPE_XMLFile = "X";
/** Set AD_Package_Type.
@param AD_Package_Type AD_Package_Type */
public void setAD_Package_Type (String AD_Package_Type)
{
if (AD_Package_Type == null || AD_Package_Type.equals("L") || AD_Package_Type.equals("R") || AD_Package_Type.equals("X"));
else throw new IllegalArgumentException ("AD_Package_Type Invalid value - " + AD_Package_Type + " - Reference_ID=1000001 - L - R - X");
if (AD_Package_Type != null && AD_Package_Type.length() > 1)
{
log.warning("Length > 1 - truncated");
AD_Package_Type = AD_Package_Type.substring(0,0);
}
set_Value ("AD_Package_Type", AD_Package_Type);
}
/** Get AD_Package_Type.
@return AD_Package_Type */
public String getAD_Package_Type()
{
return (String)get_Value("AD_Package_Type");
}
/** Set Description.
@param Description Optional short description of the record */
public void setDescription (String Description)
{
if (Description == null) throw new IllegalArgumentException ("Description is mandatory.");
if (Description.length() > 1000)
{
log.warning("Length > 1000 - truncated");
Description = Description.substring(0,999);
}
set_Value ("Description", Description);
}
/** Get Description.
@return Optional short description of the record */
public String getDescription()
{
return (String)get_Value("Description");
}
/** Set EMail Address.
@param EMail Electronic Mail Address */
public void setEMail (String EMail)
{
if (EMail == null) throw new IllegalArgumentException ("EMail is mandatory.");
if (EMail.length() > 30)
{
log.warning("Length > 30 - truncated");
EMail = EMail.substring(0,29);
}
set_Value ("EMail", EMail);
}
/** Get EMail Address.
@return Electronic Mail Address */
public String getEMail()
{
return (String)get_Value("EMail");
}
/** Set File_Directory.
@param File_Directory File_Directory */
public void setFile_Directory (String File_Directory)
{
if (File_Directory == null) throw new IllegalArgumentException ("File_Directory is mandatory.");
if (File_Directory.length() > 255)
{
log.warning("Length > 255 - truncated");
File_Directory = File_Directory.substring(0,254);
}
set_Value ("File_Directory", File_Directory);
}
/** Get File_Directory.
@return File_Directory */
public String getFile_Directory()
{
return (String)get_Value("File_Directory");
}
/** Set Instructions.
@param Instructions Instructions */
public void setInstructions (String Instructions)
{
if (Instructions == null) throw new IllegalArgumentException ("Instructions is mandatory.");
if (Instructions.length() > 1000)
{
log.warning("Length > 1000 - truncated");
Instructions = Instructions.substring(0,999);
}
set_Value ("Instructions", Instructions);
}
/** Get Instructions.
@return Instructions */
public String getInstructions()
{
return (String)get_Value("Instructions");
}
/** Set PK_Name.
@param PK_Name PK_Name */
public void setPK_Name (String PK_Name)
{
if (PK_Name == null) throw new IllegalArgumentException ("PK_Name is mandatory.");
if (PK_Name.length() > 60)
{
log.warning("Length > 60 - truncated");
PK_Name = PK_Name.substring(0,59);
}
set_Value ("PK_Name", PK_Name);
}
/** Get PK_Name.
@return PK_Name */
public String getPK_Name()
{
return (String)get_Value("PK_Name");
}
/** Set PK_Version.
@param PK_Version PK_Version */
public void setPK_Version (String PK_Version)
{
if (PK_Version == null) throw new IllegalArgumentException ("PK_Version is mandatory.");
if (PK_Version.length() > 20)
{
log.warning("Length > 20 - truncated");
PK_Version = PK_Version.substring(0,19);
}
set_Value ("PK_Version", PK_Version);
}
/** Get PK_Version.
@return PK_Version */
public String getPK_Version()
{
return (String)get_Value("PK_Version");
}
/** Set Processed.
@param Processed The document has been processed */
public void setProcessed (boolean Processed)
{
set_Value ("Processed", new Boolean(Processed));
}
/** Get Processed.
@return The document has been processed */
public boolean isProcessed()
{
Object oo = get_Value("Processed");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value ("Processing", new Boolean(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing()
{
Object oo = get_Value("Processing");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** ReleaseNo AD_Reference_ID=1000002 */
public static final int RELEASENO_AD_Reference_ID=1000002;
/** Release 2.5.2a = Release 2.5.2a */
public static final String RELEASENO_Release252a = "Release 2.5.2a";
/** Release 2.5.2b = Release 2.5.2b */
public static final String RELEASENO_Release252b = "Release 2.5.2b";
/** Release 2.5.2c = Release 2.5.2c */
public static final String RELEASENO_Release252c = "Release 2.5.2c";
/** Release 2.5.2d = Release 2.5.2d */
public static final String RELEASENO_Release252d = "Release 2.5.2d";
/** Release 2.5.2e = Release 2.5.2e */
public static final String RELEASENO_Release252e = "Release 2.5.2e";
/** Release 2.5.3a = Release 2.5.3a */
public static final String RELEASENO_Release253a = "Release 2.5.3a";
/** Release 2.5.3b = Release 2.5.3b */
public static final String RELEASENO_Release253b = "Release 2.5.3b";
/** No specific release = all */
public static final String RELEASENO_NoSpecificRelease = "all";
/** Set Release No.
@param ReleaseNo Internal Release Number */
public void setReleaseNo (String ReleaseNo)
{
if (ReleaseNo == null) throw new IllegalArgumentException ("ReleaseNo is mandatory");
if (ReleaseNo.equals("Release 2.5.2a") || ReleaseNo.equals("Release 2.5.2b") || ReleaseNo.equals("Release 2.5.2c") || ReleaseNo.equals("Release 2.5.2d") || ReleaseNo.equals("Release 2.5.2e") || ReleaseNo.equals("Release 2.5.3a") || ReleaseNo.equals("Release 2.5.3b") || ReleaseNo.equals("all"));
else throw new IllegalArgumentException ("ReleaseNo Invalid value - " + ReleaseNo + " - Reference_ID=1000002 - Release 2.5.2a - Release 2.5.2b - Release 2.5.2c - Release 2.5.2d - Release 2.5.2e - Release 2.5.3a - Release 2.5.3b - all");
if (ReleaseNo.length() > 20)
{
log.warning("Length > 20 - truncated");
ReleaseNo = ReleaseNo.substring(0,19);
}
set_Value ("ReleaseNo", ReleaseNo);
}
/** Get Release No.
@return Internal Release Number */
public String getReleaseNo()
{
return (String)get_Value("ReleaseNo");
}
/** Set Registered EMail.
@param UserName Email of the responsible for the System */
public void setUserName (String UserName)
{
if (UserName == null) throw new IllegalArgumentException ("UserName is mandatory.");
if (UserName.length() > 30)
{
log.warning("Length > 30 - truncated");
UserName = UserName.substring(0,29);
}
set_Value ("UserName", UserName);
}
/** Get Registered EMail.
@return Email of the responsible for the System */
public String getUserName()
{
return (String)get_Value("UserName");
}
/** Set Version.
@param Version Version of the table definition */
public void setVersion (String Version)
{
if (Version == null) throw new IllegalArgumentException ("Version is mandatory.");
if (Version.length() > 20)
{
log.warning("Length > 20 - truncated");
Version = Version.substring(0,19);
}
set_Value ("Version", Version);
}
/** Get Version.
@return Version of the table definition */
public String getVersion()
{
return (String)get_Value("Version");
}
}

View File

@ -0,0 +1,543 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software;
you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program;
if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
/** Generated Model - DO NOT CHANGE */
import java.util.*;
import java.sql.*;
import java.math.*;
import org.compiere.util.*;
/** Generated Model for AD_Package_Exp_Common
* @author Jorg Janke (generated)
* @version Release 3.1.2 - $Id$ */
public class X_AD_Package_Exp_Common extends PO
{
/** Standard Constructor
@param ctx context
@param AD_Package_Exp_Common_ID id
@param trxName transaction
*/
public X_AD_Package_Exp_Common (Properties ctx, int AD_Package_Exp_Common_ID, String trxName)
{
super (ctx, AD_Package_Exp_Common_ID, trxName);
/** if (AD_Package_Exp_Common_ID == 0)
{
setAD_Package_Exp_Common_ID (0);
}
*/
}
/** Load Constructor
@param ctx context
@param rs result set
@param trxName transaction
*/
public X_AD_Package_Exp_Common (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AD_Table_ID=1000007 */
public static final int Table_ID=MTable.getTable_ID("AD_Package_Exp_Common");
/** TableName=AD_Package_Exp_Common */
public static final String Table_Name="AD_Package_Exp_Common";
protected static KeyNamePair Model = new KeyNamePair(Table_ID,"AD_Package_Exp_Common");
protected BigDecimal accessLevel = new BigDecimal(4);
/** AccessLevel
@return 4 - System
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_Package_Exp_Common[").append(get_ID()).append("]");
return sb.toString();
}
/** Set Special Form.
@param AD_Form_ID Special Form */
public void setAD_Form_ID (int AD_Form_ID)
{
if (AD_Form_ID <= 0) set_Value ("AD_Form_ID", null);
else
set_Value ("AD_Form_ID", new Integer(AD_Form_ID));
}
/** Get Special Form.
@return Special Form */
public int getAD_Form_ID()
{
Integer ii = (Integer)get_Value("AD_Form_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Import Format.
@param AD_ImpFormat_ID Import Format */
public void setAD_ImpFormat_ID (int AD_ImpFormat_ID)
{
if (AD_ImpFormat_ID <= 0) set_Value ("AD_ImpFormat_ID", null);
else
set_Value ("AD_ImpFormat_ID", new Integer(AD_ImpFormat_ID));
}
/** Get Import Format.
@return Import Format */
public int getAD_ImpFormat_ID()
{
Integer ii = (Integer)get_Value("AD_ImpFormat_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Menu.
@param AD_Menu_ID Identifies a Menu */
public void setAD_Menu_ID (int AD_Menu_ID)
{
if (AD_Menu_ID <= 0) set_Value ("AD_Menu_ID", null);
else
set_Value ("AD_Menu_ID", new Integer(AD_Menu_ID));
}
/** Get Menu.
@return Identifies a Menu */
public int getAD_Menu_ID()
{
Integer ii = (Integer)get_Value("AD_Menu_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set AD_Package_Exp_Common_ID.
@param AD_Package_Exp_Common_ID AD_Package_Exp_Common_ID */
public void setAD_Package_Exp_Common_ID (int AD_Package_Exp_Common_ID)
{
if (AD_Package_Exp_Common_ID < 1) throw new IllegalArgumentException ("AD_Package_Exp_Common_ID is mandatory.");
set_ValueNoCheck ("AD_Package_Exp_Common_ID", new Integer(AD_Package_Exp_Common_ID));
}
/** Get AD_Package_Exp_Common_ID.
@return AD_Package_Exp_Common_ID */
public int getAD_Package_Exp_Common_ID()
{
Integer ii = (Integer)get_Value("AD_Package_Exp_Common_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getAD_Package_Exp_Common_ID()));
}
/** Set Process.
@param AD_Process_ID Process or Report */
public void setAD_Process_ID (int AD_Process_ID)
{
if (AD_Process_ID <= 0) set_Value ("AD_Process_ID", null);
else
set_Value ("AD_Process_ID", new Integer(AD_Process_ID));
}
/** Get Process.
@return Process or Report */
public int getAD_Process_ID()
{
Integer ii = (Integer)get_Value("AD_Process_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Report View.
@param AD_ReportView_ID View used to generate this report */
public void setAD_ReportView_ID (int AD_ReportView_ID)
{
if (AD_ReportView_ID <= 0) set_Value ("AD_ReportView_ID", null);
else
set_Value ("AD_ReportView_ID", new Integer(AD_ReportView_ID));
}
/** Get Report View.
@return View used to generate this report */
public int getAD_ReportView_ID()
{
Integer ii = (Integer)get_Value("AD_ReportView_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Role.
@param AD_Role_ID Responsibility Role */
public void setAD_Role_ID (int AD_Role_ID)
{
if (AD_Role_ID <= 0) set_Value ("AD_Role_ID", null);
else
set_Value ("AD_Role_ID", new Integer(AD_Role_ID));
}
/** Get Role.
@return Responsibility Role */
public int getAD_Role_ID()
{
Integer ii = (Integer)get_Value("AD_Role_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Table.
@param AD_Table_ID Database Table information */
public void setAD_Table_ID (int AD_Table_ID)
{
if (AD_Table_ID <= 0) set_Value ("AD_Table_ID", null);
else
set_Value ("AD_Table_ID", new Integer(AD_Table_ID));
}
/** Get Table.
@return Database Table information */
public int getAD_Table_ID()
{
Integer ii = (Integer)get_Value("AD_Table_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Window.
@param AD_Window_ID Data entry or display window */
public void setAD_Window_ID (int AD_Window_ID)
{
if (AD_Window_ID <= 0) set_Value ("AD_Window_ID", null);
else
set_Value ("AD_Window_ID", new Integer(AD_Window_ID));
}
/** Get Window.
@return Data entry or display window */
public int getAD_Window_ID()
{
Integer ii = (Integer)get_Value("AD_Window_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Workbench.
@param AD_Workbench_ID Collection of windows, reports */
public void setAD_Workbench_ID (int AD_Workbench_ID)
{
if (AD_Workbench_ID <= 0) set_Value ("AD_Workbench_ID", null);
else
set_Value ("AD_Workbench_ID", new Integer(AD_Workbench_ID));
}
/** Get Workbench.
@return Collection of windows, reports */
public int getAD_Workbench_ID()
{
Integer ii = (Integer)get_Value("AD_Workbench_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Workflow.
@param AD_Workflow_ID Workflow or combination of tasks */
public void setAD_Workflow_ID (int AD_Workflow_ID)
{
if (AD_Workflow_ID <= 0) set_Value ("AD_Workflow_ID", null);
else
set_Value ("AD_Workflow_ID", new Integer(AD_Workflow_ID));
}
/** Get Workflow.
@return Workflow or combination of tasks */
public int getAD_Workflow_ID()
{
Integer ii = (Integer)get_Value("AD_Workflow_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** DBType AD_Reference_ID=1000003 */
public static final int DBTYPE_AD_Reference_ID=1000003;
/** All Database Types = ALL */
public static final String DBTYPE_AllDatabaseTypes = "ALL";
/** DB2 = DB2 */
public static final String DBTYPE_DB2 = "DB2";
/** Firebird = Firebird */
public static final String DBTYPE_Firebird = "Firebird";
/** MySQL = MySQL */
public static final String DBTYPE_MySQL = "MySQL";
/** Oracle = Oracle */
public static final String DBTYPE_Oracle = "Oracle";
/** Postgres = Postgres */
public static final String DBTYPE_Postgres = "Postgres";
/** SQL Server = SQL */
public static final String DBTYPE_SQLServer = "SQL";
/** Sybase = Sybase */
public static final String DBTYPE_Sybase = "Sybase";
/** Set DBType.
@param DBType DBType */
public void setDBType (String DBType)
{
if (DBType == null || DBType.equals("ALL") || DBType.equals("DB2") || DBType.equals("Firebird") || DBType.equals("MySQL") || DBType.equals("Oracle") || DBType.equals("Postgres") || DBType.equals("SQL") || DBType.equals("Sybase"));
else throw new IllegalArgumentException ("DBType Invalid value - " + DBType + " - Reference_ID=1000003 - ALL - DB2 - Firebird - MySQL - Oracle - Postgres - SQL - Sybase");
if (DBType != null && DBType.length() > 22)
{
log.warning("Length > 22 - truncated");
DBType = DBType.substring(0,21);
}
set_Value ("DBType", DBType);
}
/** Get DBType.
@return DBType */
public String getDBType()
{
return (String)get_Value("DBType");
}
/** Set Description.
@param Description Optional short description of the record */
public void setDescription (String Description)
{
if (Description != null && Description.length() > 1000)
{
log.warning("Length > 1000 - truncated");
Description = Description.substring(0,999);
}
set_Value ("Description", Description);
}
/** Get Description.
@return Optional short description of the record */
public String getDescription()
{
return (String)get_Value("Description");
}
/** Set Destination_Directory.
@param Destination_Directory Destination_Directory */
public void setDestination_Directory (String Destination_Directory)
{
if (Destination_Directory != null && Destination_Directory.length() > 255)
{
log.warning("Length > 255 - truncated");
Destination_Directory = Destination_Directory.substring(0,254);
}
set_Value ("Destination_Directory", Destination_Directory);
}
/** Get Destination_Directory.
@return Destination_Directory */
public String getDestination_Directory()
{
return (String)get_Value("Destination_Directory");
}
/** Set File Name.
@param FileName Name of the local file or URL */
public void setFileName (String FileName)
{
if (FileName != null && FileName.length() > 255)
{
log.warning("Length > 255 - truncated");
FileName = FileName.substring(0,254);
}
set_Value ("FileName", FileName);
}
/** Get File Name.
@return Name of the local file or URL */
public String getFileName()
{
return (String)get_Value("FileName");
}
/** Set File_Directory.
@param File_Directory File_Directory */
public void setFile_Directory (String File_Directory)
{
if (File_Directory != null && File_Directory.length() > 255)
{
log.warning("Length > 255 - truncated");
File_Directory = File_Directory.substring(0,254);
}
set_Value ("File_Directory", File_Directory);
}
/** Get File_Directory.
@return File_Directory */
public String getFile_Directory()
{
return (String)get_Value("File_Directory");
}
/** Set Line No.
@param Line Unique line for this document */
public void setLine (int Line)
{
set_Value ("Line", new Integer(Line));
}
/** Get Line No.
@return Unique line for this document */
public int getLine()
{
Integer ii = (Integer)get_Value("Line");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Name 2.
@param Name2 Additional Name */
public void setName2 (String Name2)
{
if (Name2 != null && Name2.length() > 60)
{
log.warning("Length > 60 - truncated");
Name2 = Name2.substring(0,59);
}
set_Value ("Name2", Name2);
}
/** Get Name 2.
@return Additional Name */
public String getName2()
{
return (String)get_Value("Name2");
}
/** Set PK_Name.
@param PK_Name PK_Name */
public void setPK_Name (String PK_Name)
{
if (PK_Name != null && PK_Name.length() > 60)
{
log.warning("Length > 60 - truncated");
PK_Name = PK_Name.substring(0,59);
}
set_Value ("PK_Name", PK_Name);
}
/** Get PK_Name.
@return PK_Name */
public String getPK_Name()
{
return (String)get_Value("PK_Name");
}
/** Set Processed.
@param Processed The document has been processed */
public void setProcessed (boolean Processed)
{
set_Value ("Processed", new Boolean(Processed));
}
/** Get Processed.
@return The document has been processed */
public boolean isProcessed()
{
Object oo = get_Value("Processed");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value ("Processing", new Boolean(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing()
{
Object oo = get_Value("Processing");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set SQLStatement.
@param SQLStatement SQLStatement */
public void setSQLStatement (String SQLStatement)
{
if (SQLStatement != null && SQLStatement.length() > 255)
{
log.warning("Length > 255 - truncated");
SQLStatement = SQLStatement.substring(0,254);
}
set_Value ("SQLStatement", SQLStatement);
}
/** Get SQLStatement.
@return SQLStatement */
public String getSQLStatement()
{
return (String)get_Value("SQLStatement");
}
/** Set Target_Directory.
@param Target_Directory Target_Directory */
public void setTarget_Directory (String Target_Directory)
{
if (Target_Directory != null && Target_Directory.length() > 255)
{
log.warning("Length > 255 - truncated");
Target_Directory = Target_Directory.substring(0,254);
}
set_Value ("Target_Directory", Target_Directory);
}
/** Get Target_Directory.
@return Target_Directory */
public String getTarget_Directory()
{
return (String)get_Value("Target_Directory");
}
/** Type AD_Reference_ID=1000004 */
public static final int TYPE_AD_Reference_ID=1000004;
/** Workbench = B */
public static final String TYPE_Workbench = "B";
/** File - Code or other = C */
public static final String TYPE_File_CodeOrOther = "C";
/** Data = D */
public static final String TYPE_Data = "D";
/** Workflow = F */
public static final String TYPE_Workflow = "F";
/** Import Format = IMP */
public static final String TYPE_ImportFormat = "IMP";
/** Application or Module = M */
public static final String TYPE_ApplicationOrModule = "M";
/** Process/Report = P */
public static final String TYPE_ProcessReport = "P";
/** ReportView = R */
public static final String TYPE_ReportView = "R";
/** Role = S */
public static final String TYPE_Role = "S";
/** Code Snipit = SNI */
public static final String TYPE_CodeSnipit = "SNI";
/** SQL Statement = SQL */
public static final String TYPE_SQLStatement = "SQL";
/** Table = T */
public static final String TYPE_Table = "T";
/** Window = W */
public static final String TYPE_Window = "W";
/** Form = X */
public static final String TYPE_Form = "X";
/** Set Type.
@param Type Type of Validation (SQL, Java Script, Java Language) */
public void setType (String Type)
{
if (Type == null || Type.equals("B") || Type.equals("C") || Type.equals("D") || Type.equals("F") || Type.equals("IMP") || Type.equals("M") || Type.equals("P") || Type.equals("R") || Type.equals("S") || Type.equals("SNI") || Type.equals("SQL") || Type.equals("T") || Type.equals("W") || Type.equals("X"));
else throw new IllegalArgumentException ("Type Invalid value - " + Type + " - Reference_ID=1000004 - B - C - D - F - IMP - M - P - R - S - SNI - SQL - T - W - X");
if (Type != null && Type.length() > 10)
{
log.warning("Length > 10 - truncated");
Type = Type.substring(0,9);
}
set_Value ("Type", Type);
}
/** Get Type.
@return Type of Validation (SQL, Java Script, Java Language) */
public String getType()
{
return (String)get_Value("Type");
}
}

View File

@ -0,0 +1,658 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software;
you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program;
if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
/** Generated Model - DO NOT CHANGE */
import java.util.*;
import java.sql.*;
import java.math.*;
import org.compiere.util.*;
/** Generated Model for AD_Package_Exp_Detail
* @author Jorg Janke (generated)
* @version Release 3.1.2 - $Id$ */
public class X_AD_Package_Exp_Detail extends PO
{
/** Standard Constructor
@param ctx context
@param AD_Package_Exp_Detail_ID id
@param trxName transaction
*/
public X_AD_Package_Exp_Detail (Properties ctx, int AD_Package_Exp_Detail_ID, String trxName)
{
super (ctx, AD_Package_Exp_Detail_ID, trxName);
/** if (AD_Package_Exp_Detail_ID == 0)
{
setAD_Package_Exp_Detail_ID (0);
setAD_Package_Exp_ID (0);
setDescription (null);
setPK_Name (null); // @SQL=SELECT PK_Name FROM AD_Package_Exp_Detail WHERE AD_Package_Exp_ID=@AD_Package_Exp_ID@
setProcessing (false);
setType (null);
}
*/
}
/** Load Constructor
@param ctx context
@param rs result set
@param trxName transaction
*/
public X_AD_Package_Exp_Detail (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AD_Table_ID=1000006 */
public static final int Table_ID=MTable.getTable_ID("AD_Package_Exp_Detail");
/** TableName=AD_Package_Exp_Detail */
public static final String Table_Name="AD_Package_Exp_Detail";
protected static KeyNamePair Model = new KeyNamePair(Table_ID,"AD_Package_Exp_Detail");
protected BigDecimal accessLevel = new BigDecimal(4);
/** AccessLevel
@return 4 - System
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_Package_Exp_Detail[").append(get_ID()).append("]");
return sb.toString();
}
/** Set Special Form.
@param AD_Form_ID Special Form */
public void setAD_Form_ID (int AD_Form_ID)
{
if (AD_Form_ID <= 0) set_Value ("AD_Form_ID", null);
else
set_Value ("AD_Form_ID", new Integer(AD_Form_ID));
}
/** Get Special Form.
@return Special Form */
public int getAD_Form_ID()
{
Integer ii = (Integer)get_Value("AD_Form_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Import Format.
@param AD_ImpFormat_ID Import Format */
public void setAD_ImpFormat_ID (int AD_ImpFormat_ID)
{
if (AD_ImpFormat_ID <= 0) set_Value ("AD_ImpFormat_ID", null);
else
set_Value ("AD_ImpFormat_ID", new Integer(AD_ImpFormat_ID));
}
/** Get Import Format.
@return Import Format */
public int getAD_ImpFormat_ID()
{
Integer ii = (Integer)get_Value("AD_ImpFormat_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** AD_Menu_ID AD_Reference_ID=105 */
public static final int AD_MENU_ID_AD_Reference_ID=105;
/** Set Menu.
@param AD_Menu_ID Identifies a Menu */
public void setAD_Menu_ID (int AD_Menu_ID)
{
if (AD_Menu_ID <= 0) set_Value ("AD_Menu_ID", null);
else
set_Value ("AD_Menu_ID", new Integer(AD_Menu_ID));
}
/** Get Menu.
@return Identifies a Menu */
public int getAD_Menu_ID()
{
Integer ii = (Integer)get_Value("AD_Menu_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set AD_Package_Code_New.
@param AD_Package_Code_New AD_Package_Code_New */
public void setAD_Package_Code_New (String AD_Package_Code_New)
{
if (AD_Package_Code_New != null && AD_Package_Code_New.length() > 2000)
{
log.warning("Length > 2000 - truncated");
AD_Package_Code_New = AD_Package_Code_New.substring(0,1999);
}
set_Value ("AD_Package_Code_New", AD_Package_Code_New);
}
/** Get AD_Package_Code_New.
@return AD_Package_Code_New */
public String getAD_Package_Code_New()
{
return (String)get_Value("AD_Package_Code_New");
}
/** Set AD_Package_Code_Old.
@param AD_Package_Code_Old AD_Package_Code_Old */
public void setAD_Package_Code_Old (String AD_Package_Code_Old)
{
if (AD_Package_Code_Old != null && AD_Package_Code_Old.length() > 2000)
{
log.warning("Length > 2000 - truncated");
AD_Package_Code_Old = AD_Package_Code_Old.substring(0,1999);
}
set_Value ("AD_Package_Code_Old", AD_Package_Code_Old);
}
/** Get AD_Package_Code_Old.
@return AD_Package_Code_Old */
public String getAD_Package_Code_Old()
{
return (String)get_Value("AD_Package_Code_Old");
}
/** Set AD_Package_Exp_Detail_ID.
@param AD_Package_Exp_Detail_ID AD_Package_Exp_Detail_ID */
public void setAD_Package_Exp_Detail_ID (int AD_Package_Exp_Detail_ID)
{
if (AD_Package_Exp_Detail_ID < 1) throw new IllegalArgumentException ("AD_Package_Exp_Detail_ID is mandatory.");
set_Value ("AD_Package_Exp_Detail_ID", new Integer(AD_Package_Exp_Detail_ID));
}
/** Get AD_Package_Exp_Detail_ID.
@return AD_Package_Exp_Detail_ID */
public int getAD_Package_Exp_Detail_ID()
{
Integer ii = (Integer)get_Value("AD_Package_Exp_Detail_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getAD_Package_Exp_Detail_ID()));
}
/** Set AD_Package_Exp_ID.
@param AD_Package_Exp_ID AD_Package_Exp_ID */
public void setAD_Package_Exp_ID (int AD_Package_Exp_ID)
{
if (AD_Package_Exp_ID < 1) throw new IllegalArgumentException ("AD_Package_Exp_ID is mandatory.");
set_Value ("AD_Package_Exp_ID", new Integer(AD_Package_Exp_ID));
}
/** Get AD_Package_Exp_ID.
@return AD_Package_Exp_ID */
public int getAD_Package_Exp_ID()
{
Integer ii = (Integer)get_Value("AD_Package_Exp_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Process.
@param AD_Process_ID Process or Report */
public void setAD_Process_ID (int AD_Process_ID)
{
if (AD_Process_ID <= 0) set_Value ("AD_Process_ID", null);
else
set_Value ("AD_Process_ID", new Integer(AD_Process_ID));
}
/** Get Process.
@return Process or Report */
public int getAD_Process_ID()
{
Integer ii = (Integer)get_Value("AD_Process_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Report View.
@param AD_ReportView_ID View used to generate this report */
public void setAD_ReportView_ID (int AD_ReportView_ID)
{
if (AD_ReportView_ID <= 0) set_Value ("AD_ReportView_ID", null);
else
set_Value ("AD_ReportView_ID", new Integer(AD_ReportView_ID));
}
/** Get Report View.
@return View used to generate this report */
public int getAD_ReportView_ID()
{
Integer ii = (Integer)get_Value("AD_ReportView_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Role.
@param AD_Role_ID Responsibility Role */
public void setAD_Role_ID (int AD_Role_ID)
{
if (AD_Role_ID <= 0) set_Value ("AD_Role_ID", null);
else
set_Value ("AD_Role_ID", new Integer(AD_Role_ID));
}
/** Get Role.
@return Responsibility Role */
public int getAD_Role_ID()
{
Integer ii = (Integer)get_Value("AD_Role_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Table.
@param AD_Table_ID Database Table information */
public void setAD_Table_ID (int AD_Table_ID)
{
if (AD_Table_ID <= 0) set_Value ("AD_Table_ID", null);
else
set_Value ("AD_Table_ID", new Integer(AD_Table_ID));
}
/** Get Table.
@return Database Table information */
public int getAD_Table_ID()
{
Integer ii = (Integer)get_Value("AD_Table_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Window.
@param AD_Window_ID Data entry or display window */
public void setAD_Window_ID (int AD_Window_ID)
{
if (AD_Window_ID <= 0) set_Value ("AD_Window_ID", null);
else
set_Value ("AD_Window_ID", new Integer(AD_Window_ID));
}
/** Get Window.
@return Data entry or display window */
public int getAD_Window_ID()
{
Integer ii = (Integer)get_Value("AD_Window_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Workbench.
@param AD_Workbench_ID Collection of windows, reports */
public void setAD_Workbench_ID (int AD_Workbench_ID)
{
if (AD_Workbench_ID <= 0) set_Value ("AD_Workbench_ID", null);
else
set_Value ("AD_Workbench_ID", new Integer(AD_Workbench_ID));
}
/** Get Workbench.
@return Collection of windows, reports */
public int getAD_Workbench_ID()
{
Integer ii = (Integer)get_Value("AD_Workbench_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Workflow.
@param AD_Workflow_ID Workflow or combination of tasks */
public void setAD_Workflow_ID (int AD_Workflow_ID)
{
if (AD_Workflow_ID <= 0) set_Value ("AD_Workflow_ID", null);
else
set_Value ("AD_Workflow_ID", new Integer(AD_Workflow_ID));
}
/** Get Workflow.
@return Workflow or combination of tasks */
public int getAD_Workflow_ID()
{
Integer ii = (Integer)get_Value("AD_Workflow_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** DBType AD_Reference_ID=1000003 */
public static final int DBTYPE_AD_Reference_ID=1000003;
/** All Database Types = ALL */
public static final String DBTYPE_AllDatabaseTypes = "ALL";
/** DB2 = DB2 */
public static final String DBTYPE_DB2 = "DB2";
/** Firebird = Firebird */
public static final String DBTYPE_Firebird = "Firebird";
/** MySQL = MySQL */
public static final String DBTYPE_MySQL = "MySQL";
/** Oracle = Oracle */
public static final String DBTYPE_Oracle = "Oracle";
/** Postgres = Postgres */
public static final String DBTYPE_Postgres = "Postgres";
/** SQL Server = SQL */
public static final String DBTYPE_SQLServer = "SQL";
/** Sybase = Sybase */
public static final String DBTYPE_Sybase = "Sybase";
/** Set DBType.
@param DBType DBType */
public void setDBType (String DBType)
{
if (DBType == null || DBType.equals("ALL") || DBType.equals("DB2") || DBType.equals("Firebird") || DBType.equals("MySQL") || DBType.equals("Oracle") || DBType.equals("Postgres") || DBType.equals("SQL") || DBType.equals("Sybase"));
else throw new IllegalArgumentException ("DBType Invalid value - " + DBType + " - Reference_ID=1000003 - ALL - DB2 - Firebird - MySQL - Oracle - Postgres - SQL - Sybase");
if (DBType != null && DBType.length() > 22)
{
log.warning("Length > 22 - truncated");
DBType = DBType.substring(0,21);
}
set_Value ("DBType", DBType);
}
/** Get DBType.
@return DBType */
public String getDBType()
{
return (String)get_Value("DBType");
}
/** Set Description.
@param Description Optional short description of the record */
public void setDescription (String Description)
{
if (Description == null) throw new IllegalArgumentException ("Description is mandatory.");
if (Description.length() > 1000)
{
log.warning("Length > 1000 - truncated");
Description = Description.substring(0,999);
}
set_Value ("Description", Description);
}
/** Get Description.
@return Optional short description of the record */
public String getDescription()
{
return (String)get_Value("Description");
}
/** Set Destination_Directory.
@param Destination_Directory Destination_Directory */
public void setDestination_Directory (String Destination_Directory)
{
if (Destination_Directory != null && Destination_Directory.length() > 255)
{
log.warning("Length > 255 - truncated");
Destination_Directory = Destination_Directory.substring(0,254);
}
set_Value ("Destination_Directory", Destination_Directory);
}
/** Get Destination_Directory.
@return Destination_Directory */
public String getDestination_Directory()
{
return (String)get_Value("Destination_Directory");
}
/** Set Destination_FileName.
@param Destination_FileName Destination_FileName */
public void setDestination_FileName (String Destination_FileName)
{
if (Destination_FileName != null && Destination_FileName.length() > 255)
{
log.warning("Length > 255 - truncated");
Destination_FileName = Destination_FileName.substring(0,254);
}
set_Value ("Destination_FileName", Destination_FileName);
}
/** Get Destination_FileName.
@return Destination_FileName */
public String getDestination_FileName()
{
return (String)get_Value("Destination_FileName");
}
/** Set File Name.
@param FileName Name of the local file or URL */
public void setFileName (String FileName)
{
if (FileName != null && FileName.length() > 255)
{
log.warning("Length > 255 - truncated");
FileName = FileName.substring(0,254);
}
set_Value ("FileName", FileName);
}
/** Get File Name.
@return Name of the local file or URL */
public String getFileName()
{
return (String)get_Value("FileName");
}
/** Set File_Directory.
@param File_Directory File_Directory */
public void setFile_Directory (String File_Directory)
{
if (File_Directory != null && File_Directory.length() > 255)
{
log.warning("Length > 255 - truncated");
File_Directory = File_Directory.substring(0,254);
}
set_Value ("File_Directory", File_Directory);
}
/** Get File_Directory.
@return File_Directory */
public String getFile_Directory()
{
return (String)get_Value("File_Directory");
}
/** Set Line No.
@param Line Unique line for this document */
public void setLine (int Line)
{
set_Value ("Line", new Integer(Line));
}
/** Get Line No.
@return Unique line for this document */
public int getLine()
{
Integer ii = (Integer)get_Value("Line");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Name 2.
@param Name2 Additional Name */
public void setName2 (String Name2)
{
if (Name2 != null && Name2.length() > 60)
{
log.warning("Length > 60 - truncated");
Name2 = Name2.substring(0,59);
}
set_Value ("Name2", Name2);
}
/** Get Name 2.
@return Additional Name */
public String getName2()
{
return (String)get_Value("Name2");
}
/** Set PK_Name.
@param PK_Name PK_Name */
public void setPK_Name (String PK_Name)
{
if (PK_Name == null) throw new IllegalArgumentException ("PK_Name is mandatory.");
if (PK_Name.length() > 60)
{
log.warning("Length > 60 - truncated");
PK_Name = PK_Name.substring(0,59);
}
set_Value ("PK_Name", PK_Name);
}
/** Get PK_Name.
@return PK_Name */
public String getPK_Name()
{
return (String)get_Value("PK_Name");
}
/** Set Processed.
@param Processed The document has been processed */
public void setProcessed (boolean Processed)
{
set_Value ("Processed", new Boolean(Processed));
}
/** Get Processed.
@return The document has been processed */
public boolean isProcessed()
{
Object oo = get_Value("Processed");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value ("Processing", new Boolean(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing()
{
Object oo = get_Value("Processing");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** ReleaseNo AD_Reference_ID=1000002 */
public static final int RELEASENO_AD_Reference_ID=1000002;
/** Release 2.5.2a = Release 2.5.2a */
public static final String RELEASENO_Release252a = "Release 2.5.2a";
/** Release 2.5.2b = Release 2.5.2b */
public static final String RELEASENO_Release252b = "Release 2.5.2b";
/** Release 2.5.2c = Release 2.5.2c */
public static final String RELEASENO_Release252c = "Release 2.5.2c";
/** Release 2.5.2d = Release 2.5.2d */
public static final String RELEASENO_Release252d = "Release 2.5.2d";
/** Release 2.5.2e = Release 2.5.2e */
public static final String RELEASENO_Release252e = "Release 2.5.2e";
/** Release 2.5.3a = Release 2.5.3a */
public static final String RELEASENO_Release253a = "Release 2.5.3a";
/** Release 2.5.3b = Release 2.5.3b */
public static final String RELEASENO_Release253b = "Release 2.5.3b";
/** No specific release = all */
public static final String RELEASENO_NoSpecificRelease = "all";
/** Set Release No.
@param ReleaseNo Internal Release Number */
public void setReleaseNo (String ReleaseNo)
{
if (ReleaseNo == null || ReleaseNo.equals("Release 2.5.2a") || ReleaseNo.equals("Release 2.5.2b") || ReleaseNo.equals("Release 2.5.2c") || ReleaseNo.equals("Release 2.5.2d") || ReleaseNo.equals("Release 2.5.2e") || ReleaseNo.equals("Release 2.5.3a") || ReleaseNo.equals("Release 2.5.3b") || ReleaseNo.equals("all"));
else throw new IllegalArgumentException ("ReleaseNo Invalid value - " + ReleaseNo + " - Reference_ID=1000002 - Release 2.5.2a - Release 2.5.2b - Release 2.5.2c - Release 2.5.2d - Release 2.5.2e - Release 2.5.3a - Release 2.5.3b - all");
if (ReleaseNo != null && ReleaseNo.length() > 20)
{
log.warning("Length > 20 - truncated");
ReleaseNo = ReleaseNo.substring(0,19);
}
set_Value ("ReleaseNo", ReleaseNo);
}
/** Get Release No.
@return Internal Release Number */
public String getReleaseNo()
{
return (String)get_Value("ReleaseNo");
}
/** Set SQLStatement.
@param SQLStatement SQLStatement */
public void setSQLStatement (String SQLStatement)
{
if (SQLStatement != null && SQLStatement.length() > 2000)
{
log.warning("Length > 2000 - truncated");
SQLStatement = SQLStatement.substring(0,1999);
}
set_Value ("SQLStatement", SQLStatement);
}
/** Get SQLStatement.
@return SQLStatement */
public String getSQLStatement()
{
return (String)get_Value("SQLStatement");
}
/** Set Target_Directory.
@param Target_Directory Target_Directory */
public void setTarget_Directory (String Target_Directory)
{
if (Target_Directory != null && Target_Directory.length() > 255)
{
log.warning("Length > 255 - truncated");
Target_Directory = Target_Directory.substring(0,254);
}
set_Value ("Target_Directory", Target_Directory);
}
/** Get Target_Directory.
@return Target_Directory */
public String getTarget_Directory()
{
return (String)get_Value("Target_Directory");
}
/** Type AD_Reference_ID=1000004 */
public static final int TYPE_AD_Reference_ID=1000004;
/** Workbench = B */
public static final String TYPE_Workbench = "B";
/** File - Code or other = C */
public static final String TYPE_File_CodeOrOther = "C";
/** Data = D */
public static final String TYPE_Data = "D";
/** Workflow = F */
public static final String TYPE_Workflow = "F";
/** Import Format = IMP */
public static final String TYPE_ImportFormat = "IMP";
/** Application or Module = M */
public static final String TYPE_ApplicationOrModule = "M";
/** Process/Report = P */
public static final String TYPE_ProcessReport = "P";
/** ReportView = R */
public static final String TYPE_ReportView = "R";
/** Role = S */
public static final String TYPE_Role = "S";
/** Code Snipit = SNI */
public static final String TYPE_CodeSnipit = "SNI";
/** SQL Statement = SQL */
public static final String TYPE_SQLStatement = "SQL";
/** Table = T */
public static final String TYPE_Table = "T";
/** Window = W */
public static final String TYPE_Window = "W";
/** Form = X */
public static final String TYPE_Form = "X";
/** Set Type.
@param Type Type of Validation (SQL, Java Script, Java Language) */
public void setType (String Type)
{
if (Type == null) throw new IllegalArgumentException ("Type is mandatory");
if (Type.equals("B") || Type.equals("C") || Type.equals("D") || Type.equals("F") || Type.equals("IMP") || Type.equals("M") || Type.equals("P") || Type.equals("R") || Type.equals("S") || Type.equals("SNI") || Type.equals("SQL") || Type.equals("T") || Type.equals("W") || Type.equals("X"));
else throw new IllegalArgumentException ("Type Invalid value - " + Type + " - Reference_ID=1000004 - B - C - D - F - IMP - M - P - R - S - SNI - SQL - T - W - X");
if (Type.length() > 10)
{
log.warning("Length > 10 - truncated");
Type = Type.substring(0,9);
}
set_Value ("Type", Type);
}
/** Get Type.
@return Type of Validation (SQL, Java Script, Java Language) */
public String getType()
{
return (String)get_Value("Type");
}
}

View File

@ -0,0 +1,321 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software;
you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program;
if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
/** Generated Model - DO NOT CHANGE */
import java.util.*;
import java.sql.*;
import java.math.*;
import org.compiere.util.*;
/** Generated Model for AD_Package_Imp
* @author Jorg Janke (generated)
* @version Release 3.1.2 - $Id$ */
public class X_AD_Package_Imp extends PO
{
/** Standard Constructor
@param ctx context
@param AD_Package_Imp_ID id
@param trxName transaction
*/
public X_AD_Package_Imp (Properties ctx, int AD_Package_Imp_ID, String trxName)
{
super (ctx, AD_Package_Imp_ID, trxName);
/** if (AD_Package_Imp_ID == 0)
{
setAD_Package_Imp_ID (0);
setDescription (null);
setName (null);
setProcessing (false);
}
*/
}
/** Load Constructor
@param ctx context
@param rs result set
@param trxName transaction
*/
public X_AD_Package_Imp (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AD_Table_ID=1000003 */
public static final int Table_ID=MTable.getTable_ID("AD_Package_Imp");
/** TableName=AD_Package_Imp */
public static final String Table_Name="AD_Package_Imp";
protected static KeyNamePair Model = new KeyNamePair(Table_ID,"AD_Package_Imp");
protected BigDecimal accessLevel = new BigDecimal(4);
/** AccessLevel
@return 4 - System
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_Package_Imp[").append(get_ID()).append("]");
return sb.toString();
}
/** Set AD_Package_Imp_ID.
@param AD_Package_Imp_ID AD_Package_Imp_ID */
public void setAD_Package_Imp_ID (int AD_Package_Imp_ID)
{
if (AD_Package_Imp_ID < 1) throw new IllegalArgumentException ("AD_Package_Imp_ID is mandatory.");
set_ValueNoCheck ("AD_Package_Imp_ID", new Integer(AD_Package_Imp_ID));
}
/** Get AD_Package_Imp_ID.
@return AD_Package_Imp_ID */
public int getAD_Package_Imp_ID()
{
Integer ii = (Integer)get_Value("AD_Package_Imp_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getAD_Package_Imp_ID()));
}
/** Set Creator.
@param Creator Creator */
public void setCreator (String Creator)
{
if (Creator != null && Creator.length() > 60)
{
log.warning("Length > 60 - truncated");
Creator = Creator.substring(0,59);
}
set_Value ("Creator", Creator);
}
/** Get Creator.
@return Creator */
public String getCreator()
{
return (String)get_Value("Creator");
}
/** Set CreatorContact.
@param CreatorContact CreatorContact */
public void setCreatorContact (String CreatorContact)
{
if (CreatorContact != null && CreatorContact.length() > 255)
{
log.warning("Length > 255 - truncated");
CreatorContact = CreatorContact.substring(0,254);
}
set_Value ("CreatorContact", CreatorContact);
}
/** Get CreatorContact.
@return CreatorContact */
public String getCreatorContact()
{
return (String)get_Value("CreatorContact");
}
/** Set Description.
@param Description Optional short description of the record */
public void setDescription (String Description)
{
if (Description == null) throw new IllegalArgumentException ("Description is mandatory.");
if (Description.length() > 1000)
{
log.warning("Length > 1000 - truncated");
Description = Description.substring(0,999);
}
set_Value ("Description", Description);
}
/** Get Description.
@return Optional short description of the record */
public String getDescription()
{
return (String)get_Value("Description");
}
/** Set EMail Address.
@param EMail Electronic Mail Address */
public void setEMail (String EMail)
{
if (EMail != null && EMail.length() > 60)
{
log.warning("Length > 60 - truncated");
EMail = EMail.substring(0,59);
}
set_Value ("EMail", EMail);
}
/** Get EMail Address.
@return Electronic Mail Address */
public String getEMail()
{
return (String)get_Value("EMail");
}
/** Set Name.
@param Name Alphanumeric identifier of the entity */
public void setName (String Name)
{
if (Name == null) throw new IllegalArgumentException ("Name is mandatory.");
if (Name.length() > 60)
{
log.warning("Length > 60 - truncated");
Name = Name.substring(0,59);
}
set_Value ("Name", Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity */
public String getName()
{
return (String)get_Value("Name");
}
/** Set PK_Status.
@param PK_Status PK_Status */
public void setPK_Status (String PK_Status)
{
if (PK_Status != null && PK_Status.length() > 22)
{
log.warning("Length > 22 - truncated");
PK_Status = PK_Status.substring(0,21);
}
set_Value ("PK_Status", PK_Status);
}
/** Get PK_Status.
@return PK_Status */
public String getPK_Status()
{
return (String)get_Value("PK_Status");
}
/** Set PK_Version.
@param PK_Version PK_Version */
public void setPK_Version (String PK_Version)
{
if (PK_Version != null && PK_Version.length() > 20)
{
log.warning("Length > 20 - truncated");
PK_Version = PK_Version.substring(0,19);
}
set_Value ("PK_Version", PK_Version);
}
/** Get PK_Version.
@return PK_Version */
public String getPK_Version()
{
return (String)get_Value("PK_Version");
}
/** Set Processed.
@param Processed The document has been processed */
public void setProcessed (boolean Processed)
{
set_Value ("Processed", new Boolean(Processed));
}
/** Get Processed.
@return The document has been processed */
public boolean isProcessed()
{
Object oo = get_Value("Processed");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value ("Processing", new Boolean(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing()
{
Object oo = get_Value("Processing");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Release No.
@param ReleaseNo Internal Release Number */
public void setReleaseNo (String ReleaseNo)
{
if (ReleaseNo != null && ReleaseNo.length() > 20)
{
log.warning("Length > 20 - truncated");
ReleaseNo = ReleaseNo.substring(0,19);
}
set_Value ("ReleaseNo", ReleaseNo);
}
/** Get Release No.
@return Internal Release Number */
public String getReleaseNo()
{
return (String)get_Value("ReleaseNo");
}
/** Set Uninstall.
@param Uninstall Uninstall */
public void setUninstall (boolean Uninstall)
{
set_Value ("Uninstall", new Boolean(Uninstall));
}
/** Get Uninstall.
@return Uninstall */
public boolean isUninstall()
{
Object oo = get_Value("Uninstall");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Version.
@param Version Version of the table definition */
public void setVersion (String Version)
{
if (Version != null && Version.length() > 20)
{
log.warning("Length > 20 - truncated");
Version = Version.substring(0,19);
}
set_Value ("Version", Version);
}
/** Get Version.
@return Version of the table definition */
public String getVersion()
{
return (String)get_Value("Version");
}
}

View File

@ -0,0 +1,264 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software;
you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program;
if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
/** Generated Model - DO NOT CHANGE */
import java.util.*;
import java.sql.*;
import java.math.*;
import org.compiere.util.*;
/** Generated Model for AD_Package_Imp_Backup
* @author Jorg Janke (generated)
* @version Release 3.1.2 - $Id$ */
public class X_AD_Package_Imp_Backup extends PO
{
/** Standard Constructor
@param ctx context
@param AD_Package_Imp_Backup_ID id
@param trxName transaction
*/
public X_AD_Package_Imp_Backup (Properties ctx, int AD_Package_Imp_Backup_ID, String trxName)
{
super (ctx, AD_Package_Imp_Backup_ID, trxName);
/** if (AD_Package_Imp_Backup_ID == 0)
{
setAD_Package_Imp_Backup_ID (0);
setAD_Package_Imp_Detail_ID (0);
setAD_Package_Imp_ID (0);
}
*/
}
/** Load Constructor
@param ctx context
@param rs result set
@param trxName transaction
*/
public X_AD_Package_Imp_Backup (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AD_Table_ID=1000002 */
public static final int Table_ID=MTable.getTable_ID("AD_Package_Imp_Backup");
/** TableName=AD_Package_Imp_Backup */
public static final String Table_Name="AD_Package_Imp_Backup";
protected static KeyNamePair Model = new KeyNamePair(Table_ID,"AD_Package_Imp_Backup");
protected BigDecimal accessLevel = new BigDecimal(4);
/** AccessLevel
@return 4 - System
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_Package_Imp_Backup[").append(get_ID()).append("]");
return sb.toString();
}
/** AD_Column_ID AD_Reference_ID=251 */
public static final int AD_COLUMN_ID_AD_Reference_ID=251;
/** Set Column.
@param AD_Column_ID Column in the table */
public void setAD_Column_ID (int AD_Column_ID)
{
if (AD_Column_ID <= 0) set_Value ("AD_Column_ID", null);
else
set_Value ("AD_Column_ID", new Integer(AD_Column_ID));
}
/** Get Column.
@return Column in the table */
public int getAD_Column_ID()
{
Integer ii = (Integer)get_Value("AD_Column_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set AD_Package_Imp_Backup_ID.
@param AD_Package_Imp_Backup_ID AD_Package_Imp_Backup_ID */
public void setAD_Package_Imp_Backup_ID (int AD_Package_Imp_Backup_ID)
{
if (AD_Package_Imp_Backup_ID < 1) throw new IllegalArgumentException ("AD_Package_Imp_Backup_ID is mandatory.");
set_ValueNoCheck ("AD_Package_Imp_Backup_ID", new Integer(AD_Package_Imp_Backup_ID));
}
/** Get AD_Package_Imp_Backup_ID.
@return AD_Package_Imp_Backup_ID */
public int getAD_Package_Imp_Backup_ID()
{
Integer ii = (Integer)get_Value("AD_Package_Imp_Backup_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getAD_Package_Imp_Backup_ID()));
}
/** Set AD_Package_Imp_Bck_Dir.
@param AD_Package_Imp_Bck_Dir AD_Package_Imp_Bck_Dir */
public void setAD_Package_Imp_Bck_Dir (String AD_Package_Imp_Bck_Dir)
{
if (AD_Package_Imp_Bck_Dir != null && AD_Package_Imp_Bck_Dir.length() > 255)
{
log.warning("Length > 255 - truncated");
AD_Package_Imp_Bck_Dir = AD_Package_Imp_Bck_Dir.substring(0,254);
}
set_Value ("AD_Package_Imp_Bck_Dir", AD_Package_Imp_Bck_Dir);
}
/** Get AD_Package_Imp_Bck_Dir.
@return AD_Package_Imp_Bck_Dir */
public String getAD_Package_Imp_Bck_Dir()
{
return (String)get_Value("AD_Package_Imp_Bck_Dir");
}
/** Set AD_Package_Imp_Detail_ID.
@param AD_Package_Imp_Detail_ID AD_Package_Imp_Detail_ID */
public void setAD_Package_Imp_Detail_ID (int AD_Package_Imp_Detail_ID)
{
if (AD_Package_Imp_Detail_ID < 1) throw new IllegalArgumentException ("AD_Package_Imp_Detail_ID is mandatory.");
set_ValueNoCheck ("AD_Package_Imp_Detail_ID", new Integer(AD_Package_Imp_Detail_ID));
}
/** Get AD_Package_Imp_Detail_ID.
@return AD_Package_Imp_Detail_ID */
public int getAD_Package_Imp_Detail_ID()
{
Integer ii = (Integer)get_Value("AD_Package_Imp_Detail_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set AD_Package_Imp_ID.
@param AD_Package_Imp_ID AD_Package_Imp_ID */
public void setAD_Package_Imp_ID (int AD_Package_Imp_ID)
{
if (AD_Package_Imp_ID < 1) throw new IllegalArgumentException ("AD_Package_Imp_ID is mandatory.");
set_ValueNoCheck ("AD_Package_Imp_ID", new Integer(AD_Package_Imp_ID));
}
/** Get AD_Package_Imp_ID.
@return AD_Package_Imp_ID */
public int getAD_Package_Imp_ID()
{
Integer ii = (Integer)get_Value("AD_Package_Imp_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set AD_Package_Imp_Org_Dir.
@param AD_Package_Imp_Org_Dir AD_Package_Imp_Org_Dir */
public void setAD_Package_Imp_Org_Dir (String AD_Package_Imp_Org_Dir)
{
if (AD_Package_Imp_Org_Dir != null && AD_Package_Imp_Org_Dir.length() > 255)
{
log.warning("Length > 255 - truncated");
AD_Package_Imp_Org_Dir = AD_Package_Imp_Org_Dir.substring(0,254);
}
set_Value ("AD_Package_Imp_Org_Dir", AD_Package_Imp_Org_Dir);
}
/** Get AD_Package_Imp_Org_Dir.
@return AD_Package_Imp_Org_Dir */
public String getAD_Package_Imp_Org_Dir()
{
return (String)get_Value("AD_Package_Imp_Org_Dir");
}
/** AD_Reference_ID AD_Reference_ID=1 */
public static final int AD_REFERENCE_ID_AD_Reference_ID=1;
/** Set Reference.
@param AD_Reference_ID System Reference and Validation */
public void setAD_Reference_ID (int AD_Reference_ID)
{
if (AD_Reference_ID <= 0) set_Value ("AD_Reference_ID", null);
else
set_Value ("AD_Reference_ID", new Integer(AD_Reference_ID));
}
/** Get Reference.
@return System Reference and Validation */
public int getAD_Reference_ID()
{
Integer ii = (Integer)get_Value("AD_Reference_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Table.
@param AD_Table_ID Database Table information */
public void setAD_Table_ID (int AD_Table_ID)
{
if (AD_Table_ID <= 0) set_Value ("AD_Table_ID", null);
else
set_Value ("AD_Table_ID", new Integer(AD_Table_ID));
}
/** Get Table.
@return Database Table information */
public int getAD_Table_ID()
{
Integer ii = (Integer)get_Value("AD_Table_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set ColValue.
@param ColValue ColValue */
public void setColValue (String ColValue)
{
if (ColValue != null && ColValue.length() > 2000)
{
log.warning("Length > 2000 - truncated");
ColValue = ColValue.substring(0,1999);
}
set_Value ("ColValue", ColValue);
}
/** Get ColValue.
@return ColValue */
public String getColValue()
{
return (String)get_Value("ColValue");
}
/** Set Uninstall.
@param Uninstall Uninstall */
public void setUninstall (boolean Uninstall)
{
set_Value ("Uninstall", new Boolean(Uninstall));
}
/** Get Uninstall.
@return Uninstall */
public boolean isUninstall()
{
Object oo = get_Value("Uninstall");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
}

View File

@ -0,0 +1,270 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software;
you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program;
if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
/** Generated Model - DO NOT CHANGE */
import java.util.*;
import java.sql.*;
import java.math.*;
import org.compiere.util.*;
/** Generated Model for AD_Package_Imp_Detail
* @author Jorg Janke (generated)
* @version Release 3.1.2 - $Id$ */
public class X_AD_Package_Imp_Detail extends PO
{
/** Standard Constructor
@param ctx context
@param AD_Package_Imp_Detail_ID id
@param trxName transaction
*/
public X_AD_Package_Imp_Detail (Properties ctx, int AD_Package_Imp_Detail_ID, String trxName)
{
super (ctx, AD_Package_Imp_Detail_ID, trxName);
/** if (AD_Package_Imp_Detail_ID == 0)
{
setAD_Original_ID (0);
setAD_Package_Imp_Detail_ID (0);
setAD_Package_Imp_ID (0);
}
*/
}
/** Load Constructor
@param ctx context
@param rs result set
@param trxName transaction
*/
public X_AD_Package_Imp_Detail (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AD_Table_ID=1000004 */
public static final int Table_ID=MTable.getTable_ID("AD_Package_Imp_Detail");
/** TableName=AD_Package_Imp_Detail */
public static final String Table_Name="AD_Package_Imp_Detail";
protected static KeyNamePair Model = new KeyNamePair(Table_ID,"AD_Package_Imp_Detail");
protected BigDecimal accessLevel = new BigDecimal(4);
/** AccessLevel
@return 4 - System
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_Package_Imp_Detail[").append(get_ID()).append("]");
return sb.toString();
}
/** Set AD_Original_ID.
@param AD_Original_ID AD_Original_ID */
public void setAD_Original_ID (int AD_Original_ID)
{
if (AD_Original_ID < 1) throw new IllegalArgumentException ("AD_Original_ID is mandatory.");
set_Value ("AD_Original_ID", new Integer(AD_Original_ID));
}
/** Get AD_Original_ID.
@return AD_Original_ID */
public int getAD_Original_ID()
{
Integer ii = (Integer)get_Value("AD_Original_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set AD_Package_Imp_Detail_ID.
@param AD_Package_Imp_Detail_ID AD_Package_Imp_Detail_ID */
public void setAD_Package_Imp_Detail_ID (int AD_Package_Imp_Detail_ID)
{
if (AD_Package_Imp_Detail_ID < 1) throw new IllegalArgumentException ("AD_Package_Imp_Detail_ID is mandatory.");
set_ValueNoCheck ("AD_Package_Imp_Detail_ID", new Integer(AD_Package_Imp_Detail_ID));
}
/** Get AD_Package_Imp_Detail_ID.
@return AD_Package_Imp_Detail_ID */
public int getAD_Package_Imp_Detail_ID()
{
Integer ii = (Integer)get_Value("AD_Package_Imp_Detail_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set AD_Package_Imp_ID.
@param AD_Package_Imp_ID AD_Package_Imp_ID */
public void setAD_Package_Imp_ID (int AD_Package_Imp_ID)
{
if (AD_Package_Imp_ID < 1) throw new IllegalArgumentException ("AD_Package_Imp_ID is mandatory.");
set_ValueNoCheck ("AD_Package_Imp_ID", new Integer(AD_Package_Imp_ID));
}
/** Get AD_Package_Imp_ID.
@return AD_Package_Imp_ID */
public int getAD_Package_Imp_ID()
{
Integer ii = (Integer)get_Value("AD_Package_Imp_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Table.
@param AD_Table_ID Database Table information */
public void setAD_Table_ID (int AD_Table_ID)
{
if (AD_Table_ID <= 0) set_Value ("AD_Table_ID", null);
else
set_Value ("AD_Table_ID", new Integer(AD_Table_ID));
}
/** Get Table.
@return Database Table information */
public int getAD_Table_ID()
{
Integer ii = (Integer)get_Value("AD_Table_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Action.
@param Action Indicates the Action to be performed */
public void setAction (String Action)
{
if (Action != null && Action.length() > 20)
{
log.warning("Length > 20 - truncated");
Action = Action.substring(0,19);
}
set_Value ("Action", Action);
}
/** Get Action.
@return Indicates the Action to be performed */
public String getAction()
{
return (String)get_Value("Action");
}
/** Set Ad_Backup_ID.
@param Ad_Backup_ID Ad_Backup_ID */
public void setAd_Backup_ID (int Ad_Backup_ID)
{
if (Ad_Backup_ID <= 0) set_Value ("Ad_Backup_ID", null);
else
set_Value ("Ad_Backup_ID", new Integer(Ad_Backup_ID));
}
/** Get Ad_Backup_ID.
@return Ad_Backup_ID */
public int getAd_Backup_ID()
{
Integer ii = (Integer)get_Value("Ad_Backup_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Name.
@param Name Alphanumeric identifier of the entity */
public void setName (String Name)
{
if (Name != null && Name.length() > 60)
{
log.warning("Length > 60 - truncated");
Name = Name.substring(0,59);
}
set_Value ("Name", Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity */
public String getName()
{
return (String)get_Value("Name");
}
/** Set Success.
@param Success Success */
public void setSuccess (String Success)
{
if (Success != null && Success.length() > 20)
{
log.warning("Length > 20 - truncated");
Success = Success.substring(0,19);
}
set_Value ("Success", Success);
}
/** Get Success.
@return Success */
public String getSuccess()
{
return (String)get_Value("Success");
}
/** Set DB Table Name.
@param TableName Name of the table in the database */
public void setTableName (String TableName)
{
if (TableName != null && TableName.length() > 60)
{
log.warning("Length > 60 - truncated");
TableName = TableName.substring(0,59);
}
set_Value ("TableName", TableName);
}
/** Get DB Table Name.
@return Name of the table in the database */
public String getTableName()
{
return (String)get_Value("TableName");
}
/** Set Type.
@param Type Type of Validation (SQL, Java Script, Java Language) */
public void setType (String Type)
{
if (Type != null && Type.length() > 60)
{
log.warning("Length > 60 - truncated");
Type = Type.substring(0,59);
}
set_Value ("Type", Type);
}
/** Get Type.
@return Type of Validation (SQL, Java Script, Java Language) */
public String getType()
{
return (String)get_Value("Type");
}
/** Set Uninstall.
@param Uninstall Uninstall */
public void setUninstall (boolean Uninstall)
{
set_ValueNoCheck ("Uninstall", new Boolean(Uninstall));
}
/** Get Uninstall.
@return Uninstall */
public boolean isUninstall()
{
Object oo = get_Value("Uninstall");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
}

View File

@ -0,0 +1,316 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software;
you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program;
if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
/** Generated Model - DO NOT CHANGE */
import java.util.*;
import java.sql.*;
import java.math.*;
import org.compiere.util.*;
/** Generated Model for AD_Package_Imp_Inst
* @author Jorg Janke (generated)
* @version Release 3.1.2 - $Id$ */
public class X_AD_Package_Imp_Inst extends PO
{
/** Standard Constructor
@param ctx context
@param AD_Package_Imp_Inst_ID id
@param trxName transaction
*/
public X_AD_Package_Imp_Inst (Properties ctx, int AD_Package_Imp_Inst_ID, String trxName)
{
super (ctx, AD_Package_Imp_Inst_ID, trxName);
/** if (AD_Package_Imp_Inst_ID == 0)
{
setAD_PACKAGE_IMP_INST_ID (0);
}
*/
}
/** Load Constructor
@param ctx context
@param rs result set
@param trxName transaction
*/
public X_AD_Package_Imp_Inst (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AD_Table_ID=1000001 */
public static final int Table_ID=MTable.getTable_ID("AD_Package_Imp_Inst");
/** TableName=AD_Package_Imp_Inst */
public static final String Table_Name="AD_Package_Imp_Inst";
protected static KeyNamePair Model = new KeyNamePair(Table_ID,"AD_Package_Imp_Inst");
protected BigDecimal accessLevel = new BigDecimal(4);
/** AccessLevel
@return 4 - System
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_Package_Imp_Inst[").append(get_ID()).append("]");
return sb.toString();
}
/** Set AD_PACKAGE_IMP_INST_ID.
@param AD_PACKAGE_IMP_INST_ID AD_PACKAGE_IMP_INST_ID */
public void setAD_PACKAGE_IMP_INST_ID (int AD_PACKAGE_IMP_INST_ID)
{
if (AD_PACKAGE_IMP_INST_ID < 1) throw new IllegalArgumentException ("AD_PACKAGE_IMP_INST_ID is mandatory.");
set_ValueNoCheck ("AD_PACKAGE_IMP_INST_ID", new Integer(AD_PACKAGE_IMP_INST_ID));
}
/** Get AD_PACKAGE_IMP_INST_ID.
@return AD_PACKAGE_IMP_INST_ID */
public int getAD_PACKAGE_IMP_INST_ID()
{
Integer ii = (Integer)get_Value("AD_PACKAGE_IMP_INST_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Creator.
@param Creator Creator */
public void setCreator (String Creator)
{
if (Creator != null && Creator.length() > 120)
{
log.warning("Length > 120 - truncated");
Creator = Creator.substring(0,119);
}
set_Value ("Creator", Creator);
}
/** Get Creator.
@return Creator */
public String getCreator()
{
return (String)get_Value("Creator");
}
/** Set CreatorContact.
@param CreatorContact CreatorContact */
public void setCreatorContact (String CreatorContact)
{
if (CreatorContact != null && CreatorContact.length() > 510)
{
log.warning("Length > 510 - truncated");
CreatorContact = CreatorContact.substring(0,509);
}
set_Value ("CreatorContact", CreatorContact);
}
/** Get CreatorContact.
@return CreatorContact */
public String getCreatorContact()
{
return (String)get_Value("CreatorContact");
}
/** Set Description.
@param Description Optional short description of the record */
public void setDescription (String Description)
{
if (Description != null && Description.length() > 2000)
{
log.warning("Length > 2000 - truncated");
Description = Description.substring(0,1999);
}
set_Value ("Description", Description);
}
/** Get Description.
@return Optional short description of the record */
public String getDescription()
{
return (String)get_Value("Description");
}
/** Set EMail Address.
@param EMail Electronic Mail Address */
public void setEMail (String EMail)
{
if (EMail != null && EMail.length() > 120)
{
log.warning("Length > 120 - truncated");
EMail = EMail.substring(0,119);
}
set_Value ("EMail", EMail);
}
/** Get EMail Address.
@return Electronic Mail Address */
public String getEMail()
{
return (String)get_Value("EMail");
}
/** Set Name.
@param Name Alphanumeric identifier of the entity */
public void setName (String Name)
{
if (Name != null && Name.length() > 240)
{
log.warning("Length > 240 - truncated");
Name = Name.substring(0,239);
}
set_Value ("Name", Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity */
public String getName()
{
return (String)get_Value("Name");
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set PK_Status.
@param PK_Status PK_Status */
public void setPK_Status (String PK_Status)
{
if (PK_Status != null && PK_Status.length() > 44)
{
log.warning("Length > 44 - truncated");
PK_Status = PK_Status.substring(0,43);
}
set_Value ("PK_Status", PK_Status);
}
/** Get PK_Status.
@return PK_Status */
public String getPK_Status()
{
return (String)get_Value("PK_Status");
}
/** Set PK_Version.
@param PK_Version PK_Version */
public void setPK_Version (String PK_Version)
{
if (PK_Version != null && PK_Version.length() > 40)
{
log.warning("Length > 40 - truncated");
PK_Version = PK_Version.substring(0,39);
}
set_Value ("PK_Version", PK_Version);
}
/** Get PK_Version.
@return PK_Version */
public String getPK_Version()
{
return (String)get_Value("PK_Version");
}
/** Set Processed.
@param Processed The document has been processed */
public void setProcessed (boolean Processed)
{
set_Value ("Processed", new Boolean(Processed));
}
/** Get Processed.
@return The document has been processed */
public boolean isProcessed()
{
Object oo = get_Value("Processed");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value ("Processing", new Boolean(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing()
{
Object oo = get_Value("Processing");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Release No.
@param ReleaseNo Internal Release Number */
public void setReleaseNo (String ReleaseNo)
{
if (ReleaseNo != null && ReleaseNo.length() > 40)
{
log.warning("Length > 40 - truncated");
ReleaseNo = ReleaseNo.substring(0,39);
}
set_Value ("ReleaseNo", ReleaseNo);
}
/** Get Release No.
@return Internal Release Number */
public String getReleaseNo()
{
return (String)get_Value("ReleaseNo");
}
/** Set Uninstall.
@param Uninstall Uninstall */
public void setUninstall (boolean Uninstall)
{
set_Value ("Uninstall", new Boolean(Uninstall));
}
/** Get Uninstall.
@return Uninstall */
public boolean isUninstall()
{
Object oo = get_Value("Uninstall");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Version.
@param Version Version of the table definition */
public void setVersion (String Version)
{
if (Version != null && Version.length() > 40)
{
log.warning("Length > 40 - truncated");
Version = Version.substring(0,39);
}
set_Value ("Version", Version);
}
/** Get Version.
@return Version of the table definition */
public String getVersion()
{
return (String)get_Value("Version");
}
}

View File

@ -0,0 +1,201 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software;
you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program;
if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
/** Generated Model - DO NOT CHANGE */
import java.util.*;
import java.sql.*;
import java.math.*;
import org.compiere.util.*;
/** Generated Model for AD_Package_Imp_Proc
* @author Jorg Janke (generated)
* @version Release 3.1.2 - $Id$ */
public class X_AD_Package_Imp_Proc extends PO
{
/** Standard Constructor
@param ctx context
@param AD_Package_Imp_Proc_ID id
@param trxName transaction
*/
public X_AD_Package_Imp_Proc (Properties ctx, int AD_Package_Imp_Proc_ID, String trxName)
{
super (ctx, AD_Package_Imp_Proc_ID, trxName);
/** if (AD_Package_Imp_Proc_ID == 0)
{
setAD_Package_Imp_Proc_ID (0);
setAD_Package_Source_Type (null);
}
*/
}
/** Load Constructor
@param ctx context
@param rs result set
@param trxName transaction
*/
public X_AD_Package_Imp_Proc (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AD_Table_ID=1000008 */
public static final int Table_ID=MTable.getTable_ID("AD_Package_Imp_Proc");
/** TableName=AD_Package_Imp_Proc */
public static final String Table_Name="AD_Package_Imp_Proc";
protected static KeyNamePair Model = new KeyNamePair(Table_ID,"AD_Package_Imp_Proc");
protected BigDecimal accessLevel = new BigDecimal(4);
/** AccessLevel
@return 4 - System
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_Package_Imp_Proc[").append(get_ID()).append("]");
return sb.toString();
}
/** Set AD_Override_Dict.
@param AD_Override_Dict AD_Override_Dict */
public void setAD_Override_Dict (boolean AD_Override_Dict)
{
set_Value ("AD_Override_Dict", new Boolean(AD_Override_Dict));
}
/** Get AD_Override_Dict.
@return AD_Override_Dict */
public boolean isAD_Override_Dict()
{
Object oo = get_Value("AD_Override_Dict");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set AD_Package_Dir.
@param AD_Package_Dir AD_Package_Dir */
public void setAD_Package_Dir (String AD_Package_Dir)
{
if (AD_Package_Dir != null && AD_Package_Dir.length() > 255)
{
log.warning("Length > 255 - truncated");
AD_Package_Dir = AD_Package_Dir.substring(0,254);
}
set_Value ("AD_Package_Dir", AD_Package_Dir);
}
/** Get AD_Package_Dir.
@return AD_Package_Dir */
public String getAD_Package_Dir()
{
return (String)get_Value("AD_Package_Dir");
}
/** Set AD_Package_Imp_Proc_ID.
@param AD_Package_Imp_Proc_ID AD_Package_Imp_Proc_ID */
public void setAD_Package_Imp_Proc_ID (int AD_Package_Imp_Proc_ID)
{
if (AD_Package_Imp_Proc_ID < 1) throw new IllegalArgumentException ("AD_Package_Imp_Proc_ID is mandatory.");
set_ValueNoCheck ("AD_Package_Imp_Proc_ID", new Integer(AD_Package_Imp_Proc_ID));
}
/** Get AD_Package_Imp_Proc_ID.
@return AD_Package_Imp_Proc_ID */
public int getAD_Package_Imp_Proc_ID()
{
Integer ii = (Integer)get_Value("AD_Package_Imp_Proc_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set AD_Package_Source.
@param AD_Package_Source AD_Package_Source */
public void setAD_Package_Source (String AD_Package_Source)
{
if (AD_Package_Source != null && AD_Package_Source.length() > 255)
{
log.warning("Length > 255 - truncated");
AD_Package_Source = AD_Package_Source.substring(0,254);
}
set_Value ("AD_Package_Source", AD_Package_Source);
}
/** Get AD_Package_Source.
@return AD_Package_Source */
public String getAD_Package_Source()
{
return (String)get_Value("AD_Package_Source");
}
/** AD_Package_Source_Type AD_Reference_ID=1000005 */
public static final int AD_PACKAGE_SOURCE_TYPE_AD_Reference_ID=1000005;
/** File = File */
public static final String AD_PACKAGE_SOURCE_TYPE_File = "File";
/** WebService = WS */
public static final String AD_PACKAGE_SOURCE_TYPE_WebService = "WS";
/** Set AD_Package_Source_Type.
@param AD_Package_Source_Type AD_Package_Source_Type */
public void setAD_Package_Source_Type (String AD_Package_Source_Type)
{
if (AD_Package_Source_Type == null) throw new IllegalArgumentException ("AD_Package_Source_Type is mandatory");
if (AD_Package_Source_Type.equals("File") || AD_Package_Source_Type.equals("WS"));
else throw new IllegalArgumentException ("AD_Package_Source_Type Invalid value - " + AD_Package_Source_Type + " - Reference_ID=1000005 - File - WS");
if (AD_Package_Source_Type.length() > 10)
{
log.warning("Length > 10 - truncated");
AD_Package_Source_Type = AD_Package_Source_Type.substring(0,9);
}
set_Value ("AD_Package_Source_Type", AD_Package_Source_Type);
}
/** Get AD_Package_Source_Type.
@return AD_Package_Source_Type */
public String getAD_Package_Source_Type()
{
return (String)get_Value("AD_Package_Source_Type");
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value ("Processing", new Boolean(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing()
{
Object oo = get_Value("Processing");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
}

View File

@ -0,0 +1,355 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*
* Copyright (C) 2005 Robert KLEIN. robeklein@gmail.com *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.process;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.logging.Level;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.process.*;
/**
* Convert AD to XML
*
* @author Robert Klein
* @version $Id: CopyRole.java,v 1.0$
*
*/
public class CopyRole extends SvrProcess
{
private int m_AD_Role_ID_From = 0;
private int m_AD_Role_ID_To = 0;
private int m_AD_Client_ID = 0;
private int m_AD_Org_ID = 0;
StringBuffer sqlB = null;
private Object[] m_newValues = null;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("AD_Role_ID") && i == 0)
m_AD_Role_ID_From = para[i].getParameterAsInt();
else if (name.equals("AD_Role_ID")&& i == 1)
m_AD_Role_ID_To = para[i].getParameterAsInt();
else if (name.equals("AD_Client_ID"))
m_AD_Client_ID = para[i].getParameterAsInt();
else if (name.equals("AD_Org_ID"))
m_AD_Org_ID = para[i].getParameterAsInt();
}
} // prepare
/**
* Start the transformation to XML
* @return info
* @throws Exception
*/
protected String doIt() throws java.lang.Exception
{
//Process AD_Window_Access Values
String sql = "SELECT * FROM AD_Window_Access WHERE AD_Role_ID= " + m_AD_Role_ID_From;
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sql, get_TrxName());
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next())
{
sqlB = new StringBuffer ("SELECT count(*) FROM AD_Window_Access "
+ "WHERE AD_Role_ID=? and AD_Window_ID=?"
+ "and AD_Client_ID = " + m_AD_Client_ID
+ "and AD_Org_ID= " + m_AD_Org_ID);
int count = DB.getSQLValue(null,sqlB.toString(),m_AD_Role_ID_To,rs.getInt("AD_Window_ID"));
if (count>0){
sqlB = new StringBuffer ("UPDATE AD_Window_Access "
+ "SET isActive = '" + rs.getString("isActive")
+ "', isReadWrite = '" + rs.getString("isReadWrite")
+ "' WHERE AD_Client_ID = " + m_AD_Client_ID
+ " and AD_Org_ID = " + m_AD_Org_ID
+ " and AD_Role_ID = " + m_AD_Role_ID_To
+ " and AD_Window_ID = " + rs.getInt("AD_Window_ID") );
int no = DB.executeUpdate (sqlB.toString(), get_TrxName());
}
else{
sqlB = new StringBuffer ("Insert INTO AD_Window_Access"
+ "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, "
+ "AD_Role_ID, AD_Window_ID, isActive, isReadWrite) "
+ "VALUES("
+ " "+ m_AD_Client_ID
+ ", "+ m_AD_Org_ID
+ ", "+ Env.getAD_User_ID(Env.getCtx())
+ ", "+ Env.getAD_User_ID(Env.getCtx())
+ ", " + m_AD_Role_ID_To
+ ", " + rs.getInt("AD_Window_ID")
+ ", '" + rs.getString("isActive")
+ "', '" + rs.getString("isReadWrite")+"')");
int no = DB.executeUpdate (sqlB.toString(), get_TrxName());
}
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e) {
log.log(Level.SEVERE,"CreateRoles-Window Access", e);
}
//Process AD_Process_Access Values
sql = "SELECT * FROM AD_Process_Access WHERE AD_Role_ID= " + m_AD_Role_ID_From;
pstmt = null;
pstmt = DB.prepareStatement (sql, get_TrxName());
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next())
{
sqlB = new StringBuffer ("SELECT count(*) FROM AD_Process_Access "
+ "WHERE AD_Role_ID=? AND AD_Process_ID=?"
+ "AND AD_Client_ID = " + m_AD_Client_ID
+ "and AD_Org_ID= " + m_AD_Org_ID);
int count = DB.getSQLValue(null,sqlB.toString(),m_AD_Role_ID_To,rs.getInt("AD_Process_ID"));
if (count>0){
sqlB = new StringBuffer ("UPDATE AD_Process_Access "
+ "SET isActive = '" + rs.getString("isActive")
+ "', isReadWrite = '" + rs.getString("isReadWrite")
+ "' WHERE AD_Client_ID = " + m_AD_Client_ID
+ " and AD_Org_ID = " + m_AD_Org_ID
+ " and AD_Role_ID = " + m_AD_Role_ID_To
+ " and AD_Process_ID = " + rs.getInt("AD_Process_ID") );
int no = DB.executeUpdate (sqlB.toString(), get_TrxName());
}
else{
sqlB = new StringBuffer ("Insert INTO AD_Process_Access"
+ "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, "
+ "AD_Role_ID, AD_Process_ID, isActive, isReadWrite) "
+ "VALUES("
+ " "+ m_AD_Client_ID
+ ", "+ m_AD_Org_ID
+ ", "+ Env.getAD_User_ID(Env.getCtx())
+ ", "+ Env.getAD_User_ID(Env.getCtx())
+ ", " + m_AD_Role_ID_To
+ ", " + rs.getInt("AD_Process_ID")
+ ", '" + rs.getString("isActive")
+ "', '" + rs.getString("isReadWrite")+"')");
int no = DB.executeUpdate (sqlB.toString(), get_TrxName());
}
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e) {
log.log(Level.SEVERE,"CreateRoles-AD_Process", e);
}
// Process AD_Form_Access Values
sql = "SELECT * FROM AD_Form_Access WHERE AD_Role_ID= " + m_AD_Role_ID_From;
pstmt = null;
pstmt = DB.prepareStatement (sql, get_TrxName());
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next())
{
sqlB = new StringBuffer ("SELECT count(*) FROM AD_Form_Access "
+ "WHERE AD_Role_ID=? AND AD_Form_ID=?"
+ "AND AD_Client_ID = " + m_AD_Client_ID
+ "and AD_Org_ID= " + m_AD_Org_ID);
int count = DB.getSQLValue(null,sqlB.toString(),m_AD_Role_ID_To,rs.getInt("AD_Form_ID"));
if (count>0){
sqlB = new StringBuffer ("UPDATE AD_Form_Access "
+ "SET isActive = '" + rs.getString("isActive")
+ "', isReadWrite = '" + rs.getString("isReadWrite")
+ "' WHERE AD_Client_ID = " + m_AD_Client_ID
+ " and AD_Org_ID = " + m_AD_Org_ID
+ " and AD_Role_ID = " + m_AD_Role_ID_To
+ " and AD_Form_ID = " + rs.getInt("AD_Form_ID") );
int no = DB.executeUpdate (sqlB.toString(), get_TrxName());
}
else{
sqlB = new StringBuffer ("Insert INTO AD_Form_Access"
+ "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, "
+ "AD_Role_ID, AD_Form_ID, isActive, isReadWrite) "
+ "VALUES("
+ " "+ m_AD_Client_ID
+ ", "+ m_AD_Org_ID
+ ", "+ Env.getAD_User_ID(Env.getCtx())
+ ", "+ Env.getAD_User_ID(Env.getCtx())
+ ", " + m_AD_Role_ID_To
+ ", " + rs.getInt("AD_Form_ID")
+ ", '" + rs.getString("isActive")
+ "', '" + rs.getString("isReadWrite")+"')");
int no = DB.executeUpdate (sqlB.toString(), get_TrxName());
}
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e) {
log.log(Level.SEVERE,"CreateRoles-Form Access", e);
}
// Process AD_Workflow_Access Values
sql = "SELECT * FROM AD_Workflow_Access WHERE AD_Role_ID= " + m_AD_Role_ID_From;
pstmt = null;
pstmt = DB.prepareStatement (sql, get_TrxName());
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next())
{
sqlB = new StringBuffer ("SELECT count(*) FROM AD_Workflow_Access "
+ "WHERE AD_Role_ID=? AND AD_Workflow_ID=?"
+ "AND AD_Client_ID = " + m_AD_Client_ID
+ "and AD_Org_ID= " + m_AD_Org_ID);
int count = DB.getSQLValue(null,sqlB.toString(),m_AD_Role_ID_To,rs.getInt("AD_Workflow_ID"));
if (count>0){
sqlB = new StringBuffer ("UPDATE AD_Workflow_Access "
+ "SET isActive = '" + rs.getString("isActive")
+ "', isReadWrite = '" + rs.getString("isReadWrite")
+ "' WHERE AD_Client_ID = " + m_AD_Client_ID
+ " and AD_Org_ID = " + m_AD_Org_ID
+ " and AD_Role_ID = " + m_AD_Role_ID_To
+ " and AD_Workflow_ID = " + rs.getInt("AD_Workflow_ID") );
int no = DB.executeUpdate (sqlB.toString(), get_TrxName());
}
else{
sqlB = new StringBuffer ("Insert INTO AD_Workflow_Access"
+ "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, "
+ "AD_Role_ID, AD_Workflow_ID, isActive, isReadWrite) "
+ "VALUES("
+ " "+ m_AD_Client_ID
+ ", "+ m_AD_Org_ID
+ ", "+ Env.getAD_User_ID(Env.getCtx())
+ ", "+ Env.getAD_User_ID(Env.getCtx())
+ ", " + m_AD_Role_ID_To
+ ", " + rs.getInt("AD_Workflow_ID")
+ ", '" + rs.getString("isActive")
+ "', '" + rs.getString("isReadWrite")+"')");
int no = DB.executeUpdate (sqlB.toString(), get_TrxName());
}
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e) {
log.log(Level.SEVERE,"CreateRoles-Workflow", e);
}
// Process AD_Task_Access Values
sql = "SELECT * FROM AD_Task_Access WHERE AD_Role_ID= " + m_AD_Role_ID_From;
pstmt = null;
pstmt = DB.prepareStatement (sql, get_TrxName());
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next())
{
sqlB = new StringBuffer ("SELECT count(*) FROM AD_Task_Access "
+ "WHERE AD_Role_ID=? AND AD_Task_ID=?"
+ "AND AD_Client_ID = " + m_AD_Client_ID
+ "and AD_Org_ID= " + m_AD_Org_ID);
int count = DB.getSQLValue(null,sqlB.toString(),m_AD_Role_ID_To,rs.getInt("AD_Task_ID"));
if (count>0){
sqlB = new StringBuffer ("UPDATE AD_Task_Access "
+ "SET isActive = '" + rs.getString("isActive")
+ "', isReadWrite = '" + rs.getString("isReadWrite")
+ "' WHERE AD_Client_ID = " + m_AD_Client_ID
+ " and AD_Org_ID = " + m_AD_Org_ID
+ " and AD_Role_ID = " + m_AD_Role_ID_To
+ " and AD_Task_ID = " + rs.getInt("AD_Task_ID") );
int no = DB.executeUpdate (sqlB.toString(), get_TrxName());
}
else{
sqlB = new StringBuffer ("Insert INTO AD_Task_Access"
+ "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, "
+ "AD_Role_ID, AD_Task_ID, isActive, isReadWrite) "
+ "VALUES("
+ " "+ m_AD_Client_ID
+ ", "+ m_AD_Org_ID
+ ", "+ Env.getAD_User_ID(Env.getCtx())
+ ", "+ Env.getAD_User_ID(Env.getCtx())
+ ", " + m_AD_Role_ID_To
+ ", " + rs.getInt("AD_Task_ID")
+ ", '" + rs.getString("isActive")
+ "', '" + rs.getString("isReadWrite")+"')");
int no = DB.executeUpdate (sqlB.toString(), get_TrxName());
}
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e) {
log.log(Level.SEVERE,"CreateRoles-Task", e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
} return "";
} // doIt
} // CopyRole