partitioner for BM import
[cdmlib.git] / cdmlib-io / src / main / java / eu / etaxonomy / cdm / io / berlinModel / in / IPartitionedIO.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
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.
9 */
10
11 package eu.etaxonomy.cdm.io.berlinModel.in;
12
13 import java.sql.ResultSet;
14 import java.util.Map;
15
16 import org.springframework.transaction.TransactionStatus;
17
18 import eu.etaxonomy.cdm.model.common.CdmBase;
19
20
21 /**
22 * @author a.mueller
23 * @created 16.02.2010
24 * @version 1.0
25 */
26 public interface IPartitionedIO {
27
28 //TODO make state more generic
29 public boolean doPartition(ResultSetPartitioner partitioner, BerlinModelImportState state);
30
31 public TransactionStatus startTransaction();
32
33 public void commitTransaction(TransactionStatus txStatus);
34
35 /**
36 * @param rs
37 * @return
38 */
39 public Map<Object, Map<String, ? extends CdmBase>> getRelatedObjectsForPartition(ResultSet rs);
40 }