use of org.qi4j.sample.dcicargo.sample_a.data.entity.HandlingEventEntity in project qi4j-sdk by Qi4j.
the class TrackingQueries method events.
public IModel<List<HandlingEventDTO>> events(final String trackingIdString) {
return new QueryModel<HandlingEventDTO, HandlingEventEntity>(HandlingEventDTO.class) {
public Query<HandlingEventEntity> getQuery() {
HandlingEvent eventTemplate = templateFor(HandlingEvent.class);
QueryBuilder<HandlingEventEntity> qb = qbf.newQueryBuilder(HandlingEventEntity.class).where(QueryExpressions.eq(eventTemplate.trackingId().get().id(), trackingIdString));
return uowf.currentUnitOfWork().newQuery(qb).orderBy(orderBy(eventTemplate.completionTime()));
}
};
}
Aggregations