Package org.springframework.jdbc.core

Examples of org.springframework.jdbc.core.JdbcTemplate.execute()


            "INSERT INTO acl_object_identity VALUES (2, 'org.springframework.security.acl.DomainObject:2', 1, 'org.springframework.security.acl.basic.SimpleAclEntry');");
        template.execute(
            "INSERT INTO acl_object_identity VALUES (3, 'org.springframework.security.acl.DomainObject:3', 1, 'org.springframework.security.acl.basic.SimpleAclEntry');");
        template.execute(
            "INSERT INTO acl_object_identity VALUES (4, 'org.springframework.security.acl.DomainObject:4', 1, 'org.springframework.security.acl.basic.SimpleAclEntry');");
        template.execute(
            "INSERT INTO acl_object_identity VALUES (5, 'org.springframework.security.acl.DomainObject:5', 3, 'org.springframework.security.acl.basic.SimpleAclEntry');");
        template.execute(
            "INSERT INTO acl_object_identity VALUES (6, 'org.springframework.security.acl.DomainObject:6', 3, 'org.springframework.security.acl.basic.SimpleAclEntry');");

        // ----- BEGIN deviation from normal sample data load script -----
View Full Code Here


            "INSERT INTO acl_object_identity VALUES (3, 'org.springframework.security.acl.DomainObject:3', 1, 'org.springframework.security.acl.basic.SimpleAclEntry');");
        template.execute(
            "INSERT INTO acl_object_identity VALUES (4, 'org.springframework.security.acl.DomainObject:4', 1, 'org.springframework.security.acl.basic.SimpleAclEntry');");
        template.execute(
            "INSERT INTO acl_object_identity VALUES (5, 'org.springframework.security.acl.DomainObject:5', 3, 'org.springframework.security.acl.basic.SimpleAclEntry');");
        template.execute(
            "INSERT INTO acl_object_identity VALUES (6, 'org.springframework.security.acl.DomainObject:6', 3, 'org.springframework.security.acl.basic.SimpleAclEntry');");

        // ----- BEGIN deviation from normal sample data load script -----
        template.execute(
            "INSERT INTO acl_object_identity VALUES (7, 'org.springframework.security.acl.DomainObject:7', 3, 'some.invalid.acl.entry.class');");
View Full Code Here

            "INSERT INTO acl_object_identity VALUES (5, 'org.springframework.security.acl.DomainObject:5', 3, 'org.springframework.security.acl.basic.SimpleAclEntry');");
        template.execute(
            "INSERT INTO acl_object_identity VALUES (6, 'org.springframework.security.acl.DomainObject:6', 3, 'org.springframework.security.acl.basic.SimpleAclEntry');");

        // ----- BEGIN deviation from normal sample data load script -----
        template.execute(
            "INSERT INTO acl_object_identity VALUES (7, 'org.springframework.security.acl.DomainObject:7', 3, 'some.invalid.acl.entry.class');");

        // ----- FINISH deviation from normal sample data load script -----
        template.execute("INSERT INTO acl_permission VALUES (null, 1, 'ROLE_SUPERVISOR', 1);");
        template.execute("INSERT INTO acl_permission VALUES (null, 2, 'ROLE_SUPERVISOR', 0);");
View Full Code Here

        // ----- BEGIN deviation from normal sample data load script -----
        template.execute(
            "INSERT INTO acl_object_identity VALUES (7, 'org.springframework.security.acl.DomainObject:7', 3, 'some.invalid.acl.entry.class');");

        // ----- FINISH deviation from normal sample data load script -----
        template.execute("INSERT INTO acl_permission VALUES (null, 1, 'ROLE_SUPERVISOR', 1);");
        template.execute("INSERT INTO acl_permission VALUES (null, 2, 'ROLE_SUPERVISOR', 0);");
        template.execute("INSERT INTO acl_permission VALUES (null, 2, 'rod', 2);");
        template.execute("INSERT INTO acl_permission VALUES (null, 3, 'scott', 14);");
        template.execute("INSERT INTO acl_permission VALUES (null, 6, 'scott', 1);");
View Full Code Here

        template.execute(
            "INSERT INTO acl_object_identity VALUES (7, 'org.springframework.security.acl.DomainObject:7', 3, 'some.invalid.acl.entry.class');");

        // ----- FINISH deviation from normal sample data load script -----
        template.execute("INSERT INTO acl_permission VALUES (null, 1, 'ROLE_SUPERVISOR', 1);");
        template.execute("INSERT INTO acl_permission VALUES (null, 2, 'ROLE_SUPERVISOR', 0);");
        template.execute("INSERT INTO acl_permission VALUES (null, 2, 'rod', 2);");
        template.execute("INSERT INTO acl_permission VALUES (null, 3, 'scott', 14);");
        template.execute("INSERT INTO acl_permission VALUES (null, 6, 'scott', 1);");

        createGroupTables(template);
View Full Code Here

            "INSERT INTO acl_object_identity VALUES (7, 'org.springframework.security.acl.DomainObject:7', 3, 'some.invalid.acl.entry.class');");

        // ----- FINISH deviation from normal sample data load script -----
        template.execute("INSERT INTO acl_permission VALUES (null, 1, 'ROLE_SUPERVISOR', 1);");
        template.execute("INSERT INTO acl_permission VALUES (null, 2, 'ROLE_SUPERVISOR', 0);");
        template.execute("INSERT INTO acl_permission VALUES (null, 2, 'rod', 2);");
        template.execute("INSERT INTO acl_permission VALUES (null, 3, 'scott', 14);");
        template.execute("INSERT INTO acl_permission VALUES (null, 6, 'scott', 1);");

        createGroupTables(template);
        insertGroupData(template);
View Full Code Here

        // ----- FINISH deviation from normal sample data load script -----
        template.execute("INSERT INTO acl_permission VALUES (null, 1, 'ROLE_SUPERVISOR', 1);");
        template.execute("INSERT INTO acl_permission VALUES (null, 2, 'ROLE_SUPERVISOR', 0);");
        template.execute("INSERT INTO acl_permission VALUES (null, 2, 'rod', 2);");
        template.execute("INSERT INTO acl_permission VALUES (null, 3, 'scott', 14);");
        template.execute("INSERT INTO acl_permission VALUES (null, 6, 'scott', 1);");

        createGroupTables(template);
        insertGroupData(template);
    }
View Full Code Here

        // ----- FINISH deviation from normal sample data load script -----
        template.execute("INSERT INTO acl_permission VALUES (null, 1, 'ROLE_SUPERVISOR', 1);");
        template.execute("INSERT INTO acl_permission VALUES (null, 2, 'ROLE_SUPERVISOR', 0);");
        template.execute("INSERT INTO acl_permission VALUES (null, 2, 'rod', 2);");
        template.execute("INSERT INTO acl_permission VALUES (null, 3, 'scott', 14);");
        template.execute("INSERT INTO acl_permission VALUES (null, 6, 'scott', 1);");

        createGroupTables(template);
        insertGroupData(template);
    }
View Full Code Here

  @Deployment
  public void testRollbackTransactionOnActivitiException() {
   
    // Create a table that the userBean is supposed to fill with some data
    JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
    jdbcTemplate.execute("create table MY_TABLE (MY_TEXT varchar);");
   
    // The hello() method will start the process. The process will wait in a user task
    userBean.hello();
    assertEquals(0, jdbcTemplate.queryForLong("select count(*) from MY_TABLE"));
   
View Full Code Here

    // the record and the process must be rolled back !
    assertEquals("My Task", taskService.createTaskQuery().singleResult().getName());
    assertEquals(0, jdbcTemplate.queryForLong("select count(*) from MY_TABLE"));
   
    // Cleanup
    jdbcTemplate.execute("drop table MY_TABLE if exists;");
  }
 
 
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.