Skip to content

Commit

Permalink
Change the name of the accessor method to match the database.
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Nov 14, 2009
1 parent 2abf8e2 commit 5273915
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Expand Up @@ -30,7 +30,7 @@ public class Channel {

private static final long serialVersionUID = -8183376200537307264L;

private String id;
private String channelId;

private int processingOrder;

Expand All @@ -48,7 +48,7 @@ public Channel() {
}

public Channel(String id, int processingOrder) {
this.id = id;
this.channelId = id;
this.processingOrder = processingOrder;
}

Expand All @@ -61,12 +61,12 @@ public Channel(String id, int processingOrder, int maxBatchSize, int maxBatchToS
this.extractPeriodMillis = extractPeriodMillis;
}

public String getId() {
return id;
public String getChannelId() {
return channelId;
}

public void setId(String id) {
this.id = id;
public void setChannelId(String id) {
this.channelId = id;
}

public int getProcessingOrder() {
Expand Down Expand Up @@ -110,7 +110,7 @@ public void setMaxBatchToSend(int maxBatchToSend) {
public boolean isInList(Collection<? extends NodeChannel> channels) {
if (channels != null) {
for (NodeChannel channel : channels) {
if (channel.getId().equals(id)) {
if (channel.getId().equals(channelId)) {
return true;
}
}
Expand Down
Expand Up @@ -36,11 +36,11 @@ public NodeChannel() {
public NodeChannel(String channelId) {
channel = new Channel();
nodeChannelControl = new NodeChannelControl();
channel.setId(channelId);
channel.setChannelId(channelId);
}

public String getId() {
return channel.getId();
return channel.getChannelId();
}

public int getMaxBatchSize() {
Expand Down Expand Up @@ -112,7 +112,7 @@ public void setProcessingOrder(int priority) {
}

public void setId(String id) {
channel.setId(id);
channel.setChannelId(id);
}

public void setSuspended(boolean suspended) {
Expand Down
Expand Up @@ -111,7 +111,7 @@ public List<OutgoingBatch> filterBatchesForChannels(Set<String> channels) {
public List<OutgoingBatch> getBatchesForChannel(Channel channel) {
List<OutgoingBatch> batchList = new ArrayList<OutgoingBatch>();
if (channel != null) {
batchList = getBatchesForChannel(channel.getId());
batchList = getBatchesForChannel(channel.getChannelId());
}
return batchList;
}
Expand Down
Expand Up @@ -79,8 +79,8 @@ public List<NodeGroupLink> getGroupLinksFor(String nodeGroupId) {
public void saveChannel(Channel channel, boolean reloadChannels) {
if (0 == jdbcTemplate.update(getSql("updateChannelSql"), new Object[] { channel.getProcessingOrder(),
channel.getMaxBatchSize(), channel.getMaxBatchToSend(), channel.isEnabled() ? 1 : 0,
channel.getBatchAlgorithm(), channel.getExtractPeriodMillis(), channel.getId() })) {
jdbcTemplate.update(getSql("insertChannelSql"), new Object[] { channel.getId(),
channel.getBatchAlgorithm(), channel.getExtractPeriodMillis(), channel.getChannelId() })) {
jdbcTemplate.update(getSql("insertChannelSql"), new Object[] { channel.getChannelId(),
channel.getProcessingOrder(), channel.getMaxBatchSize(), channel.getMaxBatchToSend(),
channel.isEnabled() ? 1 : 0, channel.getBatchAlgorithm(), channel.getExtractPeriodMillis() });
}
Expand Down Expand Up @@ -112,7 +112,7 @@ public void saveNodeChannelControl(NodeChannel nodeChannel, boolean reloadChanne
}

public void deleteChannel(Channel channel) {
jdbcTemplate.update(getSql("deleteChannelSql"), new Object[] { channel.getId() });
jdbcTemplate.update(getSql("deleteChannelSql"), new Object[] { channel.getChannelId() });
}

public NodeChannel getNodeChannel(String channelId) {
Expand Down Expand Up @@ -242,10 +242,10 @@ protected void autoConfigChannels() {
List<NodeChannel> channels = getNodeChannels();
for (Channel defaultChannel : defaultChannels) {
if (!defaultChannel.isInList(channels)) {
log.info("ChannelAutoConfiguring", defaultChannel.getId());
log.info("ChannelAutoConfiguring", defaultChannel.getChannelId());
saveChannel(defaultChannel, true);
} else {
log.info("ChannelExists", defaultChannel.getId());
log.info("ChannelExists", defaultChannel.getChannelId());
}
}
reloadChannels();
Expand Down

0 comments on commit 5273915

Please sign in to comment.