Exemplo n.º 1
0
 @Override
 public int hashCode() {
   int result = super.hashCode();
   result = 31 * result + bound.hashCode();
   result = 31 * result + (dimFilter != null ? dimFilter.hashCode() : 0);
   return result;
 }
Exemplo n.º 2
0
 public byte[] getCacheKey() {
   final byte[] filterBytes = dimFilter == null ? new byte[] {} : dimFilter.getCacheKey();
   final byte[] boundBytes = StringUtils.toUtf8(bound);
   final byte delimiter = (byte) 0xff;
   return ByteBuffer.allocate(2 + boundBytes.length + filterBytes.length)
       .put(CACHE_TYPE_ID)
       .put(boundBytes)
       .put(delimiter)
       .put(filterBytes)
       .array();
 }
Exemplo n.º 3
0
 @Override
 public int hashCode() {
   int result = super.hashCode();
   result = 31 * result + (limitSpec != null ? limitSpec.hashCode() : 0);
   result = 31 * result + (havingSpec != null ? havingSpec.hashCode() : 0);
   result = 31 * result + (dimFilter != null ? dimFilter.hashCode() : 0);
   result = 31 * result + (granularity != null ? granularity.hashCode() : 0);
   result = 31 * result + (dimensions != null ? dimensions.hashCode() : 0);
   result = 31 * result + (aggregatorSpecs != null ? aggregatorSpecs.hashCode() : 0);
   result = 31 * result + (postAggregatorSpecs != null ? postAggregatorSpecs.hashCode() : 0);
   result = 31 * result + (limitFn != null ? limitFn.hashCode() : 0);
   return result;
 }
Exemplo n.º 4
0
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    if (!super.equals(o)) {
      return false;
    }

    GroupByQuery that = (GroupByQuery) o;

    if (aggregatorSpecs != null
        ? !aggregatorSpecs.equals(that.aggregatorSpecs)
        : that.aggregatorSpecs != null) {
      return false;
    }
    if (dimFilter != null ? !dimFilter.equals(that.dimFilter) : that.dimFilter != null) {
      return false;
    }
    if (dimensions != null ? !dimensions.equals(that.dimensions) : that.dimensions != null) {
      return false;
    }
    if (granularity != null ? !granularity.equals(that.granularity) : that.granularity != null) {
      return false;
    }
    if (havingSpec != null ? !havingSpec.equals(that.havingSpec) : that.havingSpec != null) {
      return false;
    }
    if (limitSpec != null ? !limitSpec.equals(that.limitSpec) : that.limitSpec != null) {
      return false;
    }
    if (limitFn != null ? !limitFn.equals(that.limitFn) : that.limitFn != null) {
      return false;
    }
    if (postAggregatorSpecs != null
        ? !postAggregatorSpecs.equals(that.postAggregatorSpecs)
        : that.postAggregatorSpecs != null) {
      return false;
    }

    return true;
  }
Exemplo n.º 5
0
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    if (!super.equals(o)) {
      return false;
    }

    TimeBoundaryQuery that = (TimeBoundaryQuery) o;

    if (!bound.equals(that.bound)) {
      return false;
    }

    if (dimFilter != null ? !dimFilter.equals(that.dimFilter) : that.dimFilter != null) {
      return false;
    }

    return true;
  }