Examples of ValuelessClusteredEntity


Examples of info.archinnov.achilles.test.integration.entity.ValuelessClusteredEntity

  @Test
  public void should_persist_and_find() throws Exception {
    Long id = RandomUtils.nextLong(0,Long.MAX_VALUE);
    String name = "name";
    CompoundKey compoundKey = new CompoundKey(id, name);
    ValuelessClusteredEntity entity = new ValuelessClusteredEntity(compoundKey);

    manager.insert(entity);

    ValuelessClusteredEntity found = manager.find(ValuelessClusteredEntity.class, compoundKey);

    assertThat(found).isNotNull();
  }
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ValuelessClusteredEntity

  @Test
  public void should_persist_and_get_proxy() throws Exception {
    Long id = RandomUtils.nextLong(0,Long.MAX_VALUE);
    String name = "name";
    CompoundKey compoundKey = new CompoundKey(id, name);
    ValuelessClusteredEntity entity = new ValuelessClusteredEntity(compoundKey);

    manager.insert(entity);

    ValuelessClusteredEntity found = manager.getProxy(ValuelessClusteredEntity.class, compoundKey);

    assertThat(found).isNotNull();
  }
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ValuelessClusteredEntity

  @Test
  public void should_persist_with_ttl() throws Exception {
    Long id = RandomUtils.nextLong(0,Long.MAX_VALUE);
    String name = "name";
    CompoundKey compoundKey = new CompoundKey(id, name);
    ValuelessClusteredEntity entity = new ValuelessClusteredEntity(compoundKey);

    manager.insert(entity, OptionsBuilder.withTtl(1));

    Thread.sleep(1000);
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ValuelessClusteredEntity

    String name2 = "name2";
    String name3 = "name3";
    String name4 = "name4";
    String name5 = "name5";

    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name1)));
    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name2)));
    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name3)));
    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name4)));
    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name5)));

    List<ValuelessClusteredEntity> result = manager.sliceQuery(ValuelessClusteredEntity.class)
                .forSelect()
                .withPartitionComponents(id)
        .fromClusterings(name2)
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ValuelessClusteredEntity

    String name2 = "name2";
    String name3 = "name3";
    String name4 = "name4";
    String name5 = "name5";

    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name1)));
    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name2)));
    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name3)));
    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name4)));
    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name5)));

    Iterator<ValuelessClusteredEntity> iterator = manager.sliceQuery(ValuelessClusteredEntity.class)
                .forIteration()
        .withPartitionComponents(id)
                .fromClusterings(name2)
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ValuelessClusteredEntity

    Long id = RandomUtils.nextLong(0,Long.MAX_VALUE);
    String name1 = "name1";
    String name2 = "name2";
    String name3 = "name3";

    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name1)));
    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name2)));
    manager.insert(new ValuelessClusteredEntity(new CompoundKey(id, name3)));

    manager.sliceQuery(ValuelessClusteredEntity.class)
                .forDelete()
                .withPartitionComponents(id)
        .deleteMatching(name2);
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.