Package org.hibernate.jdbc

Examples of org.hibernate.jdbc.Work


    }
   
    conf.getProperties().put("hibernate.dialect", this.emf.getProperties().get("hibernate.dialect"));
   
    Session session = (Session)em.getDelegate();
    session.doWork(new Work() {
      @Override
      public void execute(Connection connection) throws SQLException {
        SchemaExport export = new SchemaExport(conf, connection);
        export.create(true, true);
      }
View Full Code Here


            }

            if (log.isDebugEnabled()) log.debug("Running statement: " + ddlStatement);
            new HibernateTxFragment() {
            protected void txFragment(Session session) throws Exception {
                Work w = new Work() {
                public void execute(Connection connection) throws SQLException {
                    Statement statement = null;
                    try {
                        statement = connection.createStatement();
                        statement.execute(ddlStatement);
View Full Code Here

     */
    protected boolean existsModulesTable(final String default_schema) throws Exception {
        final boolean[] returnValue = {false};
        new HibernateTxFragment(true) {
        protected void txFragment(Session session) throws Exception {
            Work w = new Work() {
            public void execute(Connection connection) throws SQLException {
                // IMPORTANT NOTE: SQL Server driver closes the previous result set. So it's very important to read the
                // data from the first result set before opening a new one. If not an exception is thrown.

                DatabaseMetaData metaData = connection.getMetaData();
View Full Code Here

    @Test
    public void testWrapperWithNestedExecute() throws Exception {
        @Cleanup
        ScrollableResults scroll1 = streamQuery("from HTextFlow");
        try {
            session.doWork(new Work() {
                @Override
                public void execute(Connection connection) throws SQLException {
                    Statement statement = connection.createStatement();
                    statement.executeUpdate("delete from HTextFlow where 0=1");
                }
View Full Code Here

        Transaction tx = null;
        Session session = sessionFactory.openSession();
        try {
            tx = session.beginTransaction();

            session.doWork(new Work() {
                @Override
                public void execute(Connection connection) throws SQLException {
                    String storyQuery = null;
                    String epicQuery = null;
                    String themeQuery = null;
View Full Code Here

TOP

Related Classes of org.hibernate.jdbc.Work

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.