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 eu.etaxonomy.cdm.api.service.IReferenceService;
|
16
|
import eu.etaxonomy.cdm.model.common.CdmBase;
|
17
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
18
|
|
19
|
/**
|
20
|
* This class represents all (import(?)) states used with an ResultSetPartitioner
|
21
|
* @author a.mueller
|
22
|
* @created 02.03.2010
|
23
|
*/
|
24
|
public interface IPartitionedState {
|
25
|
|
26
|
public void addRelatedObject(Object namespace, String id, CdmBase relatedObject);
|
27
|
|
28
|
/**
|
29
|
* Sets the related objects map. This usually does not need to be handled by the user
|
30
|
* but is called by the {@link ResultSetPartitioner result set partitioner}
|
31
|
* @param relatedObjects
|
32
|
*/
|
33
|
public void setRelatedObjects(Map<Object, Map<String, ? extends CdmBase>> relatedObjects);
|
34
|
|
35
|
/**
|
36
|
* Returns a related object defined by the namespace and the id.
|
37
|
* The related objects are computed in {@link IPartitionedIO#getRelatedObjectsForPartition(ResultSet)}
|
38
|
* @param namespace
|
39
|
* @param id
|
40
|
* @return
|
41
|
*/
|
42
|
public CdmBase getRelatedObject(Object namespace, String id);
|
43
|
|
44
|
public Reference getTransactionalSourceReference();
|
45
|
|
46
|
public void resetTransactionalSourceReference();
|
47
|
|
48
|
public void makeTransactionalSourceReference(IReferenceService service);
|
49
|
|
50
|
}
|