Issue #2984 remove unnecessary dependencies
Change-Id: I2066a1e903680068e0d25f7faa99bc7bda2b8877 Former-commit-id:d03afcdcba
[formerlyd03afcdcba
[formerly 290ec544e38e71332be2072435aff3b933c649ab]] Former-commit-id:be21c41512
Former-commit-id:8f893545f1
This commit is contained in:
parent
8a7e16be50
commit
57e5bbfe84
3 changed files with 40 additions and 20 deletions
|
@ -64,13 +64,6 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.edex.site"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.edex.uengine"
|
||||
download-size="0"
|
||||
|
@ -112,13 +105,6 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.servlet"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.edex.ndm"
|
||||
download-size="0"
|
||||
|
|
|
@ -27,5 +27,4 @@ Require-Bundle: javax.persistence;bundle-version="1.0.0",
|
|||
com.raytheon.uf.common.dataquery,
|
||||
com.raytheon.uf.common.datastorage,
|
||||
com.raytheon.uf.common.dataplugin
|
||||
Import-Package: com.raytheon.uf.common.util,
|
||||
com.raytheon.uf.edex.database.dao
|
||||
Import-Package: com.raytheon.uf.common.util
|
||||
|
|
|
@ -41,8 +41,11 @@ import org.geotools.referencing.GeodeticCalculator;
|
|||
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
|
||||
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
|
||||
import com.raytheon.uf.common.dataplugin.shef.util.ShefConstants;
|
||||
import com.raytheon.uf.common.dataquery.db.QueryResult;
|
||||
import com.raytheon.uf.common.dataquery.db.QueryResultRow;
|
||||
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
|
||||
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest.OrderMode;
|
||||
import com.raytheon.uf.common.dataquery.requests.QlServerRequest;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialQuery;
|
||||
|
@ -51,12 +54,11 @@ import com.raytheon.uf.common.geospatial.SpatialException;
|
|||
import com.raytheon.uf.common.geospatial.SpatialQueryFactory;
|
||||
import com.raytheon.uf.common.hydro.spatial.HRAPCoordinates;
|
||||
import com.raytheon.uf.common.hydro.spatial.HRAPSubGrid;
|
||||
import com.raytheon.uf.common.message.response.ResponseMessageGeneric;
|
||||
import com.raytheon.uf.common.monitor.scan.ScanUtils;
|
||||
import com.raytheon.uf.common.mpe.util.XmrgFile;
|
||||
import com.raytheon.uf.common.serialization.comm.RequestRouter;
|
||||
import com.raytheon.uf.common.site.SiteMap;
|
||||
import com.raytheon.uf.edex.database.dao.CoreDao;
|
||||
import com.raytheon.uf.edex.database.dao.DaoConfig;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
import com.vividsolutions.jts.geom.GeometryFactory;
|
||||
|
@ -86,6 +88,8 @@ import com.vividsolutions.jts.io.WKTWriter;
|
|||
* 03/18/13 1817 D. Hladky Fixed issue with BOX where only 1 HUC was showing up.
|
||||
* 08/20/13 2250 mnash Fixed incorrect return types for database queries.
|
||||
* Apr 21, 2014 2060 njensen Remove dependency on grid dataURI column
|
||||
* Apr 22, 2014 2984 njensen Remove dependency on edex/CoreDao
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -209,9 +213,8 @@ public class FFMPUtils {
|
|||
+ "where lid in " + "(select distinct(lid) from IngestFilter "
|
||||
+ "where pe in ('PC', 'PP') " + "and ingest = 'T' "
|
||||
+ "and dur < 2000)";
|
||||
CoreDao dao = new CoreDao(DaoConfig.forDatabase(ShefConstants.IHFS));
|
||||
try {
|
||||
Object[] results = dao.executeSQLQuery(sql.toString());
|
||||
Object[] results = executeSqlQuery(sql, ShefConstants.IHFS);
|
||||
Geometry poly = getCwaGeometry(cwa, mode);
|
||||
PreparedGeometry pg = PreparedGeometryFactory.prepare(poly);
|
||||
Coordinate coor = poly.getCentroid().getCoordinate();
|
||||
|
@ -1362,4 +1365,36 @@ public class FFMPUtils {
|
|||
+ sourceSiteDataKey + ".h5");
|
||||
}
|
||||
|
||||
/**
|
||||
* Queries the specified database
|
||||
*
|
||||
* @param query
|
||||
* the SQL query to run
|
||||
* @param database
|
||||
* the database to query
|
||||
* @return a two dimensional Object[] representing rows and columns
|
||||
* @throws Exception
|
||||
*/
|
||||
private static Object[] executeSqlQuery(String query, String database)
|
||||
throws Exception {
|
||||
// code shamelessly modeled after DirectDbQuery
|
||||
// TODO DirectDbQuery should be changed to use RequestRouter instead of
|
||||
// ThriftClient and should be promoted to a common plugin
|
||||
Map<String, RequestConstraint> constraints = new HashMap<String, RequestConstraint>();
|
||||
constraints.put("query", new RequestConstraint(query));
|
||||
constraints.put("database", new RequestConstraint(database));
|
||||
constraints.put("mode", new RequestConstraint("sqlquery"));
|
||||
QlServerRequest request = new QlServerRequest(constraints);
|
||||
ResponseMessageGeneric resp = (ResponseMessageGeneric) RequestRouter
|
||||
.route(request);
|
||||
|
||||
QueryResult result = (QueryResult) resp.getContents();
|
||||
List<Object[]> unmappedResults = new ArrayList<Object[]>();
|
||||
for (QueryResultRow row : result.getRows()) {
|
||||
unmappedResults.add(row.getColumnValues());
|
||||
}
|
||||
|
||||
return unmappedResults.toArray(new Object[0]);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue