- rename hazelcast.common

This commit is contained in:
Zellweger Christof Ralf
2015-06-22 11:58:41 +02:00
parent d41e1a03bf
commit 4f6ceccd68
5 changed files with 32 additions and 27 deletions
@@ -9,8 +9,8 @@ import org.springframework.util.Assert;
import ch.psi.daq.cassandra.reader.Ordering;
import ch.psi.daq.hazelcast.common.query.Aggregation;
import ch.psi.daq.hazelcast.common.query.AggregationType;
import ch.psi.daq.hazelcast.common.query.Query;
import ch.psi.daq.hazelcast.common.query.ValueAggregation;
import ch.psi.daq.hazelcast.common.query.bin.BinIntervalCalculator;
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -41,7 +41,7 @@ public abstract class AbstractQuery implements Query {
private List<Aggregation> aggregations;
private ValueAggregation valueAggregation;
private AggregationType aggregationType;
private boolean aggregateChannels;
@@ -62,12 +62,12 @@ public abstract class AbstractQuery implements Query {
@JsonProperty(value = "channels") List<String> channelIds,
@JsonProperty(value = "fields") LinkedHashSet<String> fields,
@JsonProperty(value = "aggregateChannels") boolean aggregateChannels,
@JsonProperty(value = "aggregationType") ValueAggregation valueAggregation,
@JsonProperty(value = "aggregationType") AggregationType aggregationType,
@JsonProperty(value = "aggregations") List<Aggregation> aggregations) {
this.ordering = ordering;
this.aggregateChannels = aggregateChannels;
this.valueAggregation = valueAggregation;
this.aggregationType = aggregationType;
if (channelIds == null || fields == null) {
throw new IllegalArgumentException("sourceIds and/or fields cannot be null.");
@@ -100,21 +100,13 @@ public abstract class AbstractQuery implements Query {
* {@inheritDoc}
*/
@Override
public ValueAggregation getValueAggregation() {
return valueAggregation;
}
/**
* {@inheritDoc}
*/
@Override
public boolean aggregateChannels() {
return isAggregateChannels();
public AggregationType getAggregationType() {
return aggregationType;
}
@Override
public BinIntervalCalculator getBinIntervalCalculator() {
// TODO Auto-generated method stub
// TODO
return null;
}
@@ -7,7 +7,8 @@ import org.apache.commons.lang.builder.ToStringBuilder;
import ch.psi.daq.cassandra.reader.Ordering;
import ch.psi.daq.hazelcast.common.query.Aggregation;
import ch.psi.daq.hazelcast.common.query.ValueAggregation;
import ch.psi.daq.hazelcast.common.query.AggregationType;
import ch.psi.daq.hazelcast.common.query.range.QueryRange;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -28,13 +29,13 @@ public class PulseRangeQuery extends AbstractQuery {
@JsonProperty(value = "channels") List<String> channels,
@JsonProperty(value = "fields") LinkedHashSet<String> fields,
@JsonProperty(value = "aggregateChannels") boolean aggregateChannels,
@JsonProperty(value = "aggregationType") ValueAggregation valueAggregation,
@JsonProperty(value = "aggregationType") AggregationType aggregationType,
@JsonProperty(value = "aggregations") List<Aggregation> aggregations,
@JsonProperty(value = "startPulseId") long startPulseId,
@JsonProperty(value = "endPulseId") long endPulseId)
{
super(ordering, channels, fields, aggregateChannels, valueAggregation, aggregations);
super(ordering, channels, fields, aggregateChannels, aggregationType, aggregations);
this.startPulseId = startPulseId;
this.endPulseId = endPulseId;
@@ -64,4 +65,10 @@ public class PulseRangeQuery extends AbstractQuery {
return ToStringBuilder.reflectionToString(this);
}
@Override
public QueryRange getQueryRange() {
// TODO Auto-generated method stub
return null;
}
}
@@ -14,7 +14,8 @@ import org.slf4j.LoggerFactory;
import ch.psi.daq.cassandra.reader.Ordering;
import ch.psi.daq.hazelcast.common.query.Aggregation;
import ch.psi.daq.hazelcast.common.query.ValueAggregation;
import ch.psi.daq.hazelcast.common.query.AggregationType;
import ch.psi.daq.hazelcast.common.query.range.QueryRange;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -56,7 +57,7 @@ public class TimeRangeQuery extends AbstractQuery {
@JsonProperty(value = "channels") List<String> channels,
@JsonProperty(value = "fields") LinkedHashSet<String> fields,
@JsonProperty(value = "aggregateChannels") boolean aggregateChannels,
@JsonProperty(value = "aggregationType") ValueAggregation valueAggregation,
@JsonProperty(value = "aggregationType") AggregationType aggregationType,
@JsonProperty(value = "aggregations") List<Aggregation> aggregations,
@JsonProperty(value = "start") long startMillis,
@JsonProperty(value = "startNanoOffset") long startNanoOffset,
@@ -65,7 +66,7 @@ public class TimeRangeQuery extends AbstractQuery {
@JsonProperty(value = "endNanoOffset") long endNanoOffset,
@JsonProperty(value = "endDateTime") String endDateTime) {
super(ordering, channels, fields, aggregateChannels, valueAggregation, aggregations);
super(ordering, channels, fields, aggregateChannels, aggregationType, aggregations);
this.start = startMillis;
this.startNanoOffset = startNanoOffset;
@@ -129,5 +130,11 @@ public class TimeRangeQuery extends AbstractQuery {
return ToStringBuilder.reflectionToString(this);
}
@Override
public QueryRange getQueryRange() {
// TODO Auto-generated method stub
return null;
}
}