com.avaje.ebeaninternal.server.expression.package.html Maven / Gradle / Ivy
Collection objects for lazy loading
Expressions for building WHERE clauses.
You will most likely use expressions directly off the ExpressionList.
Query<Order> query = Ebean.createQuery(Order.class)
.where()
.like("customer.name","rob%")
.gt("orderDate",lastWeek);
List<Order> orderList = query.findList();
...
In the code above the LIKE and GREATER THAN Expressions are added to the where clause.
The way this works is that where() returns an ExpressionList which has methods on
it to create the standard expressions (EQUAL TO, LIKE etc).
I expect most people to add their expressions in this way. The Expr expression factory
object also has the ability to create the standard expressions.
You can build your own Expression objects by implementing the Expression interface.