@Query("select t from Taxonomy2 t where t.genus = ?1 and t.species = ?2 and t.spAuthor = ?3 and t.subtaxa = ?4 and t.subtAuthor = ?5")
@Query("select t from Taxonomy2 t where lower(t.genus) = lower(?1) and lower(t.species) = lower(?2) and lower(t.spAuthor) = lower(?3) and lower(t.subtaxa) = lower(?4) and lower(t.subtAuthor) = lower(?5)")
@@ -390,8 +378,6 @@ public class GenesysLowlevelRepositoryCustomImpl implements GenesysLowlevelRepos
finalPreparedStatementstmt=con
.prepareStatement("select distinct a.id, a.instCode, a.acceNumb, t.genus from accessiontrait at inner join accession a on a.id=at.accessionId left outer join taxonomy2 t on t.id=a.taxonomyId2 where at.metadataId = ?");
finalList<Map<String,Object>>rows=this.jdbcTemplate.queryForList("select metadataId, `"+method.getFieldName()+"` as traitvalue from `"
+method.getId()+"` where accessionId=?",newObject[]{at.getAccession().getId()});
finalList<Map<String,Object>>rows=this.jdbcTemplate.queryForList("select metadataid, \""+method.getFieldName().toLowerCase()+"\" as traitvalue from \""
+method.getId()+"\" where accessionId=?",newObject[]{at.getAccession().getId()});
if(rows==null||rows.size()==0){
// Skip
...
...
@@ -186,8 +186,8 @@ public class TraitValueRepositoryImpl implements TraitValueRepository {
finallongmethodId=method.getId();
LOG.debug("MethodID={}",methodId);
this.namedJdbcTemplate.query("select accessionId, `"+method.getFieldName()+"` as traitvalue from `"+method.getId()
+"` where metadataId = :metadataId and accessionId in ( :accessionIds )",paramMap,newRowCallbackHandler(){
this.namedJdbcTemplate.query("select accessionid, \""+method.getFieldName().toLowerCase()+"\" as traitvalue from \""+method.getId()
+"\" where metadataId = :metadataId and accessionId in ( :accessionIds )",paramMap,newRowCallbackHandler(){
this.jdbcTemplate.query(MessageFormat.format("SELECT `{0}`, COUNT(*) FROM `{1,number,#}` GROUP BY `{0}`",method.getFieldName(),method.getId()),
this.jdbcTemplate.query(MessageFormat.format("SELECT \"{0}\", COUNT(*) FROM \"{1,number,#}\" GROUP BY \"{0}\"",method.getFieldName().toLowerCase(),method.getId()),