use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script43_Date.
@Test
public void script43_Date() {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Query<Person> query = unitOfWork.newQuery(qb.where(and(gt(person.dateValue(), new DateTime("2005-03-04T13:24:35", UTC).toDate()), lt(person.dateValue(), new DateTime("2015-03-04T13:24:35", UTC).toDate()))));
System.out.println("*** script43_Date: " + query);
verifyUnorderedResults(query, "Jack Doe");
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script51_BigDecimal.
@Test
public void script51_BigDecimal() {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Query<Person> query = unitOfWork.newQuery(qb.where(ne(person.bigDecimal(), new BigDecimal("2342.76931348623157e+307"))));
System.out.println("*** script51_BigDecimal: " + query);
verifyUnorderedResults(query, "Jack Doe");
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script30.
@Test
@Ignore("Wait till 1.1?")
// Paul: I don't understand this test
@SuppressWarnings("unchecked")
public void script30() {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
// oneOf( person.personalWebsite().get().queryParams() );
QueryParam queryParam = null;
Query<Person> query = unitOfWork.newQuery(qb.where(and(eq(queryParam.name(), "foo"), eq(queryParam.value(), "bar"))));
System.out.println("*** script30: " + query);
verifyUnorderedResults(query, "Jack Doe");
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script41_LocalDate.
@Test
public void script41_LocalDate() {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Query<Person> query = unitOfWork.newQuery(qb.where(ne(person.localDateValue(), new LocalDate("2010-03-04", UTC))));
System.out.println("*** script41_LocalDate: " + query);
verifyUnorderedResults(query, "Joe Doe");
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script42_LocalDate.
@Test
public void script42_LocalDate() {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Query<Person> query = unitOfWork.newQuery(qb.where(ne(person.localDateValue(), new LocalDate("2010-03-04", forID("CET")))));
System.out.println("*** script42_LocalDate: " + query);
verifyUnorderedResults(query, "Joe Doe");
}
Aggregations