Project

General

Profile

Revision 187bc599

ID187bc59960451ca043522adbaacd581debdb681a
Parent cb77e468
Child 2bcd23da

Added by Katja Luther almost 4 years ago

missing changes in taxonDao

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/TaxonDaoHibernateImpl.java
1562 1562
        return hql;
1563 1563
    }
1564 1564
    @Override
1565
    public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(Classification classification, List<UUID> excludeUuid, Integer limit, String pattern) {
1565
    public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(Classification classification, Integer limit, String pattern) {
1566 1566
        int classificationId = classification.getId();
1567 1567
        // StringBuffer excludeUuids = new StringBuffer();
1568 1568

  
1569 1569
         String queryString = "SELECT nodes.uuid, nodes.id, taxon.titleCache FROM TaxonNode AS nodes JOIN nodes.taxon as taxon WHERE nodes.classification.id = " + classificationId ;
1570
         if ( excludeUuid != null &&  !excludeUuid.isEmpty()){
1571
             queryString = queryString + " AND taxon.uuid NOT IN (:excludeUuid)" ;
1572
         }
1570

  
1573 1571
         if (pattern != null){
1574 1572
             pattern = pattern.replace("*", "%");
1575 1573
             queryString = queryString + " AND taxon.titleCache like (:pattern)" ;
......
1581 1579
         if (limit != null){
1582 1580
             query.setMaxResults(limit);
1583 1581
         }
1584
         if ( excludeUuid != null &&  !excludeUuid.isEmpty()){
1585
             query.setParameterList("excludeUuid", excludeUuid);
1586
         }
1582

  
1587 1583
         if (pattern != null){
1588 1584
             query.setParameter("pattern", pattern);
1589 1585
         }
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/taxon/ITaxonDao.java
502 502
     * @return
503 503
     */
504 504
    List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(
505
            Classification classification, List<UUID> excludeUuid, Integer limit, String pattern);
505
            Classification classification, Integer limit, String pattern);
506 506

  
507 507
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)