use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script10.
@Test
public void script10() throws EntityFinderException {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Query<Person> query = unitOfWork.newQuery(qb.where(not(eq(person.yearOfBirth(), 1975))));
System.out.println("*** script10: " + query);
verifyUnorderedResults(query, "Jack Doe", "Joe Doe");
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script40_Date.
@Test
public void script40_Date() {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Query<Person> query = unitOfWork.newQuery(qb.where(eq(person.dateValue(), new DateTime("2010-03-04T13:24:35", UTC).toDate())));
System.out.println("*** script40_Date: " + query);
verifyUnorderedResults(query, "Jack Doe");
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script40_LocalDate.
@Test
public void script40_LocalDate() {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Query<Person> query = unitOfWork.newQuery(qb.where(eq(person.localDateValue(), new LocalDate("2010-03-04", UTC))));
System.out.println("*** script40_LocalDate: " + query);
verifyUnorderedResults(query, "Jack Doe");
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script33.
@Test
public void script33() {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Domain gaming = unitOfWork.get(Domain.class, "Gaming");
Query<Person> query = unitOfWork.newQuery(qb.where(contains(person.interests(), gaming)));
System.out.println("*** script33: " + query);
verifyUnorderedResults(query, "Joe Doe");
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script34.
@Test
public void script34() {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Female annDoe = unitOfWork.get(Female.class, "anndoe");
Query<Person> query = unitOfWork.newQuery(qb.where(eq(person.mother(), annDoe)));
System.out.println("*** script34: " + query);
verifyUnorderedResults(query, "Joe Doe");
}
Aggregations