Search in sources :

Example 41 with PersonLongAutoID

use of siena.base.test.model.PersonLongAutoID in project siena by mandubian.

the class BaseAsyncTest method testGetLongAutoID.

public void testGetLongAutoID() {
    PersonLongAutoID curie = getPersonLongAutoID(LongAutoID_CURIE.id);
    assertEquals(LongAutoID_CURIE, curie);
}
Also used : PersonLongAutoID(siena.base.test.model.PersonLongAutoID)

Example 42 with PersonLongAutoID

use of siena.base.test.model.PersonLongAutoID in project siena by mandubian.

the class BaseAsyncTest method getPersonLongAutoID.

private PersonLongAutoID getPersonLongAutoID(Long id) {
    PersonLongAutoID p = new PersonLongAutoID();
    p.id = id;
    pm.get(p).get();
    return p;
}
Also used : PersonLongAutoID(siena.base.test.model.PersonLongAutoID)

Example 43 with PersonLongAutoID

use of siena.base.test.model.PersonLongAutoID in project siena by mandubian.

the class BaseAsyncTest method testGetByKeyLongAutoID.

public void testGetByKeyLongAutoID() {
    PersonLongAutoID curie = pm.getByKey(PersonLongAutoID.class, LongAutoID_CURIE.id).get();
    assertEquals(LongAutoID_CURIE, curie);
}
Also used : PersonLongAutoID(siena.base.test.model.PersonLongAutoID)

Example 44 with PersonLongAutoID

use of siena.base.test.model.PersonLongAutoID in project siena by mandubian.

the class BaseTestNoAutoInc_DEFAULT method testIterFullLongAutoID.

public void testIterFullLongAutoID() {
    Iterable<PersonLongAutoID> people = pm.createQuery(PersonLongAutoID.class).order("n").iter();
    assertNotNull(people);
    PersonLongAutoID[] array = new PersonLongAutoID[] { LongAutoID_TESLA, LongAutoID_CURIE, LongAutoID_EINSTEIN };
    int i = 0;
    for (PersonLongAutoID person : people) {
        assertEquals(array[i], person);
        i++;
    }
}
Also used : PersonLongAutoID(siena.base.test.model.PersonLongAutoID)

Example 45 with PersonLongAutoID

use of siena.base.test.model.PersonLongAutoID in project siena by mandubian.

the class BaseTestNoAutoInc_DEFAULT method testIterLimitOffsetLongAutoID.

public void testIterLimitOffsetLongAutoID() {
    Iterable<PersonLongAutoID> people = pm.createQuery(PersonLongAutoID.class).order("n").iter(2, 1);
    assertNotNull(people);
    PersonLongAutoID[] array = new PersonLongAutoID[] { LongAutoID_CURIE, LongAutoID_EINSTEIN };
    int i = 0;
    for (PersonLongAutoID person : people) {
        assertEquals(array[i], person);
        i++;
    }
}
Also used : PersonLongAutoID(siena.base.test.model.PersonLongAutoID)

Aggregations

PersonLongAutoID (siena.base.test.model.PersonLongAutoID)47 SienaRestrictedApiException (siena.SienaRestrictedApiException)11 ArrayList (java.util.ArrayList)3 List (java.util.List)3 QueryFilter (siena.QueryFilter)2 QueryOption (siena.core.options.QueryOption)2 QueryOptionPage (siena.core.options.QueryOptionPage)2 Json (siena.Json)1 QueryFilterSearch (siena.QueryFilterSearch)1 QueryFilterSimple (siena.QueryFilterSimple)1 QueryOrder (siena.QueryOrder)1