IN PROGRESS - BATCH-709: Change all collections to use generics

This commit is contained in:
robokaso
2008-07-15 09:28:27 +00:00
parent 0e74543186
commit cf67c728d2
4 changed files with 7 additions and 3 deletions

View File

@@ -29,6 +29,7 @@ import org.springframework.util.Assert;
*/
public class ColumnMapItemPreparedStatementSetter implements ItemPreparedStatementSetter {
@SuppressWarnings("unchecked")
public void setValues(Object item, PreparedStatement ps) throws SQLException {
Assert.isInstanceOf(Map.class, item, "Input to map PreparedStatement parameters must be of type Map.");
Set keySet = ((Map)item).entrySet();

View File

@@ -45,7 +45,8 @@ public class IbatisKeyCollector extends ExecutionContextUserSupport implements K
*
* @see KeyCollector#retrieveKeys()
*/
public List retrieveKeys(ExecutionContext executionContext) {
@SuppressWarnings("unchecked")
public List<Object> retrieveKeys(ExecutionContext executionContext) {
if (executionContext.containsKey(getKey(RESTART_KEY))) {
Object key = executionContext.get(getKey(RESTART_KEY));
return sqlMapClientTemplate.queryForList(restartQueryId, key);

View File

@@ -88,7 +88,8 @@ public class MultipleColumnJdbcKeyCollector extends ExecutionContextUserSupport
* org.springframework.batch.io.sql.scratch.AbstractDrivingQueryItemReader
* #retrieveKeys()
*/
public List retrieveKeys(ExecutionContext executionContext) {
@SuppressWarnings("unchecked")
public List<Object> retrieveKeys(ExecutionContext executionContext) {
Assert.state(keyMapper != null, "KeyMapper must not be null.");
Assert.state(StringUtils.hasText(restartSql), "The RestartQuery must not be null or empty"

View File

@@ -85,7 +85,8 @@ public class SingleColumnJdbcKeyCollector extends ExecutionContextUserSupport im
*
* @see org.springframework.batch.io.driving.KeyGenerationStrategy#retrieveKeys()
*/
public List retrieveKeys(ExecutionContext executionContext) {
@SuppressWarnings("unchecked")
public List<Object> retrieveKeys(ExecutionContext executionContext) {
Assert.notNull(executionContext, "The ExecutionContext must not be null");