Code example for SchemaExport

Methods: create

0
        System.out.println ("Usage: org.jpos.gl.Import filename");
        System.exit (0);
    } 
 
    private void createSchema () throws HibernateException {
        SchemaExport export = new SchemaExport (cfg);
        // export.setOutputFile ("/tmp/schema.sql"); 
        // export.setDelimiter (";"); 
        export.create (true, true); // don't create tables
    } 
     
    private void createCharts (Session sess, Iterator iter) 
        throws SQLException, HibernateException, ParseExceptionTransaction txn = sess.beginTransaction();
        while (iter.hasNext()) {
            Element elem = (Element) iter.next ();
            CompositeAccount acct = new CompositeAccount (elem);
            sess.save (acct);
            acct.setRoot (acct);