Project

General

Profile

« Previous | Next » 

Revision 60389

Query Generator:
context query: link with specific community or claimed in community's dashboard

View differences:

modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/claims/utils/QueryGenerator.java
803 803
    }
804 804

  
805 805
    public  String generateFetchClaimsByContext(String contextId,  Integer limit, Integer offset,String keyword, String orderBy, boolean desc, List<String> types, ArrayList<Object> params) {
806
        String clause=  "claim.source_id like ?";
806
        String clause=  "(claim.source_id like ? or claim.claimed_in_dashboard like ? )";
807 807
        ArrayList<Object> clauseParams = new ArrayList<>();
808 808
        clauseParams.add(contextId+'%');
809
        clauseParams.add("%_connect_" + contextId);
809 810
        String filterByType = addFilterByType(types, clauseParams);
810 811
        clause+= ((filterByType==null)?"":" and ("+filterByType+") ");
811 812
        String query = " select * from ("+" ( " +generateSelectclaimQuery(ClaimUtils.CONTEXT,ClaimUtils.PUBLICATION,limit, offset, orderBy,desc,clause,clauseParams, keyword, params)+")"+

Also available in: Unified diff