Interface EntityQueryModel

All Superinterfaces:
Supplier<List<Entity>>

public interface EntityQueryModel extends Supplier<List<Entity>>
Provides entities fetched from a database. The default query mechanism can be overridden by using query().
 
 Function<EntityQueryModel, List<Entity>> query = queryModel -> {
     EntityConnection connection = queryModel.connectionProvider().connection();
     try {
         return connection.select(Employee.NAME.equalTo("John"));
     }
     catch (DatabaseException e) {
         throw new RuntimeException(e);
     }
 };

 tableModel.queryModel().query().set(query);
 
 
See Also: