Skip to content

Commit

Permalink
complete_time and sent_timestamp -> event_time in outgoing_batch_hist
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Oct 1, 2007
1 parent 8533383 commit 400822b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ public enum Status

private long failedDataId;

private Date sent;

private Date complete;
private Date eventTime;

public OutgoingBatchHistory()
{
Expand All @@ -39,14 +37,14 @@ public void setBatchId(int batchId)
this.batchId = batchId;
}

public Date getComplete()
public Date getEventTime()
{
return complete;
return eventTime;
}

public void setComplete(Date complete)
public void setEventTime(Date complete)
{
this.complete = complete;
this.eventTime = complete;
}

public long getDataEventCount()
Expand All @@ -69,16 +67,6 @@ public void setFailedDataId(long failedDataId)
this.failedDataId = failedDataId;
}

public Date getSent()
{
return sent;
}

public void setSent(Date sent)
{
this.sent = sent;
}

public Status getStatus()
{
return status;
Expand Down
3 changes: 1 addition & 2 deletions symmetric/src/main/resources/ddl-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
<column name="batch_id" type="INTEGER" required="true" />
<column name="status" type="CHAR" size="2" />
<column name="data_event_count" type="INTEGER" />
<column name="sent_timestamp" type="TIMESTAMP" />
<column name="complete_time" type="TIMESTAMP" />
<column name="event_time" type="TIMESTAMP" />
<column name="failed_data_id" type="INTEGER" />
</table>

Expand Down
6 changes: 3 additions & 3 deletions symmetric/src/main/resources/symmetric-services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -433,19 +433,19 @@
<property name="errorSql">
<value>
insert into ${sync.table.prefix}_outgoing_batch_hist (batch_id, status,
complete_time, failed_data_id) values (?, 'ER', current_timestamp, ?)
event_time, failed_data_id) values (?, 'ER', current_timestamp, ?)
</value>
</property>
<property name="okSql">
<value>
insert into ${sync.table.prefix}_outgoing_batch_hist (batch_id, status,
complete_time) values (?, 'OK', current_timestamp)
event_time) values (?, 'OK', current_timestamp)
</value>
</property>
<property name="sentSql">
<value>
insert into ${sync.table.prefix}_outgoing_batch_hist (batch_id, status,
sent_timestamp) values (?, 'SE', current_timestamp)
event_time) values (?, 'SE', current_timestamp)
</value>
</property>
</bean>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ protected void errorTestCore(int batchId, int errorLine,

@SuppressWarnings("unchecked")
protected List<OutgoingBatchHistory> getOutgoingBatchHistory(int batchId) {
final String sql = "select batch_id, status, data_event_count, sent_timestamp, "
+ "complete_time, failed_data_id from " + TestConstants.TEST_PREFIX + "outgoing_batch_hist where batch_id = ?";
final String sql = "select batch_id, status, data_event_count, event_time, "
+ "failed_data_id from " + TestConstants.TEST_PREFIX + "outgoing_batch_hist where batch_id = ?";
final List<OutgoingBatchHistory> list = new ArrayList<OutgoingBatchHistory>();
getJdbcTemplate().query(sql, new Object[] { batchId }, new RowMapper() {
public Object[] mapRow(ResultSet rs, int row) throws SQLException {
Expand All @@ -109,9 +109,8 @@ public Object[] mapRow(ResultSet rs, int row) throws SQLException {
item.setStatus(OutgoingBatchHistory.Status.valueOf(rs
.getString(2)));
item.setDataEventCount(rs.getLong(3));
item.setSent(rs.getTimestamp(4));
item.setComplete(rs.getTimestamp(4));
item.setFailedDataId(rs.getLong(6));
item.setEventTime(rs.getTimestamp(4));
item.setFailedDataId(rs.getLong(5));
list.add(item);
return null;
}
Expand Down

0 comments on commit 400822b

Please sign in to comment.