comparison backend/src/main/java/org/dive4elements/river/importer/common/AbstractKmLineImport.java @ 8988:ae76f618d990

Checks added for missing import directory
author mschaefer
date Sun, 08 Apr 2018 18:09:32 +0200
parents 50416a0df385
children ddebd4c2fe93
comparison
equal deleted inserted replaced
8987:5ff8ce9a2e06 8988:ae76f618d990
27 27
28 private KMTUPLE peer; 28 private KMTUPLE peer;
29 29
30 protected StoreMode storeMode; 30 protected StoreMode storeMode;
31 31
32
32 /***** CONSTRUCTOR *****/ 33 /***** CONSTRUCTOR *****/
33 34
34 public AbstractKmLineImport(final double km) { 35 public AbstractKmLineImport(final double km) {
35 this.station = km; 36 this.station = km;
37 this.storeMode = StoreMode.NONE;
36 } 38 }
37 39
38 40
39 /***** METHODS *****/ 41 /***** METHODS *****/
40 42
50 /** 52 /**
51 * Gets the station value record from the database if existing, or creates a database record from this object and adds 53 * Gets the station value record from the database if existing, or creates a database record from this object and adds
52 * it 54 * it
53 */ 55 */
54 protected KMTUPLE getPeer(final SERIES parent, final StoreMode parentStoreMode) { 56 protected KMTUPLE getPeer(final SERIES parent, final StoreMode parentStoreMode) {
55 if (this.peer != null) { 57 if (this.peer != null)
56 this.storeMode = StoreMode.NONE;
57 return this.peer; 58 return this.peer;
58 }
59 final Session session = ImporterSession.getInstance().getDatabaseSession(); 59 final Session session = ImporterSession.getInstance().getDatabaseSession();
60 KMTUPLE value = null; 60 KMTUPLE value = null;
61 if (parentStoreMode != StoreMode.INSERT) { 61 if (parentStoreMode != StoreMode.INSERT) {
62 value = queryValueItem(session, parent); 62 value = queryValueItem(session, parent);
63 } 63 }

http://dive4elements.wald.intevation.org