Search in sources :

Example 11 with FaCatchSummaryCustomProxy

use of eu.europa.ec.fisheries.ers.fa.dao.proxy.FaCatchSummaryCustomProxy in project UVMS-ActivityModule-APP by UnionVMS.

the class FaCatchDaoTest method testGetFACatchSummaryReportString.

@Test
public void testGetFACatchSummaryReportString() throws Exception {
    dbSetupTracker.skipNextLaunch();
    FishingActivityQuery query = new FishingActivityQuery();
    Map<SearchFilter, String> searchCriteriaMap = new HashMap<>();
    List<GroupCriteria> groupByFields = new ArrayList<>();
    groupByFields.add(GroupCriteria.DATE_MONTH);
    groupByFields.add(GroupCriteria.SPECIES);
    query.setGroupByFields(groupByFields);
    searchCriteriaMap.put(SearchFilter.SOURCE, "FLUX");
    query.setSearchCriteriaMap(searchCriteriaMap);
    // FACatchSummaryHelper faCatchSummaryHelper = FACatchSummaryHelper.createFACatchSummaryHelper();
    // System.out.println( faCatchSummaryHelper.printJsonstructure(query));
    Map<FaCatchSummaryCustomProxy, List<FaCatchSummaryCustomProxy>> faCatchSummaryCustomEntityListMap = dao.getGroupedFaCatchData(query, false);
    assertNotNull(faCatchSummaryCustomEntityListMap);
}
Also used : FishingActivityQuery(eu.europa.ec.fisheries.ers.service.search.FishingActivityQuery) HashMap(java.util.HashMap) FaCatchSummaryCustomProxy(eu.europa.ec.fisheries.ers.fa.dao.proxy.FaCatchSummaryCustomProxy) ArrayList(java.util.ArrayList) SearchFilter(eu.europa.ec.fisheries.uvms.activity.model.schemas.SearchFilter) ArrayList(java.util.ArrayList) List(java.util.List) GroupCriteria(eu.europa.ec.fisheries.uvms.activity.model.schemas.GroupCriteria) Test(org.junit.Test)

Example 12 with FaCatchSummaryCustomProxy

use of eu.europa.ec.fisheries.ers.fa.dao.proxy.FaCatchSummaryCustomProxy in project UVMS-ActivityModule-APP by UnionVMS.

the class FaCatchSummaryCustomProxyTest method testEqualsAndHashCode1.

@Test
public void testEqualsAndHashCode1() {
    FaCatchSummaryCustomProxy proxy1 = new FaCatchSummaryCustomProxy();
    proxy1.setEffortZone("eff");
    proxy1.setFaoArea("fao");
    FaCatchSummaryCustomProxy proxy2 = new FaCatchSummaryCustomProxy();
    proxy2.setEffortZone("eff");
    proxy2.setFaoArea("fao");
    assertTrue(proxy2.equals(proxy1));
}
Also used : FaCatchSummaryCustomProxy(eu.europa.ec.fisheries.ers.fa.dao.proxy.FaCatchSummaryCustomProxy) BaseUnitilsTest(eu.europa.ec.fisheries.uvms.BaseUnitilsTest) Test(org.junit.Test)

Aggregations

FaCatchSummaryCustomProxy (eu.europa.ec.fisheries.ers.fa.dao.proxy.FaCatchSummaryCustomProxy)12 ArrayList (java.util.ArrayList)8 List (java.util.List)7 GroupCriteria (eu.europa.ec.fisheries.uvms.activity.model.schemas.GroupCriteria)5 HashMap (java.util.HashMap)4 Test (org.junit.Test)4 FACatchSummaryRecordDTO (eu.europa.ec.fisheries.ers.service.dto.fareport.summary.FACatchSummaryRecordDTO)3 FACatchSummaryHelper (eu.europa.ec.fisheries.ers.service.facatch.FACatchSummaryHelper)3 ServiceException (eu.europa.ec.fisheries.uvms.commons.service.exception.ServiceException)3 EnumMap (java.util.EnumMap)3 FACatchSummaryDTO (eu.europa.ec.fisheries.ers.service.dto.fareport.summary.FACatchSummaryDTO)2 FishingActivityQuery (eu.europa.ec.fisheries.ers.service.search.FishingActivityQuery)2 BaseUnitilsTest (eu.europa.ec.fisheries.uvms.BaseUnitilsTest)2 SearchFilter (eu.europa.ec.fisheries.uvms.activity.model.schemas.SearchFilter)2 Map (java.util.Map)2 SummaryTableDTO (eu.europa.ec.fisheries.ers.service.dto.fareport.summary.SummaryTableDTO)1 GroupCriteriaMapper (eu.europa.ec.fisheries.ers.service.search.GroupCriteriaMapper)1 FACatchSearchBuilder (eu.europa.ec.fisheries.ers.service.search.builder.FACatchSearchBuilder)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 Method (java.lang.reflect.Method)1