Skip to content

Commit

Permalink
Merge pull request #2 from Viras-/master
Browse files Browse the repository at this point in the history
Release 0.9.0
  • Loading branch information
Viras- committed Nov 5, 2019
2 parents f12b9f6 + f7961f6 commit e8fa6b7
Show file tree
Hide file tree
Showing 93 changed files with 609 additions and 213 deletions.
42 changes: 40 additions & 2 deletions jacq-birt/seedorder.rptdesign
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
</ex-property>
<ex-property>
<name>pojoClassPath</name>
<value>C:\Dev\Repositories\jacq-javaee\jacq-service-report\target\jacq-service-report.jar;C:\Dev\Repositories\jacq-javaee\jacq-common\target\jacq-common-0.8.0.jar;</value>
<value>C:\Dev\Repositories\jacq-javaee\jacq-service-report\target\jacq-service-report.jar;C:\Dev\Repositories\jacq-javaee\jacq-common\target\jacq-common-0.9.0.jar;</value>
</ex-property>
</list-property>
<property name="pojoDataSetClassPath">C:\Dev\Repositories\jacq-javaee\jacq-service-report\target\jacq-service-report.jar;C:\Dev\Repositories\jacq-javaee\jacq-common\target\jacq-common-0.8.0.jar;</property>
<property name="pojoDataSetClassPath">C:\Dev\Repositories\jacq-javaee\jacq-service-report\target\jacq-service-report.jar;C:\Dev\Repositories\jacq-javaee\jacq-common\target\jacq-common-0.9.0.jar;</property>
</oda-data-source>
</data-sources>
<data-sets>
Expand Down Expand Up @@ -306,6 +306,11 @@
<property name="analysis">dimension</property>
<text-property name="heading">IpenNumber</text-property>
</structure>
<structure>
<property name="columnName">CultivarName</property>
<property name="analysis">dimension</property>
<text-property name="heading">CultivarName</text-property>
</structure>
</list-property>
<list-property name="parameters"/>
<structure name="cachedMetaData">
Expand All @@ -330,6 +335,11 @@
<property name="name">IpenNumber</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">CultivarName</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<property name="dataSource">SeedOrderDataSource</property>
Expand Down Expand Up @@ -362,6 +372,13 @@
<property name="dataType">string</property>
<property name="nativeDataType">1</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">CultivarName</property>
<property name="nativeName">CultivarName</property>
<property name="dataType">string</property>
<property name="nativeDataType">1</property>
</structure>
</list-property>
<xml-property name="queryText"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<PojoQuery appContextKey="APP_CONTEXT_KEY_SEEDORDERDERIVATIVESDATASET" dataSetClass="org.jacq.service.report.birt.SeedOrderDerivativesDataSet" version="1.0">
Expand All @@ -377,6 +394,9 @@
<ColumnMapping index="4" name="IpenNumber" odaDataType="String">
<Method name="getIpenNumber"/>
</ColumnMapping>
<ColumnMapping index="5" name="CultivarName" odaDataType="String">
<Method name="getCultivarName"/>
</ColumnMapping>
</PojoQuery>
]]></xml-property>
<xml-property name="designerValues"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
Expand Down Expand Up @@ -639,10 +659,17 @@
<property name="dataType">string</property>
<property name="allowExport">true</property>
</structure>
<structure>
<property name="name">CultivarName</property>
<expression name="expression" type="javascript">dataSetRow["CultivarName"]</expression>
<property name="dataType">string</property>
<property name="allowExport">true</property>
</structure>
</list-property>
<column id="63"/>
<column id="64"/>
<column id="65"/>
<column id="81"/>
<column id="69"/>
<header>
<row id="45">
Expand All @@ -666,6 +693,11 @@
<text-property name="text">Scientific-Name</text-property>
</label>
</cell>
<cell id="78">
<label id="82">
<text-property name="text">Cultivar-Name</text-property>
</label>
</cell>
<cell id="66">
<label id="73">
<text-property name="text">IPEN-Number</text-property>
Expand All @@ -690,6 +722,11 @@
<property name="resultSetColumn">ScientificName</property>
</data>
</cell>
<cell id="79">
<data id="83">
<property name="resultSetColumn">CultivarName</property>
</data>
</cell>
<cell id="67">
<data id="72">
<property name="resultSetColumn">IpenNumber</property>
Expand All @@ -702,6 +739,7 @@
<cell id="60"/>
<cell id="61"/>
<cell id="62"/>
<cell id="80"/>
<cell id="68"/>
</row>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion jacq-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>jacq</artifactId>
<groupId>org.jacq</groupId>
<version>0.8.0</version>
<version>0.9.0</version>
<relativePath>../jacq/pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public abstract class BaseDerivativeManager {
*/
protected static final String FILTER_TYPE = "`type` = ?";
protected static final String FILTER_DERIVATIVEID = "`derivative_id` = ?";
protected static final String FILTER_PLACENUMBER = "`place_number` = ?";
protected static final String FILTER_PLACENUMBER = "`place_number` LIKE ?";
protected static final String FILTER_ACCESSIONNUMBER = "`accession_number` = ?";
protected static final String FILTER_SEPARATED = "`separated` = ?";
protected static final String FILTER_SCIENTIFIC_NAME_ID = "`scientific_name_id` = ?";
Expand Down Expand Up @@ -228,6 +228,7 @@ protected String applySearchCriteria(String baseSql, List<Object> params, String
}
if (!StringUtils.isEmpty(placeNumber)) {
queryString += " AND " + FILTER_PLACENUMBER;
placeNumber = placeNumber + "%";
params.add(placeNumber);
}
if (!StringUtils.isEmpty(accessionNumber)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import javax.transaction.Transactional;
Expand All @@ -33,6 +35,8 @@
*/
public abstract class BaseGatheringManager {

private static final Logger LOGGER = Logger.getLogger(BaseGatheringManager.class.getName());

protected EntityManager entityManager;

public void setEntityManager(EntityManager entityManager) {
Expand Down Expand Up @@ -61,27 +65,35 @@ public List<LocationResult> locationFind(String location, Integer offset, Intege
List<LocationResult> locationResults = new ArrayList<>();

for (GeoNamesEntryResult geoNamesEntryResult : geoNamesSearchResult.getGeonames()) {
TypedQuery<TblLocationGeonames> locationGeonamesQuery = entityManager.createNamedQuery("TblLocationGeonames.findByGeonameId", TblLocationGeonames.class);
locationGeonamesQuery.setParameter("geonameId", geoNamesEntryResult.getGeonameId());
List<TblLocationGeonames> locationGeonamesList = locationGeonamesQuery.getResultList();
if (locationGeonamesList != null && locationGeonamesList.size() > 0) {
locationResults.add(new LocationResult(locationGeonamesList.get(0).getTblLocation()));
} else {
TblLocation tblLocation = new TblLocation();
tblLocation.setLocation(geoNamesEntryResult.getName());
entityManager.persist(tblLocation);

TblLocationGeonames tblLocationGeonames = new TblLocationGeonames();
tblLocationGeonames.setId(tblLocation.getId());
tblLocationGeonames.setTblLocation(tblLocation);
tblLocationGeonames.setCountryCode(geoNamesEntryResult.getCountryCode());
tblLocationGeonames.setGeonameId(geoNamesEntryResult.getGeonameId());
tblLocationGeonames.setServiceData(geoNamesEntryResult.toString());
entityManager.persist(tblLocationGeonames);

tblLocation.setTblLocationGeonames(tblLocationGeonames);

locationResults.add(new LocationResult(tblLocation));
try {
TypedQuery<TblLocationGeonames> locationGeonamesQuery = entityManager.createNamedQuery("TblLocationGeonames.findByGeonameId", TblLocationGeonames.class);
locationGeonamesQuery.setParameter("geonameId", geoNamesEntryResult.getGeonameId());
List<TblLocationGeonames> locationGeonamesList = locationGeonamesQuery.getResultList();
if (locationGeonamesList != null && locationGeonamesList.size() > 0) {
locationResults.add(new LocationResult(locationGeonamesList.get(0).getTblLocation()));
} else {
if (geoNamesEntryResult.getCountryCode() == null) {
continue;
}

TblLocation tblLocation = new TblLocation();
tblLocation.setLocation(geoNamesEntryResult.getName());
entityManager.persist(tblLocation);

TblLocationGeonames tblLocationGeonames = new TblLocationGeonames();
tblLocationGeonames.setId(tblLocation.getId());
tblLocationGeonames.setTblLocation(tblLocation);
tblLocationGeonames.setCountryCode(geoNamesEntryResult.getCountryCode());
tblLocationGeonames.setGeonameId(geoNamesEntryResult.getGeonameId());
tblLocationGeonames.setServiceData(geoNamesEntryResult.toString());
entityManager.persist(tblLocationGeonames);

tblLocation.setTblLocationGeonames(tblLocationGeonames);

locationResults.add(new LocationResult(tblLocation));
}
} catch (Exception e) {
LOGGER.log(Level.SEVERE, e.getMessage(), e);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 wkoller.
* Copyright 2019 wkoller.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 wkoller.
* Copyright 2019 wkoller.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 wkoller.
* Copyright 2019 wkoller.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 wkoller.
* Copyright 2019 wkoller.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 wkoller.
* Copyright 2019 wkoller.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 fhafner.
* Copyright 2019 wkoller.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,7 +35,7 @@

/**
*
* @author fhafner
* @author wkoller
*/
@Entity
@Table(name = "frmwrk_role")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 wkoller.
* Copyright 2019 wkoller.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit e8fa6b7

Please sign in to comment.