3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.cdm
.io
.common
;
13 import java
.sql
.ResultSet
;
16 import org
.springframework
.transaction
.TransactionStatus
;
18 import eu
.etaxonomy
.cdm
.api
.service
.IReferenceService
;
19 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
20 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
23 * This class represents all (import(?)) states used with an ResultSetPartitioner
28 public interface IPartitionedState
{
30 public void addRelatedObject(Object namespace
, String id
, CdmBase relatedObject
);
33 * Sets the related objects map. This usually does not need to be handled by the user
34 * but is called by the {@link ResultSetPartitioner result set partitioner}
35 * @param relatedObjects
37 public void setRelatedObjects(Map
<Object
, Map
<String
, CdmBase
>> relatedObjects
);
40 * Returns a related object defined by the namespace and the id.
41 * The related objects are computed in {@link IPartitionedIO#getRelatedObjectsForPartition(ResultSet)}
46 public CdmBase
getRelatedObject(Object namespace
, String id
);
48 public Reference
getTransactionalSourceReference();
50 public void resetTransactionalSourceReference();
52 public void makeTransactionalSourceReference(IReferenceService service
);