Skip to content

Commit

Permalink
SYMMETRICDS-570
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Jan 3, 2012
1 parent 3c3666a commit 0613cb8
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -622,10 +622,15 @@ public long findMaxDataEventDataId() {
return jdbcTemplate.queryForLong(getSql("selectMaxDataEventDataIdSql"));
}

public void insertDataGap(DataGap gap) {
jdbcTemplate.update(getSql("insertDataGapSql"), new Object[] { DataGap.Status.GP.name(),
AppUtils.getHostName(), gap.getStartId(), gap.getEndId() }, new int[] {
public void insertDataGap(DataGap gap) {
try {
jdbcTemplate.update(getSql("insertDataGapSql"), new Object[] { DataGap.Status.GP.name(),
AppUtils.getHostName(), gap.getStartId(), gap.getEndId() }, new int[] {
Types.VARCHAR, Types.VARCHAR, Types.NUMERIC, Types.NUMERIC });
} catch (DataIntegrityViolationException ex) {
log.warn("GapAlreadyExisted", gap.getStartId(), gap.getEndId());
updateDataGap(gap, DataGap.Status.GP);
}
}

public void updateDataGap(DataGap gap, DataGap.Status status) {
Expand Down

0 comments on commit 0613cb8

Please sign in to comment.