use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script12_ne.
@Test
public void script12_ne() throws EntityFinderException {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Query<Person> query = unitOfWork.newQuery(qb.where(ne(person.email(), "joe@thedoes.net")));
System.out.println("*** script12_ne: " + query);
verifyUnorderedResults(query);
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script06.
@Test
public void script06() throws EntityFinderException {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Query<Person> query = unitOfWork.newQuery(qb.where(ge(person.yearOfBirth(), 1973)));
System.out.println("*** script06: " + query);
verifyUnorderedResults(query, "Joe Doe", "Ann Doe");
}
use of org.qi4j.test.indexing.model.Person 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");
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script40_DateTime.
@Test
public void script40_DateTime() {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Query<Person> query = unitOfWork.newQuery(qb.where(eq(person.dateTimeValue(), new DateTime("2010-03-04T13:24:35", UTC))));
System.out.println("*** script40_DateTime: " + query);
verifyUnorderedResults(query, "Jack Doe");
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script08.
@Test
@SuppressWarnings("unchecked")
public void script08() throws EntityFinderException {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Query<Person> query = unitOfWork.newQuery(qb.where(or(eq(person.yearOfBirth(), 1970), eq(person.yearOfBirth(), 1975))));
System.out.println("*** script08: " + query);
verifyUnorderedResults(query, "Jack Doe", "Ann Doe");
}
Aggregations