Package info.archinnov.achilles.test.integration.entity.ClusteredEntity

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


        ClusteredEntity actual = manager.typedQuery(ClusteredEntity.class, statement).getFirst();

        assertThat(actual).isNotNull();
        assertThat(actual).isInstanceOf(Factory.class);

        ClusteredKey clusteredKey = actual.getId();

        assertThat(clusteredKey).isNotNull();
        assertThat(clusteredKey.getId()).isEqualTo(id);
        assertThat(clusteredKey.getCount()).isEqualTo(10);
        assertThat(clusteredKey.getName()).isEqualTo("name");
    }
View Full Code Here


        RegularStatement statement = select("id","count","name","value").from(TABLE_NAME).limit(3);
        ClusteredEntity actual = manager.rawTypedQuery(ClusteredEntity.class, statement).getFirst();

        assertThat(actual).isNotNull();

        ClusteredKey clusteredKey = actual.getId();

        assertThat(clusteredKey).isNotNull();
        assertThat(clusteredKey.getId()).isEqualTo(id);
        assertThat(clusteredKey.getCount()).isEqualTo(10);
        assertThat(clusteredKey.getName()).isEqualTo("name");
    }
View Full Code Here

  private ClusteredKey compoundKey;

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

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

    manager.insert(entity);
View Full Code Here

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

  @Test
  public void should_persist_with_ttl() throws Exception {
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), RandomUtils.nextInt(0,Integer.MAX_VALUE), "name");

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

    manager.insert(entity, OptionsBuilder.withTtl(1));
View Full Code Here

    assertThat(manager.find(ClusteredEntity.class, compoundKey)).isNull();
  }

  @Test
  public void should_persist_and_get_proxy() throws Exception {
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), RandomUtils.nextInt(0,Integer.MAX_VALUE), "name");

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

    manager.insert(entity);
View Full Code Here

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

  @Test
  public void should_update_with_ttl() throws Exception {
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), RandomUtils.nextInt(0,Integer.MAX_VALUE), "name");
    entity = new ClusteredEntity(compoundKey, "clustered_value");
    entity = manager.insert(entity, OptionsBuilder.withTtl(1));

    assertThat(manager.find(ClusteredEntity.class, compoundKey)).isNotNull();
View Full Code Here

    assertThat(manager.find(ClusteredEntity.class, compoundKey)).isNull();
  }

  @Test
  public void should_update_modifications() throws Exception {
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), RandomUtils.nextInt(0,Integer.MAX_VALUE), "name");

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

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

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

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

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

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

  }

  @Test
  public void should_delete_by_id() throws Exception {
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), RandomUtils.nextInt(0,Integer.MAX_VALUE), "name");

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

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

  public void should_refresh() throws Exception {

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

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

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

TOP

Related Classes of info.archinnov.achilles.test.integration.entity.ClusteredEntity.ClusteredKey

Copyright © 2018 www.massapicom. 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.