Project

General

Profile

« Previous | Next » 

Revision 48294

Delete file when claim is deleted and result has no other links| change semantics | change the openaireId generation

View differences:

ClaimHandler.java
259 259
            String sourceId =rs.getString(3);
260 260
            String targetType =rs.getString(4);
261 261
            String targetId =rs.getString(5);
262
            this.checkRecordFile(sourceType, sourceId);
263
            this.checkRecordFile(targetType, targetId);
264

  
262 265
            ArrayList<Object> params2 = new ArrayList<>();
263 266
            String query2 = queryGenerator.generateDeleteFullClaimQuery(claimId,user,sourceType,sourceId,targetType,targetId, params2);
264 267
            sqlDAO.executeUpdateQuery(query2, params2);
......
268 271
        rs.close();
269 272
    }
270 273

  
274
    public void checkRecordFile(String type, String id) throws SQLStoreException, SQLException {
275
        if(type.equals("publication") || type.equals("dataset")){
276
            this.resultHandler.deleteRecordFile(type,id);
277
        }
278
    }
271 279
    public boolean deleteClaim(String claimId) throws Exception, SQLStoreException {
272 280

  
273 281
        ArrayList<Object> params = new ArrayList<>();

Also available in: Unified diff