Mercurial > dive4elements > river
diff flys-backend/src/main/java/de/intevation/flys/importer/ImportWstColumn.java @ 478:db430bd9e0e0
Implemented a WstColumnValue cache to speed up inserting WST files into database.
flys-backend/trunk@1734 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 20 Apr 2011 07:21:03 +0000 |
parents | 3570e4af8cb2 |
children | 67fd63e4ef66 |
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportWstColumn.java Mon Apr 18 17:01:00 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportWstColumn.java Wed Apr 20 07:21:03 2011 +0000 @@ -2,6 +2,7 @@ import de.intevation.flys.model.Wst; import de.intevation.flys.model.WstColumn; +import de.intevation.flys.model.WstColumnValue; import de.intevation.flys.model.River; import org.hibernate.Session; @@ -9,6 +10,7 @@ import java.util.List; import java.util.ArrayList; +import java.util.Map; import java.math.BigDecimal; @@ -22,6 +24,8 @@ protected List<ImportWstColumnQRange> columnQRanges; protected List<ImportWstColumnValue> columnValues; + protected Map<WstColumnValueKey, WstColumnValue> wstCache; + protected WstColumn peer; public ImportWstColumn() { @@ -33,13 +37,15 @@ ImportWst wst, String name, String description, - Integer position + Integer position, + Map<WstColumnValueKey, WstColumnValue> wstCache ) { this(); this.wst = wst; this.name = name; this.description = description; this.position = position; + this.wstCache = wstCache; } public ImportWst getWst() { @@ -76,7 +82,7 @@ public void addColumnValue(BigDecimal position, BigDecimal w) { columnValues.add( - new ImportWstColumnValue(this, position, w)); + new ImportWstColumnValue(this, position, w, wstCache)); } public void addColumnQRange(ImportWstQRange columnQRange) {