Project

General

Profile

1
package eu.dnetlib.validator.commons.dao.jobs;
2

    
3
import java.util.List;
4
import java.util.Map;
5

    
6
import eu.dnetlib.domain.functionality.validator.StoredJob;
7
import eu.dnetlib.validator.commons.dao.DAO;
8
import eu.dnetlib.validator.commons.dao.DaoException;
9
import eu.dnetlib.validator.commons.dao.rules.RuleStatus;
10

    
11
public interface JobsDAO extends DAO<StoredJob> {
12

    
13
	
14
	int deleteOld(String date, String period, String jobType) throws DaoException;
15

    
16
	int setJobFinished(int jobId,
17
			Map<String, Map<Integer, RuleStatus>> scoreMapPerGroupBy,
18
			String error, Boolean failed, int objsValidated, String validationType) throws DaoException;
19
	void setTotalJobFinished(int jobId, String error, Boolean failed) throws DaoException;
20

    
21
	void setStatus(int jobId, String status, int recordsTested, String validationType) throws DaoException;
22

    
23

    
24
	List<StoredJob> getJobs(String userName, String jobType, Integer offset, Integer limit, String dateFrom, String dateTo) throws DaoException;
25

    
26
	List<StoredJob> getJobs(String userName, String jobType, Integer offset, Integer limit, String dateFrom, String dateTo, String validationStatus) throws DaoException;
27

    
28
	int getJobsTotalNumber(String userName, String jobType) throws DaoException;
29

    
30
	int getJobsTotalNumber(String userName, String jobType, String validationStatus) throws DaoException;
31

    
32
	StoredJob getJobSummary(int jobId, String groupby) throws DaoException;
33

    
34
	//TODO update
35
	List<StoredJob> getUncompletedJobs() throws DaoException;
36
	
37
	int deleteUncompletedJobs() throws DaoException;
38
	
39
	
40
	void importOldJobs() throws DaoException;
41
	
42
	/*
43
	public Map<String, List<StoredJob>> getJobsOfUserSplitted(String userName);
44

    
45
	public boolean getJobError(int jobId);
46

    
47
	public void deleteOldCompatibilityTestsOnly(String date);
48
	
49
	public void deleteJobForRegistration(String activationId);
50

    
51
	public void deleteSemiCompletedRegistrationJobs(String activationId);
52
	
53
	public void deleteJobsForRegistration();
54

    
55

    
56
	*/
57

    
58
}
(2-2/3)