1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.io.common;
|
11
|
|
12
|
import java.sql.ResultSet;
|
13
|
import java.util.Map;
|
14
|
|
15
|
import org.springframework.transaction.TransactionStatus;
|
16
|
|
17
|
import eu.etaxonomy.cdm.api.service.IReferenceService;
|
18
|
import eu.etaxonomy.cdm.model.common.CdmBase;
|
19
|
|
20
|
|
21
|
/**
|
22
|
* @author a.mueller
|
23
|
* @since 16.02.2010
|
24
|
*/
|
25
|
public interface IPartitionedIO<STATE extends IPartitionedState> {
|
26
|
|
27
|
public final String ID_LIST_TOKEN = "@IdList";
|
28
|
|
29
|
//TODO make state more generic
|
30
|
public boolean doPartition(ResultSetPartitioner partitioner, STATE state);
|
31
|
|
32
|
public TransactionStatus startTransaction();
|
33
|
|
34
|
public void commitTransaction(TransactionStatus txStatus);
|
35
|
|
36
|
public String getPluralString();
|
37
|
|
38
|
/**
|
39
|
* @param rs
|
40
|
* @return
|
41
|
*/
|
42
|
public Map<Object, Map<String, ? extends CdmBase>> getRelatedObjectsForPartition(ResultSet rs, STATE state);
|
43
|
|
44
|
public IReferenceService getReferenceService();
|
45
|
|
46
|
}
|