use of org.qi4j.sample.dcicargo.sample_a.data.entity.CargoEntity in project qi4j-sdk by Qi4j.
the class HandlingQueries method cargoIds.
public List<String> cargoIds() {
QueryBuilder<CargoEntity> qb = qbf.newQueryBuilder(CargoEntity.class);
Query<CargoEntity> cargos = uowf.currentUnitOfWork().newQuery(qb).orderBy(orderBy(templateFor(CargoEntity.class).trackingId().get().id()));
List<String> cargoList = new ArrayList<String>();
for (CargoEntity cargo : cargos) {
cargoList.add(cargo.trackingId().get().id().get());
}
return cargoList;
}
use of org.qi4j.sample.dcicargo.sample_a.data.entity.CargoEntity in project qi4j-sdk by Qi4j.
the class TrackingQueries method routedCargos.
public List<String> routedCargos() {
Cargo cargoEntity = templateFor(CargoEntity.class);
QueryBuilder<CargoEntity> qb = qbf.newQueryBuilder(CargoEntity.class).where(isNotNull(cargoEntity.itinerary()));
Query<CargoEntity> cargos = uowf.currentUnitOfWork().newQuery(qb).orderBy(orderBy(cargoEntity.trackingId().get().id()));
List<String> cargoList = new ArrayList<String>();
for (CargoEntity cargo : cargos) {
cargoList.add(cargo.trackingId().get().id().get());
}
return cargoList;
}
Aggregations