From: <gk...@us...> - 2009-11-05 16:09:59
|
Revision: 22235 http://gmod.svn.sourceforge.net/gmod/?rev=22235&view=rev Author: gk_fan Date: 2009-11-05 16:09:47 +0000 (Thu, 05 Nov 2009) Log Message: ----------- + Fixed support for Chado instances where "searchHitsHaveFeatLocs" are set to false (apparently FlyBase still uses Chado this way...) Modified Paths: -------------- apollo/trunk/src/java/apollo/dataadapter/chado/jdbc/JdbcChadoAdapter.java Modified: apollo/trunk/src/java/apollo/dataadapter/chado/jdbc/JdbcChadoAdapter.java =================================================================== --- apollo/trunk/src/java/apollo/dataadapter/chado/jdbc/JdbcChadoAdapter.java 2009-11-05 08:55:38 UTC (rev 22234) +++ apollo/trunk/src/java/apollo/dataadapter/chado/jdbc/JdbcChadoAdapter.java 2009-11-05 16:09:47 UTC (rev 22235) @@ -2055,8 +2055,8 @@ "leafFeat.type_id as featureTypeId, "+ lazySelect + "tgtFeatLoc.residue_info AS target_residue_info "+ - (joinWithFeatureProp ? ", fp." + pvalCol + " AS feature_prop " : "") + ", " + - "leafToParent.object_id AS parent_id" + + (joinWithFeatureProp ? ", fp." + pvalCol + " AS feature_prop " : "") + + (getChadoInstance().searchHitsHaveFeatLocs() ? ", leafToParent.object_id AS parent_id" : "") + "\nFROM featureloc leafFeatLoc, feature leafFeat, " + (joinWithFeatureProp ? "featureprop fp, " : "") + @@ -2086,7 +2086,7 @@ // o2." + abbrevCol + ", tgtFeat.uniquename " + ", leafFeatLoc.strand " - + ", leafToParent.object_id"; + + (getChadoInstance().searchHitsHaveFeatLocs() ? ", leafToParent.object_id" : ""); ResultSet rs = executeLoggedSelectQuery("addSearchHits", c, sql); @@ -2128,7 +2128,7 @@ String targetResidues = null; if (setTargetSeqs && !getTargetSeqsSeparately) targetResidues = rs.getString("target_residues"); - long parentId = rs.getLong("parent_id"); + long parentId = getChadoInstance().searchHitsHaveFeatLocs() ? rs.getLong("parent_id") : 0; String featName = null; String tgtFeatName = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |