(no commit message)
[cdmlib.git] / cdmlib-io / src / main / java / eu / etaxonomy / cdm / io / berlinModel / out / mapper / DbExportMapperBase.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.out.mapper;
12
13 import java.sql.PreparedStatement;
14
15 import org.apache.log4j.Logger;
16
17 import eu.etaxonomy.cdm.io.berlinModel.out.BerlinModelExportState;
18 import eu.etaxonomy.cdm.io.berlinModel.out.DbExportState;
19
20 /**
21 * @author a.mueller
22 * @created 12.05.2009
23 * @version 1.0
24 */
25 /**
26 * @author a.mueller
27 * @created 12.05.2009
28 * @version 1.0
29 */
30 public class DbExportMapperBase<STATE extends DbExportState<?>> /*implements IDbExportMapper */{
31 @SuppressWarnings("unused")
32 private static final Logger logger = Logger.getLogger(DbExportMapperBase.class);
33
34 protected PreparedStatement preparedStatement = null;
35 protected int index = 0;
36 private STATE state;
37 private String tableName;
38
39
40
41
42 /* (non-Javadoc)
43 * @see eu.etaxonomy.cdm.io.berlinModel.out.mapper.IDbExportMapper#initialize(java.sql.PreparedStatement, int)
44 */
45 public void initialize(PreparedStatement stmt, IndexCounter index, STATE state, String tableName) {
46 this.preparedStatement = stmt;
47 this.index = index.getIncreasing();
48 this.state = state;
49 this.tableName = tableName;
50 }
51
52
53 /**
54 * @return the preparedStatement
55 */
56 public PreparedStatement getPreparedStatement() {
57 return preparedStatement;
58 }
59
60 /**
61 * @return the index
62 */
63 public int getIndex() {
64 return index;
65 }
66
67
68 /**
69 * @return the state
70 */
71 public STATE getState() {
72 return state;
73 }
74
75
76 /**
77 * @return the tableName
78 */
79 public String getTableName() {
80 return tableName;
81 }
82
83
84 /**
85 * @param tableName the tableName to set
86 */
87 public void setTableName(String tableName) {
88 this.tableName = tableName;
89 }
90 }