OPEN - issue BATCH-1401: All inserts of JobId should be of Types.BIGINT

Fixed samples to work with MySQL (except customer filter job)
This commit is contained in:
dsyer
2009-09-16 11:44:49 +00:00
parent bade1c74c5
commit d31702c20b
14 changed files with 22 additions and 29 deletions

View File

@@ -28,7 +28,7 @@ import org.springframework.jdbc.core.namedparam.BeanPropertySqlParameterSource;
public class JdbcPlayerDao extends SimpleJdbcDaoSupport implements PlayerDao {
public static final String INSERT_PLAYER =
"INSERT into players(player_id, last_name, first_name, pos, year_of_birth, year_drafted)" +
"INSERT into PLAYERS (player_id, last_name, first_name, pos, year_of_birth, year_drafted)" +
" values (:id, :lastName, :firstName, :position, :birthYear, :debutYear)";
public void savePlayer(Player player) {

View File

@@ -32,7 +32,7 @@ import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
*/
public class JdbcCustomerDebitDao implements CustomerDebitDao {
private static final String UPDATE_CREDIT = "UPDATE customer SET credit= credit-? WHERE name=?";
private static final String UPDATE_CREDIT = "UPDATE CUSTOMER SET credit= credit-? WHERE name=?";
private SimpleJdbcOperations simpleJdbcTemplate;

View File

@@ -36,7 +36,7 @@ public class JdbcTradeDao implements TradeDao {
/**
* template for inserting a row
*/
private static final String INSERT_TRADE_RECORD = "INSERT INTO trade (id, version, isin, quantity, price, customer) VALUES (?, 0, ?, ? ,?, ?)";
private static final String INSERT_TRADE_RECORD = "INSERT INTO TRADE (id, version, isin, quantity, price, customer) VALUES (?, 0, ?, ? ,?, ?)";
/**
* handles the processing of sql query

View File

@@ -76,16 +76,6 @@ public class DataSourceInitializer implements InitializingBean, DisposableBean {
DataSourceInitializer.class.getSimpleName() + "-context.xml"));
}
/**
* @throws Throwable
* @see java.lang.Object#finalize()
*/
protected void finalize() throws Throwable {
super.finalize();
initialized = false;
logger.debug("finalize called");
}
public void destroy() {
if (destroyScripts==null) return;
for (int i = 0; i < destroyScripts.length; i++) {
@@ -102,6 +92,7 @@ public class DataSourceInitializer implements InitializingBean, DisposableBean {
}
}
}
initialized = false;
}
public void afterPropertiesSet() throws Exception {