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

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


  @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);

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

    assertThat(found.getId()).isEqualTo(compoundKey);
    assertThat(found.getValue()).isEqualTo("clustered_value");
  }
View Full Code Here


  @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);

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

    assertThat(found.getId()).isEqualTo(compoundKey);
    assertThat(found.getValue()).isEqualTo("clustered_value");
  }
View Full Code Here

  @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);

    entity.setValue("new_clustered_value");
    manager.update(entity);
View Full Code Here

  @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);

    manager.delete(entity);
View Full Code Here

  public void should_refresh() throws Exception {

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

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

    entity = manager.insert(entity);

    session.execute("UPDATE " + TABLE_NAME + " set value='new_clustered_value' where id=" + partitionKey
        + " and type = 'FILE'");
View Full Code Here

TOP

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