@Test public void testGetRangeForId() { final byte[] sfcIndexPartitionKey = new byte[] {16}; final byte[] sfcIndexSortKey = new byte[] {-46, -93, -110, -31}; final MultiDimensionalNumericData sfcIndexRange = sfcIndexStrategy.getRangeForId(sfcIndexPartitionKey, sfcIndexSortKey); final MultiDimensionalNumericData range = compoundIndexStrategy.getRangeForId(sfcIndexPartitionKey, sfcIndexSortKey); Assert.assertEquals(sfcIndexRange.getDimensionCount(), 2); Assert.assertEquals(range.getDimensionCount(), 2); Assert.assertTrue( Double.compare( sfcIndexRange.getMinValuesPerDimension()[0], range.getMinValuesPerDimension()[0]) == 0); Assert.assertTrue( Double.compare( sfcIndexRange.getMinValuesPerDimension()[1], range.getMinValuesPerDimension()[1]) == 0); Assert.assertTrue( Double.compare( sfcIndexRange.getMaxValuesPerDimension()[0], range.getMaxValuesPerDimension()[0]) == 0); Assert.assertTrue( Double.compare( sfcIndexRange.getMaxValuesPerDimension()[1], range.getMaxValuesPerDimension()[1]) == 0); }
@Override public MultiDimensionalNumericData getRangeForId( final byte[] partitionKey, final byte[] sortKey) { return subStrategy2.getRangeForId(trimPartitionIdForSortStrategy(partitionKey), sortKey); }
CompoundIndexStrategy implements NumericIndexStrategy { @Override public MultiDimensionalNumericData getRangeForId( final byte[] partitionKey, final byte[] sortKey) { return subStrategy2.getRangeForId(trimPartitionIdForSortStrategy(partitionKey), sortKey); } }
CompoundIndexStrategy implements NumericIndexStrategy { @Override public MultiDimensionalNumericData getRangeForId( final byte[] partitionKey, final byte[] sortKey) { return subStrategy2.getRangeForId(trimPartitionIdForSortStrategy(partitionKey), sortKey); } CompoundIndexStrategy(
      final PartitionIndexStrategy<? extends MultiDimensionalNumericData, ? extends MultiDimensionalNumericData> subStrategy1,
      final NumericIndexStrategy subStrategy2); protected  CompoundIndexStrategy(); }
CompoundIndexStrategy implements NumericIndexStrategy { @Override public MultiDimensionalNumericData getRangeForId( final byte[] partitionKey, final byte[] sortKey) { return subStrategy2.getRangeForId(trimPartitionIdForSortStrategy(partitionKey), sortKey); } CompoundIndexStrategy(
      final PartitionIndexStrategy<? extends MultiDimensionalNumericData, ? extends MultiDimensionalNumericData> subStrategy1,
      final NumericIndexStrategy subStrategy2); protected  CompoundIndexStrategy(); PartitionIndexStrategy<MultiDimensionalNumericData, MultiDimensionalNumericData> getPrimarySubStrategy(); NumericIndexStrategy getSecondarySubStrategy(); @Override byte[] toBinary(); @Override void fromBinary(final byte[] bytes); int getNumberOfDimensions(); @Override QueryRanges getQueryRanges(
      final MultiDimensionalNumericData indexedRange,
      final IndexMetaData... hints); @Override QueryRanges getQueryRanges(
      final MultiDimensionalNumericData indexedRange,
      final int maxEstimatedRangeDecomposition,
      final IndexMetaData... hints); @Override InsertionIds getInsertionIds(final MultiDimensionalNumericData indexedData); @Override InsertionIds getInsertionIds(
      final MultiDimensionalNumericData indexedData,
      final int maxEstimatedDuplicateIds); @Override MultiDimensionalNumericData getRangeForId(
      final byte[] partitionKey,
      final byte[] sortKey); @Override MultiDimensionalCoordinates getCoordinatesPerDimension(
      final byte[] partitionKey,
      final byte[] sortKey); @Override NumericDimensionDefinition[] getOrderedDimensionDefinitions(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String getId(); @Override double[] getHighestPrecisionIdRangePerDimension(); @Override int getPartitionKeyLength(); @Override List<IndexMetaData> createMetaData(); @Override MultiDimensionalCoordinateRanges[] getCoordinateRangesPerDimension(
      final MultiDimensionalNumericData dataRange,
      final IndexMetaData... hints); @Override byte[][] getInsertionPartitionKeys(final MultiDimensionalNumericData insertionData); @Override byte[][] getQueryPartitionKeys(
      final MultiDimensionalNumericData queryData,
      final IndexMetaData... hints); @Override byte[][] getPredefinedSplits(); }
CompoundIndexStrategy implements NumericIndexStrategy { @Override public MultiDimensionalNumericData getRangeForId( final byte[] partitionKey, final byte[] sortKey) { return subStrategy2.getRangeForId(trimPartitionIdForSortStrategy(partitionKey), sortKey); } CompoundIndexStrategy(
      final PartitionIndexStrategy<? extends MultiDimensionalNumericData, ? extends MultiDimensionalNumericData> subStrategy1,
      final NumericIndexStrategy subStrategy2); protected  CompoundIndexStrategy(); PartitionIndexStrategy<MultiDimensionalNumericData, MultiDimensionalNumericData> getPrimarySubStrategy(); NumericIndexStrategy getSecondarySubStrategy(); @Override byte[] toBinary(); @Override void fromBinary(final byte[] bytes); int getNumberOfDimensions(); @Override QueryRanges getQueryRanges(
      final MultiDimensionalNumericData indexedRange,
      final IndexMetaData... hints); @Override QueryRanges getQueryRanges(
      final MultiDimensionalNumericData indexedRange,
      final int maxEstimatedRangeDecomposition,
      final IndexMetaData... hints); @Override InsertionIds getInsertionIds(final MultiDimensionalNumericData indexedData); @Override InsertionIds getInsertionIds(
      final MultiDimensionalNumericData indexedData,
      final int maxEstimatedDuplicateIds); @Override MultiDimensionalNumericData getRangeForId(
      final byte[] partitionKey,
      final byte[] sortKey); @Override MultiDimensionalCoordinates getCoordinatesPerDimension(
      final byte[] partitionKey,
      final byte[] sortKey); @Override NumericDimensionDefinition[] getOrderedDimensionDefinitions(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String getId(); @Override double[] getHighestPrecisionIdRangePerDimension(); @Override int getPartitionKeyLength(); @Override List<IndexMetaData> createMetaData(); @Override MultiDimensionalCoordinateRanges[] getCoordinateRangesPerDimension(
      final MultiDimensionalNumericData dataRange,
      final IndexMetaData... hints); @Override byte[][] getInsertionPartitionKeys(final MultiDimensionalNumericData insertionData); @Override byte[][] getQueryPartitionKeys(
      final MultiDimensionalNumericData queryData,
      final IndexMetaData... hints); @Override byte[][] getPredefinedSplits();  }