Static Public Member Functions | |
void | main (String[] args) |
|
Definition at line 17 of file GenDefaults.java. References JetWebGeneratorReader.getGeneratorWrapper(), DBConnectionManager.init(), DBObjectManager.passDBConnection(), GeneratorWrapper.toString(), and DBObjectManager.writeObject(). 00017 { 00018 00019 JetWebConfig.init(); 00020 00021 JetWebGeneratorReader reader = null; 00022 GeneratorWrapper wrapper = null; 00023 00024 if(args.length<1){ 00025 System.out.println("Pass xml file as argument"); 00026 return; 00027 } 00028 00029 try{ 00030 00031 reader = new JetWebGeneratorReader(args[0]); 00032 wrapper = reader.getGeneratorWrapper(); 00033 }catch(Throwable e){ 00034 System.err.println 00035 ("Unable to create generator class from xml file"); 00036 System.err.println(e.toString()); 00037 //return; 00038 } 00039 00040 DBConnectionManager connManager = new DBConnectionManager(); 00041 00042 String[] dbs = {DBConfig.JETWEB, "hepdata", "test"}; 00043 00044 connManager.init(dbs); 00045 00046 DBObjectManager objManager = new DBObjectManager(); 00047 00048 objManager.passDBConnection(connManager); 00049 00050 String tableName = wrapper.toString()+"_defaults"; 00051 00052 //String tableName = "testDefaults"; 00053 00054 System.out.println("Writing to table "+tableName); 00055 00056 try { 00057 objManager.writeObject(wrapper, tableName, "test"); 00058 } catch (Exception e) { 00059 } 00060 00061 System.out.println("finished"); 00062 00063 //return; 00064 };
|
Generated Wed Jan 17 09:14:27 GMT 2007