Examples of CIndex


Examples of com.pardot.rhombus.cobject.CIndex

    SortedMap<String, Object> indexValues = new TreeMap<String, Object>();
    indexValues.put("type", "typeValue");
    indexValues.put("foreignid", 13);
    indexValues.put("instance", 11);

    CIndex matchingIndex = definition.getMostSelectiveMatchingIndex(indexValues);
    String expectedIndexKey = Joiner.on(":").join(indexValues.keySet());
    assertEquals(expectedIndexKey, matchingIndex.getKey());
  }
View Full Code Here

Examples of com.pardot.rhombus.cobject.CIndex

    CDefinition definition = CDefinition.fromJsonString(json);
    SortedMap<String, Object> indexValues = new TreeMap<String, Object>();
    indexValues.put("type", "typeValue");
    indexValues.put("instance", 11);

    CIndex matchingIndex = definition.getMostSelectiveMatchingIndex(indexValues);
    String expectedIndexKey = Joiner.on(":").join(indexValues.keySet());
    assertEquals(expectedIndexKey, matchingIndex.getKey());
  }
View Full Code Here

Examples of com.pardot.rhombus.cobject.CIndex

    String json = TestHelpers.readFileToString(this.getClass(), "CObjectCQLGeneratorTestData.js");
    CDefinition definition = CDefinition.fromJsonString(json);
    SortedMap<String, Object> indexValues = new TreeMap<String, Object>();
    indexValues.put("foreignid", 13);

    CIndex matchingIndex = definition.getMostSelectiveMatchingIndex(indexValues);
    String expectedIndexKey = Joiner.on(":").join(indexValues.keySet());
    assertEquals(expectedIndexKey, matchingIndex.getKey());
  }
View Full Code Here

Examples of com.pardot.rhombus.cobject.CIndex

* Date: 4/5/13
*/
public class CIndexTest extends TestCase{

  public void testEquals() {
    CIndex index1 = new CIndex("field1:field2:field3", new ShardingStrategyDaily());
    CIndex index2 = new CIndex("field1:field2:field3", new ShardingStrategyDaily());
    assertTrue(index1.equals(index2));
  }
View Full Code Here

Examples of com.pardot.rhombus.cobject.CIndex

    CIndex index2 = new CIndex("field1:field2:field3", new ShardingStrategyDaily());
    assertTrue(index1.equals(index2));
  }

  public void testNotEqualsKey() {
    CIndex index1 = new CIndex("field1:field2:field3", new ShardingStrategyDaily());
    CIndex index2 = new CIndex("field1:field2:field4", new ShardingStrategyDaily());
    assertFalse(index1.equals(index2));
  }
View Full Code Here

Examples of com.pardot.rhombus.cobject.CIndex

    CIndex index2 = new CIndex("field1:field2:field4", new ShardingStrategyDaily());
    assertFalse(index1.equals(index2));
  }

  public void testNotEqualsShardingStrategy() {
    CIndex index1 = new CIndex("field1:field2:field3", new ShardingStrategyDaily());
    CIndex index2 = new CIndex("field1:field2:field3", new ShardingStrategyMonthly());
    assertFalse(index1.equals(index2));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.