Skip to content

Commit

Permalink
SYMMETRICDS-577
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Jan 31, 2012
1 parent 56708da commit 2de021f
Showing 1 changed file with 4 additions and 6 deletions.
Expand Up @@ -31,11 +31,9 @@
import java.util.Iterator;
import java.util.List;
import java.util.Set;

import org.jumpmind.symmetric.model.OutgoingBatch.Status;

/**
*
* A container for {@link OutgoingBatch}s.
*/
public class OutgoingBatches implements Serializable {

Expand Down Expand Up @@ -99,7 +97,7 @@ public int countBatches(boolean includeOnlyErrors) {
int count = 0;
if (batches != null) {
for (OutgoingBatch batch : batches) {
if (includeOnlyErrors && batch.getStatus() == OutgoingBatch.Status.ER) {
if (includeOnlyErrors && batch.isErrorFlag()) {
count++;
} else {
count++;
Expand Down Expand Up @@ -141,7 +139,7 @@ public boolean containsLoadBatches() {

public boolean containsBatchesInError() {
for (OutgoingBatch b : batches) {
if (b.getStatus() == Status.ER) {
if (b.isErrorFlag()) {
return true;
}
}
Expand Down Expand Up @@ -243,7 +241,7 @@ public void sortChannels(List<NodeChannel> channels) {

final HashMap<String, Date> errorChannels = new HashMap<String, Date>();
for (OutgoingBatch batch : batches) {
if (batch.getStatus().equals(OutgoingBatch.Status.ER)) {
if (batch.isErrorFlag()) {
errorChannels.put(batch.getChannelId(), batch.getLastUpdatedTime());
}
}
Expand Down

0 comments on commit 2de021f

Please sign in to comment.