Commit f8ea3ade authored by Matija Obreza's avatar Matija Obreza

Fixed KML error on empty filters

parent a0fd0d58
...@@ -34,7 +34,6 @@ import org.genesys2.server.model.impl.Crop; ...@@ -34,7 +34,6 @@ import org.genesys2.server.model.impl.Crop;
import org.genesys2.server.model.impl.FaoInstitute; import org.genesys2.server.model.impl.FaoInstitute;
import org.genesys2.server.persistence.domain.AccessionRepository; import org.genesys2.server.persistence.domain.AccessionRepository;
import org.genesys2.server.persistence.domain.MethodRepository; import org.genesys2.server.persistence.domain.MethodRepository;
import org.genesys2.server.persistence.domain.TraitValueRepository;
import org.genesys2.server.service.CropService; import org.genesys2.server.service.CropService;
import org.genesys2.server.service.FilterConstants; import org.genesys2.server.service.FilterConstants;
import org.genesys2.server.service.GenesysFilterService; import org.genesys2.server.service.GenesysFilterService;
...@@ -42,7 +41,6 @@ import org.genesys2.server.service.GenesysService; ...@@ -42,7 +41,6 @@ import org.genesys2.server.service.GenesysService;
import org.genesys2.server.service.GeoService; import org.genesys2.server.service.GeoService;
import org.genesys2.server.service.InstituteService; import org.genesys2.server.service.InstituteService;
import org.genesys2.server.service.TaxonomyService; import org.genesys2.server.service.TaxonomyService;
import org.genesys2.server.service.TraitService;
import org.genesys2.server.service.impl.DirectMysqlQuery.MethodResolver; import org.genesys2.server.service.impl.DirectMysqlQuery.MethodResolver;
import org.genesys2.server.service.impl.FilterHandler.AppliedFilter; import org.genesys2.server.service.impl.FilterHandler.AppliedFilter;
import org.genesys2.server.service.impl.FilterHandler.AppliedFilters; import org.genesys2.server.service.impl.FilterHandler.AppliedFilters;
...@@ -70,18 +68,12 @@ public class GenesysFilterServiceImpl implements GenesysFilterService { ...@@ -70,18 +68,12 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
@Autowired @Autowired
private GenesysService genesysService; private GenesysService genesysService;
@Autowired
private TraitValueRepository traitValueRepository;
@Autowired @Autowired
private MethodRepository methodRepository; private MethodRepository methodRepository;
@Autowired @Autowired
private AccessionRepository accessionRepository; private AccessionRepository accessionRepository;
@Autowired
private TraitService traitService;
@Autowired @Autowired
private GeoService geoService; private GeoService geoService;
...@@ -251,8 +243,9 @@ public class GenesysFilterServiceImpl implements GenesysFilterService { ...@@ -251,8 +243,9 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
final DirectMysqlQuery directQuery = new DirectMysqlQuery("accessiongeo", "geo"); final DirectMysqlQuery directQuery = new DirectMysqlQuery("accessiongeo", "geo");
directQuery.filterTile(zoom, xtile, ytile); directQuery.filterTile(zoom, xtile, ytile);
directQuery.innerJoin("accession", "a", "a.id=geo.accessionId");
if (!filters.isEmpty()) { if (!filters.isEmpty()) {
directQuery.innerJoin("accession", "a", "a.id=geo.accessionId");
directQuery.join(filters); directQuery.join(filters);
directQuery.filter(filters, new MethodResolver() { directQuery.filter(filters, new MethodResolver() {
@Override @Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment