Skip to content

Commit

Permalink
Merge branch '3.7' of https://github.com/JumpMind/symmetric-ds.git in…
Browse files Browse the repository at this point in the history
…to 3.7
  • Loading branch information
mmichalek committed Feb 29, 2016
2 parents 30eb3f0 + 4163e06 commit e91544e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class IncomingBatch implements Serializable {
private static final long serialVersionUID = 1L;

public enum Status {
OK("Ok"), ER("Error"), LD("Loading"), IG("Ignored");
OK("Ok"), ER("Error"), LD("Loading"), IG("Ignored"), XX("Unknown");

private String description;

Expand Down Expand Up @@ -149,6 +149,14 @@ public void setStatus(Status status) {
this.status = status;
}

public void setStatus(String status) {
try {
this.status = Status.valueOf(status);
} catch (IllegalArgumentException e) {
this.status = Status.XX;
}
}

public String getNodeId() {
return nodeId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class OutgoingBatch implements Serializable {
private static final long serialVersionUID = 1L;

public enum Status {
OK("Ok"), ER("Error"), RQ("Request"), NE("New"), QY("Querying"), SE("Sending"), LD("Loading"), RT("Routing"), IG("Ignored"),;
OK("Ok"), ER("Error"), RQ("Request"), NE("New"), QY("Querying"), SE("Sending"), LD("Loading"), RT("Routing"), IG("Ignored"), XX("Unknown");

private String description;

Expand Down Expand Up @@ -243,7 +243,11 @@ public void setChannelId(String channelId) {
}

public void setStatus(String status) {
this.status = Status.valueOf(status);
try {
this.status = Status.valueOf(status);
} catch (IllegalArgumentException e) {
this.status = Status.XX;
}
}

public long getRouterMillis() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public IncomingBatch mapRow(Row rs) {
batch.setBatchId(rs.getLong("batch_id"));
batch.setNodeId(rs.getString("node_id"));
batch.setChannelId(rs.getString("channel_id"));
batch.setStatus(IncomingBatch.Status.valueOf(rs.getString("status")));
batch.setStatus(rs.getString("status"));
batch.setNetworkMillis(rs.getLong("network_millis"));
batch.setFilterMillis(rs.getLong("filter_millis"));
batch.setDatabaseMillis(rs.getLong("database_millis"));
Expand Down

0 comments on commit e91544e

Please sign in to comment.