Search in sources :

Example 51 with PersonUUID

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

the class BaseTestNoAutoInc_2_FETCH method testFilterOperatorEqualString.

public void testFilterOperatorEqualString() {
    PersonUUID person = pm.createQuery(PersonUUID.class).filter("firstName", "Albert").get();
    assertNotNull(person);
    assertEquals(UUID_EINSTEIN, person);
}
Also used : PersonUUID(siena.base.test.model.PersonUUID)

Example 52 with PersonUUID

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

the class BaseTestNoAutoInc_3_ITER method testIterFilterLimitOffset.

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

Example 53 with PersonUUID

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

the class BaseTestNoAutoInc_3_ITER method testIterFilter.

public void testIterFilter() {
    Iterable<PersonUUID> people = pm.createQuery(PersonUUID.class).filter("n>", 1).order("n").iter();
    assertNotNull(people);
    PersonUUID[] array = new PersonUUID[] { UUID_CURIE, UUID_EINSTEIN };
    int i = 0;
    for (PersonUUID PersonIntKey : people) {
        assertEquals(array[i], PersonIntKey);
        i++;
    }
}
Also used : PersonUUID(siena.base.test.model.PersonUUID)

Example 54 with PersonUUID

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

the class BaseTestNoAutoInc_3_ITER method testIterFilterLimit.

public void testIterFilterLimit() {
    Iterable<PersonUUID> people = pm.createQuery(PersonUUID.class).filter("n>", 1).order("n").iter(1);
    assertNotNull(people);
    PersonUUID[] array = new PersonUUID[] { UUID_CURIE };
    int i = 0;
    for (PersonUUID PersonIntKey : people) {
        assertEquals(array[i], PersonIntKey);
        i++;
    }
}
Also used : PersonUUID(siena.base.test.model.PersonUUID)

Example 55 with PersonUUID

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

the class BaseTestNoAutoInc_7_BATCH method testGetByKeyUUID.

public void testGetByKeyUUID() {
    PersonUUID curie = getByKeyPersonUUID(UUID_CURIE.id);
    assertEquals(UUID_CURIE, curie);
}
Also used : PersonUUID(siena.base.test.model.PersonUUID)

Aggregations

PersonUUID (siena.base.test.model.PersonUUID)69 ArrayList (java.util.ArrayList)15 List (java.util.List)5 QueryOptionGaeContext (siena.gae.QueryOptionGaeContext)4 SienaException (siena.SienaException)2 SienaRestrictedApiException (siena.SienaRestrictedApiException)1