Revision be6b41e5
Added by Andreas Müller over 4 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/erms/ErmsImportBase.java | ||
---|---|---|
77 | 77 |
//TODO needed? |
78 | 78 |
private Class cdmTargetClass; |
79 | 79 |
|
80 |
/** |
|
81 |
* @param dbTableName |
|
82 |
* @param dbTableName2 |
|
83 |
*/ |
|
84 | 80 |
public ErmsImportBase(String pluralString, String dbTableName, Class cdmTargetClass) { |
85 | 81 |
this.pluralString = pluralString; |
86 | 82 |
this.dbTableName = dbTableName; |
... | ... | |
323 | 319 |
/** |
324 | 320 |
* Returns a map that holds all values of a ResultSet. This is needed if a value needs to |
325 | 321 |
* be accessed twice |
326 |
* @param rs |
|
327 |
* @return |
|
328 |
* @throws SQLException |
|
329 | 322 |
*/ |
330 | 323 |
protected Map<String, Object> getValueMap(ResultSet rs) throws SQLException{ |
331 | 324 |
try{ |
... | ... | |
376 | 369 |
|
377 | 370 |
/** |
378 | 371 |
* Reads a foreign key field from the result set and adds its value to the idSet. |
379 |
* @param rs |
|
380 |
* @param teamIdSet |
|
381 |
* @throws SQLException |
|
382 | 372 |
*/ |
383 | 373 |
protected void handleForeignKey(ResultSet rs, Set<String> idSet, String attributeName) |
384 | 374 |
throws SQLException { |
... | ... | |
393 | 383 |
|
394 | 384 |
/** |
395 | 385 |
* Returns true if i is a multiple of recordsPerTransaction |
396 |
* @param i |
|
397 |
* @param recordsPerTransaction |
|
398 |
* @return |
|
399 | 386 |
*/ |
400 | 387 |
protected boolean loopNeedsHandling(int i, int recordsPerLoop) { |
401 | 388 |
startTransaction(); |
... | ... | |
405 | 392 |
protected void doLogPerLoop(int count, int recordsPerLog, String pluralString){ |
406 | 393 |
if ((count % recordsPerLog ) == 0 && count!= 0 ){ logger.info(pluralString + " handled: " + (count));} |
407 | 394 |
} |
408 |
|
|
409 | 395 |
} |
Also available in: Unified diff
cleanup