Search in sources :

Example 1 with FishingTripSearchBuilder

use of eu.europa.ec.fisheries.ers.service.search.builder.FishingTripSearchBuilder in project UVMS-ActivityModule-APP by UnionVMS.

the class FishingTripDao method getQueryForFilterFishingTrips.

private Query getQueryForFilterFishingTrips(FishingActivityQuery query) throws ServiceException {
    FishingTripSearchBuilder search = new FishingTripSearchBuilder();
    StringBuilder sqlToGetActivityList = search.createSQL(query);
    log.debug("SQL:" + sqlToGetActivityList);
    Query typedQuery = em.createQuery(sqlToGetActivityList.toString());
    return search.fillInValuesForTypedQuery(query, typedQuery);
}
Also used : FishingTripSearchBuilder(eu.europa.ec.fisheries.ers.service.search.builder.FishingTripSearchBuilder) TypedQuery(javax.persistence.TypedQuery) Query(javax.persistence.Query) FishingActivityQuery(eu.europa.ec.fisheries.ers.service.search.FishingActivityQuery)

Aggregations

FishingActivityQuery (eu.europa.ec.fisheries.ers.service.search.FishingActivityQuery)1 FishingTripSearchBuilder (eu.europa.ec.fisheries.ers.service.search.builder.FishingTripSearchBuilder)1 Query (javax.persistence.Query)1 TypedQuery (javax.persistence.TypedQuery)1