Search in sources :

Example 1 with Embedded

use of example.Embedded in project elide by yahoo.

the class EmbeddedIT method setup.

@BeforeEach
public void setup() throws IOException {
    dataStore.populateEntityDictionary(EntityDictionary.builder().build());
    DataStoreTransaction tx = dataStore.beginTransaction();
    // id 1
    Embedded embedded = new Embedded();
    embedded.setSegmentIds(ImmutableSet.of(3L, 4L, 5L));
    tx.createObject(embedded, null);
    Left left = new Left();
    Right right = new Right();
    left.setOne2one(right);
    right.setOne2one(left);
    tx.createObject(left, null);
    tx.createObject(right, null);
    tx.commit(null);
    tx.close();
}
Also used : Left(example.Left) Right(example.Right) DataStoreTransaction(com.yahoo.elide.core.datastore.DataStoreTransaction) Embedded(example.Embedded) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

DataStoreTransaction (com.yahoo.elide.core.datastore.DataStoreTransaction)1 Embedded (example.Embedded)1 Left (example.Left)1 Right (example.Right)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1