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

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


  private ObjectMapper mapper = new ObjectMapper();

  @Test
  public void should_persist_and_find() throws Exception {
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), "name");
    Holder holder = new Holder("content");
    entity = new ClusteredEntityWithObjectValue(compoundKey, holder);

    manager.insert(entity);
View Full Code Here


    assertThat(found.getValue()).isEqualTo(holder);
  }

  @Test
  public void should_persist_and_get_proxy() throws Exception {
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), "name");
    Holder holder = new Holder("content");
    entity = new ClusteredEntityWithObjectValue(compoundKey, holder);

    manager.insert(entity);
View Full Code Here

  }

  @Test
  public void should_merge_modifications() throws Exception {

    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), "name");
    Holder holder = new Holder("content");
    Holder newHolder = new Holder("new_content");
    entity = new ClusteredEntityWithObjectValue(compoundKey, holder);

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

    assertThat(entity.getValue()).isEqualTo(newHolder);
  }

  @Test
  public void should_delete() throws Exception {
    compoundKey = new ClusteredKey(RandomUtils.nextLong(0,Long.MAX_VALUE), "name");
    Holder holder = new Holder("content");
    entity = new ClusteredEntityWithObjectValue(compoundKey, holder);

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

  @Test
  public void should_refresh() throws Exception {

    long partitionKey = RandomUtils.nextLong(0,Long.MAX_VALUE);
    compoundKey = new ClusteredKey(partitionKey, "name");
    Holder holder = new Holder("content");
    Holder newHolder = new Holder("new_content");

    entity = new ClusteredEntityWithObjectValue(compoundKey, holder);
View Full Code Here

    assertThat(entities.get(0).getValue().getContent()).isEqualTo("name1");
    assertThat(entities.get(1).getValue().getContent()).isEqualTo("name3");
  }

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

TOP

Related Classes of info.archinnov.achilles.test.integration.entity.ClusteredEntityWithObjectValue.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.