Examples of ClusteredKey


Examples of info.archinnov.achilles.test.integration.entity.ClusteredEntityWithCounter.ClusteredKey

  @Test
  public void should_persist_and_find() throws Exception {
    long counterValue = RandomUtils.nextLong(0,Long.MAX_VALUE);
    long versionValue = RandomUtils.nextLong(0,Long.MAX_VALUE);
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), "name");

    entity = new ClusteredEntityWithCounter(compoundKey, incr(counterValue), incr(versionValue));

    manager.insert(entity);
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ClusteredEntityWithCounter.ClusteredKey

  }

  @Test
  public void should_persist_and_get_proxy() throws Exception {
    long counterValue = RandomUtils.nextLong(0,Long.MAX_VALUE);
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), "name");
    entity = new ClusteredEntityWithCounter(compoundKey, incr(counterValue));

    manager.insert(entity);

    ClusteredEntityWithCounter found = manager.getProxy(ClusteredEntityWithCounter.class, compoundKey);
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ClusteredEntityWithCounter.ClusteredKey

  @Test
  public void should_update_modifications() throws Exception {
    long initialValue = RandomUtils.nextLong(0,Long.MAX_VALUE);
    long increment = RandomUtils.nextLong(0,Long.MAX_VALUE);

    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), "name");

    entity = new ClusteredEntityWithCounter(compoundKey, incr(initialValue),incr(initialValue));

    entity = manager.insert(entity);
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ClusteredEntityWithCounter.ClusteredKey

  }

  @Test
  public void should_delete() throws Exception {
    long counterValue = RandomUtils.nextLong(0,Long.MAX_VALUE);
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), "name");

    entity = new ClusteredEntityWithCounter(compoundKey, incr(counterValue));

    entity = manager.insert(entity);
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ClusteredEntityWithCounter.ClusteredKey

    long counterValue = RandomUtils.nextLong(0,Long.MAX_VALUE);
    long incr = RandomUtils.nextLong(0,Long.MAX_VALUE);

    long partitionKey = RandomUtils.nextLong(0,Long.MAX_VALUE);
    String name = "name";
    compoundKey = new ClusteredKey(partitionKey, name);

    entity = new ClusteredEntityWithCounter(compoundKey, incr(counterValue));

    entity = manager.insert(entity);
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ClusteredEntityWithCounter.ClusteredKey

    assertThat(entities.get(1).getCounter().get()).isEqualTo(3L);
        assertThat(entities.get(1).getVersion().get()).isEqualTo(3L);
  }

  private void insertClusteredEntity(Long partitionKey, String name, Long counterValue) {
    ClusteredKey embeddedId = new ClusteredKey(partitionKey, name);
    ClusteredEntityWithCounter entity = new ClusteredEntityWithCounter(embeddedId,
        incr(counterValue),incr(counterValue));
    manager.insert(entity);
  }
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ClusteredEntityWithEnumCompoundKey.ClusteredKey

  private ClusteredKey compoundKey;

  @Test
  public void should_persist_and_get_reference() throws Exception {
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), Type.AUDIO);

    entity = new ClusteredEntityWithEnumCompoundKey(compoundKey, "clustered_value");

    manager.insert(entity);
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ClusteredEntityWithEnumCompoundKey.ClusteredKey

    assertThat(found.getValue()).isEqualTo("clustered_value");
  }

  @Test
  public void should_persist_and_find() throws Exception {
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), Type.AUDIO);

    entity = new ClusteredEntityWithEnumCompoundKey(compoundKey, "clustered_value");

    manager.insert(entity);
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ClusteredEntityWithEnumCompoundKey.ClusteredKey

  }

  @Test
  public void should_update_modifications() throws Exception {

    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), Type.FILE);

    entity = new ClusteredEntityWithEnumCompoundKey(compoundKey, "clustered_value");

    entity = manager.insert(entity);
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ClusteredEntityWithEnumCompoundKey.ClusteredKey

    assertThat(entity.getValue()).isEqualTo("new_clustered_value");
  }

  @Test
  public void should_delete() throws Exception {
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), Type.IMAGE);

    entity = new ClusteredEntityWithEnumCompoundKey(compoundKey, "clustered_value");

    entity = manager.insert(entity);
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.