public static void main(String[] argv)
throws SQLException, org.xml.sax.SAXException, java.io.IOException,
ClassNotFoundException, IllegalAccessException, InstantiationException {
DBPersist oJob;
DBBind oDBB;
JDCConnection oCon;
if (argv.length!=4 && argv.length!=5)
printUsage();
else
if (!argv[0].equals("create"))
printUsage();
else if (!argv[1].equalsIgnoreCase("MAIL") && !argv[1].equalsIgnoreCase("FAX") &&
!argv[1].equalsIgnoreCase("SAVE") && !argv[1].equalsIgnoreCase("FTP") &&
!argv[1].equalsIgnoreCase("SEND") )
printUsage();
else {
oDBB = new DBBind(argv[2]);
oCon = oDBB.getConnection("job_main");
oCon.setAutoCommit(true);
oJob = new DBPersist(DB.k_jobs, argv[1]);
oJob.parseXML(argv[3]);
if (argv.length==5)
oJob.replace (DB.gu_job, argv[4]);
else if (!oJob.getItemMap().containsKey(DB.gu_job))
oJob.put (DB.gu_job, com.knowgate.misc.Gadgets.generateUUID());
oJob.store(oCon);
oCon.close();
oDBB.close();
System.out.println("gu_job:"+oJob.getString(DB.gu_job));
} // fi
} // main