Skip to content

Commit

Permalink
just hit "format code" so it's to see changes checked in
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Apr 1, 2008
1 parent 2201bb4 commit 9d9162c
Showing 1 changed file with 9 additions and 9 deletions.
Expand Up @@ -53,13 +53,13 @@ public class IncomingBatchService extends AbstractService implements IIncomingBa
private String insertIncomingBatchHistorySql;

private boolean skipDuplicateBatches = true;

private IDbDialect dbDialect;

public IncomingBatch findIncomingBatch(String batchId, String nodeId) {
try {
return (IncomingBatch) jdbcTemplate.queryForObject(findIncomingBatchSql,
new Object[] { batchId, nodeId }, new IncomingBatchMapper());
return (IncomingBatch) jdbcTemplate.queryForObject(findIncomingBatchSql, new Object[] { batchId,
nodeId }, new IncomingBatchMapper());
} catch (EmptyResultDataAccessException e) {
return null;
}
Expand All @@ -68,13 +68,13 @@ public IncomingBatch findIncomingBatch(String batchId, String nodeId) {
@SuppressWarnings("unchecked")
public List<IncomingBatch> findIncomingBatchErrors(int maxRows) {
return (List<IncomingBatch>) jdbcTemplate.query(new MaxRowsStatementCreator(
findIncomingBatchErrorsSql, maxRows), new IncomingBatchMapper());
findIncomingBatchErrorsSql, maxRows), new IncomingBatchMapper());
}

@SuppressWarnings("unchecked")
public List<IncomingBatchHistory> findIncomingBatchHistory(String batchId, String nodeId) {
return (List<IncomingBatchHistory>) jdbcTemplate.query(findIncomingBatchHistorySql, new Object[] { batchId,
nodeId }, new IncomingBatchHistoryMapper());
return (List<IncomingBatchHistory>) jdbcTemplate.query(findIncomingBatchHistorySql, new Object[] {
batchId, nodeId }, new IncomingBatchHistoryMapper());
}

public boolean acquireIncomingBatch(final IncomingBatch status) {
Expand All @@ -86,14 +86,14 @@ public boolean acquireIncomingBatch(final IncomingBatch status) {
} catch (DataIntegrityViolationException e) {
dbDialect.rollbackToSavepoint(savepoint);
status.setRetry(true);
okayToProcess = updateIncomingBatch(status) > 0 || (! skipDuplicateBatches);
okayToProcess = updateIncomingBatch(status) > 0 || (!skipDuplicateBatches);
if (okayToProcess) {
logger.warn("Retrying batch " + status.getNodeBatchId());
} else {
logger.warn("Skipping batch " + status.getNodeBatchId());
}
}
return okayToProcess;
return okayToProcess;
}

public void insertIncomingBatch(IncomingBatch status) {
Expand Down

0 comments on commit 9d9162c

Please sign in to comment.