Java Code Examples for org.springframework.test.jdbc.JdbcTestUtils#deleteFromTables()

The following examples show how to use org.springframework.test.jdbc.JdbcTestUtils#deleteFromTables() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProgrammaticTxMgmtTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
protected int deleteFromTables(String... names) {
	return JdbcTestUtils.deleteFromTables(this.jdbcTemplate, names);
}
 
Example 2
Source File: ProgrammaticTxMgmtTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
protected int deleteFromTables(String... names) {
	return JdbcTestUtils.deleteFromTables(this.jdbcTemplate, names);
}
 
Example 3
Source File: JpaTicketRegistryTests.java    From springboot-shiro-cas-mybatis with MIT License 4 votes vote down vote up
@Before
public void setUp() {
    JdbcTestUtils.deleteFromTables(simpleJdbcTemplate, "SERVICETICKET");
    JdbcTestUtils.deleteFromTables(simpleJdbcTemplate, "TICKETGRANTINGTICKET");
}
 
Example 4
Source File: JpaTicketRegistryTests.java    From cas4.0.x-server-wechat with Apache License 2.0 4 votes vote down vote up
@Before
public void setUp() {
    JdbcTestUtils.deleteFromTables(simpleJdbcTemplate, "SERVICETICKET");
    JdbcTestUtils.deleteFromTables(simpleJdbcTemplate, "TICKETGRANTINGTICKET");
}
 
Example 5
Source File: ProgrammaticTxMgmtTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
protected int deleteFromTables(String... names) {
	return JdbcTestUtils.deleteFromTables(this.jdbcTemplate, names);
}
 
Example 6
Source File: AbstractTransactionalTestNGSpringContextTests.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Convenience method for deleting all rows from the specified tables.
 * <p>Use with caution outside of a transaction!
 * @param names the names of the tables from which to delete
 * @return the total number of rows deleted from all specified tables
 * @see JdbcTestUtils#deleteFromTables
 */
protected int deleteFromTables(String... names) {
	return JdbcTestUtils.deleteFromTables(this.jdbcTemplate, names);
}
 
Example 7
Source File: AbstractTransactionalJUnit4SpringContextTests.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Convenience method for deleting all rows from the specified tables.
 * <p>Use with caution outside of a transaction!
 * @param names the names of the tables from which to delete
 * @return the total number of rows deleted from all specified tables
 * @see JdbcTestUtils#deleteFromTables
 */
protected int deleteFromTables(String... names) {
	return JdbcTestUtils.deleteFromTables(this.jdbcTemplate, names);
}
 
Example 8
Source File: AbstractTransactionalTestNGSpringContextTests.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Convenience method for deleting all rows from the specified tables.
 * <p>Use with caution outside of a transaction!
 * @param names the names of the tables from which to delete
 * @return the total number of rows deleted from all specified tables
 * @see JdbcTestUtils#deleteFromTables
 */
protected int deleteFromTables(String... names) {
	return JdbcTestUtils.deleteFromTables(this.jdbcTemplate, names);
}
 
Example 9
Source File: AbstractTransactionalJUnit4SpringContextTests.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Convenience method for deleting all rows from the specified tables.
 * <p>Use with caution outside of a transaction!
 * @param names the names of the tables from which to delete
 * @return the total number of rows deleted from all specified tables
 * @see JdbcTestUtils#deleteFromTables
 */
protected int deleteFromTables(String... names) {
	return JdbcTestUtils.deleteFromTables(this.jdbcTemplate, names);
}
 
Example 10
Source File: JpaLockingStrategyTests.java    From springboot-shiro-cas-mybatis with MIT License 2 votes vote down vote up
/**
 * One-time test initialization.
 *
 * @throws Exception On setup errors.
 */
public void afterPropertiesSet() throws Exception {
    JdbcTestUtils.deleteFromTables(simpleJdbcTemplate, "locks");
}
 
Example 11
Source File: JpaLockingStrategyTests.java    From cas4.0.x-server-wechat with Apache License 2.0 2 votes vote down vote up
/**
 * One-time test initialization.
 *
 * @throws Exception On setup errors.
 */
public void afterPropertiesSet() throws Exception {
    JdbcTestUtils.deleteFromTables(simpleJdbcTemplate, "locks");
}
 
Example 12
Source File: AbstractTransactionalTestNGSpringContextTests.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Convenience method for deleting all rows from the specified tables.
 * <p>Use with caution outside of a transaction!
 * @param names the names of the tables from which to delete
 * @return the total number of rows deleted from all specified tables
 * @see JdbcTestUtils#deleteFromTables
 */
protected int deleteFromTables(String... names) {
	return JdbcTestUtils.deleteFromTables(this.jdbcTemplate, names);
}
 
Example 13
Source File: AbstractTransactionalJUnit4SpringContextTests.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Convenience method for deleting all rows from the specified tables.
 * <p>Use with caution outside of a transaction!
 * @param names the names of the tables from which to delete
 * @return the total number of rows deleted from all specified tables
 * @see JdbcTestUtils#deleteFromTables
 */
protected int deleteFromTables(String... names) {
	return JdbcTestUtils.deleteFromTables(this.jdbcTemplate, names);
}