Search in sources :

Example 26 with PersonLongAutoID

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

the class BaseTest method testUpdateLongAutoID.

public void testUpdateLongAutoID() {
    PersonLongAutoID curie = getPersonLongAutoID(LongAutoID_CURIE.id);
    curie.lastName = "Sklodowska–Curie";
    pm.update(curie);
    PersonLongAutoID curie2 = getPersonLongAutoID(LongAutoID_CURIE.id);
    assertEquals(curie2, curie);
}
Also used : PersonLongAutoID(siena.base.test.model.PersonLongAutoID)

Example 27 with PersonLongAutoID

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

the class BaseTest method testGetByKeyLongAutoID.

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

Example 28 with PersonLongAutoID

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

the class BaseTest method testFilterOperatorEqualLongAutoID.

public void testFilterOperatorEqualLongAutoID() {
    PersonLongAutoID person = pm.createQuery(PersonLongAutoID.class).filter("id", LongAutoID_EINSTEIN.id).get();
    assertNotNull(person);
    assertEquals(LongAutoID_EINSTEIN, person);
}
Also used : PersonLongAutoID(siena.base.test.model.PersonLongAutoID)

Example 29 with PersonLongAutoID

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

the class BaseTest method testOrderLongAutoId.

public void testOrderLongAutoId() {
    List<PersonLongAutoID> people = queryPersonLongAutoIDOrderBy("id", "", false).fetch();
    assertNotNull(people);
    assertEquals(3, people.size());
    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 30 with PersonLongAutoID

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

the class BaseTest 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