Package nexj.core.persistence.sql.SQLSchemaManager

Examples of nexj.core.persistence.sql.SQLSchemaManager.SQLConnectionAppender


         if (!bLocked) // lock acquired previously, therefore schema created, only truncate
         {
            RelationalSchema schema = (RelationalSchema)m_database.getSchema();
            SQLSchemaManager manager = m_adapter.createSchemaManager(m_database);
            SQLConnectionAppender appender = new SQLSchemaManager.SQLConnectionAppender(con, true);

            appender.setLogLevel(Logger.DUMP);
            manager.setSQLAppender(appender);
            manager.setOwner("test");
            appender.setSafe(false);
            manager.truncateSchema(schema);
         }

         SQLUtil.execute(con, getSQLScript(ST_INSERT));
      }
View Full Code Here


            // use separate connection for creating schema since DDL operations might issue commit
            con = m_adapter.getConnectionFactory().getConnection(m_adapter);

            RelationalSchema schema = (RelationalSchema)m_database.getSchema();
            SQLSchemaManager manager = m_adapter.createSchemaManager(m_database);
            SQLConnectionAppender appender = new SQLSchemaManager.SQLConnectionAppender(con, true);

            // recreate test schema
            appender.setLogLevel(Logger.DUMP);
            manager.setSQLAppender(appender);
            manager.setOwner("test");
            manager.dropSchema(schema);
            SQLUtil.execute(con, getSQLScript(ST_DROP));
            appender.setSafe(false);
            manager.createSchema(schema);
            con.close();
            con = null;

            s_initMap.put(sAdapterName, tx);
View Full Code Here

TOP

Related Classes of nexj.core.persistence.sql.SQLSchemaManager.SQLConnectionAppender

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.