Search in sources :

Example 6 with Male

use of org.qi4j.test.indexing.model.Male in project qi4j-sdk by Qi4j.

the class AbstractQueryTest method script15.

@Test
public void script15() throws EntityFinderException {
    QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
    Male person = templateFor(Male.class);
    Query<Person> query = unitOfWork.newQuery(qb.where(isNull(person.wife())));
    System.out.println("*** script15: " + query);
    verifyUnorderedResults(query, "Joe Doe", "Ann Doe");
}
Also used : Male(org.qi4j.test.indexing.model.Male) Person(org.qi4j.test.indexing.model.Person) Test(org.junit.Test)

Example 7 with Male

use of org.qi4j.test.indexing.model.Male in project qi4j-sdk by Qi4j.

the class AbstractQueryTest method script13.

@Test
public void script13() throws EntityFinderException {
    QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
    Male person = templateFor(Male.class);
    Query<Person> query = unitOfWork.newQuery(qb.where(isNotNull(person.wife())));
    System.out.println("*** script13: " + query);
    verifyUnorderedResults(query, "Jack Doe");
}
Also used : Male(org.qi4j.test.indexing.model.Male) Person(org.qi4j.test.indexing.model.Person) Test(org.junit.Test)

Aggregations

Male (org.qi4j.test.indexing.model.Male)7 Test (org.junit.Test)6 EntityReference (org.qi4j.api.entity.EntityReference)3 Person (org.qi4j.test.indexing.model.Person)2 BigDecimal (java.math.BigDecimal)1 BigInteger (java.math.BigInteger)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 DateTime (org.joda.time.DateTime)1 LocalDate (org.joda.time.LocalDate)1 LocalDateTime (org.joda.time.LocalDateTime)1 EntityBuilder (org.qi4j.api.entity.EntityBuilder)1 UnitOfWork (org.qi4j.api.unitofwork.UnitOfWork)1 ValueBuilder (org.qi4j.api.value.ValueBuilder)1 Account (org.qi4j.test.indexing.model.Account)1 Address (org.qi4j.test.indexing.model.Address)1 Cat (org.qi4j.test.indexing.model.Cat)1 City (org.qi4j.test.indexing.model.City)1 Domain (org.qi4j.test.indexing.model.Domain)1 Female (org.qi4j.test.indexing.model.Female)1