Mercurial > lada > lada-server
changeset 1028:1c41c7b8f7c2 schema-update
Updated server application to new database model. THIS IS STILL WIP!!!
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/exporter/laf/LafCreator.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/exporter/laf/LafCreator.java Fri Jul 08 15:32:36 2016 +0200 @@ -15,19 +15,18 @@ import javax.inject.Named; import de.intevation.lada.exporter.Creator; -import de.intevation.lada.model.land.LKommentarM; -import de.intevation.lada.model.land.LKommentarP; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LMesswert; -import de.intevation.lada.model.land.LOrtszuordnung; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.LZusatzWert; -import de.intevation.lada.model.land.ProbeTranslation; -import de.intevation.lada.model.stamm.MessEinheit; -import de.intevation.lada.model.stamm.Messgroesse; -import de.intevation.lada.model.stamm.ProbenZusatz; -import de.intevation.lada.model.stamm.Probenart; -import de.intevation.lada.model.stamm.Ort; +import de.intevation.lada.model.land.KommentarM; +import de.intevation.lada.model.land.KommentarP; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Messwert; +import de.intevation.lada.model.land.Ortszuordnung; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.land.ZusatzWert; +import de.intevation.lada.model.stammdaten.MessEinheit; +import de.intevation.lada.model.stammdaten.Messgroesse; +import de.intevation.lada.model.stammdaten.ProbenZusatz; +import de.intevation.lada.model.stammdaten.Probenart; +import de.intevation.lada.model.stammdaten.Ort; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -70,11 +69,11 @@ * @return LAF conform string. */ private String probeToLAF(String probeId) { - Response found = repository.getById(LProbe.class, Integer.valueOf(probeId), "land"); + Response found = repository.getById(Probe.class, Integer.valueOf(probeId), "land"); if (found.getData() == null) { return null; } - LProbe aProbe = (LProbe)found.getData(); + Probe aProbe = (Probe)found.getData(); String lafProbe = writeAttributes(aProbe); return lafProbe; } @@ -86,14 +85,14 @@ * @return LAF conform string. */ @SuppressWarnings("unchecked") - private String writeAttributes(LProbe probe) { + private String writeAttributes(Probe probe) { DateFormat format = new SimpleDateFormat("yyyyMMdd HHmm"); - QueryBuilder<LKommentarP> kommBuilder = - new QueryBuilder<LKommentarP>( - repository.entityManager("land"), LKommentarP.class); + QueryBuilder<KommentarP> kommBuilder = + new QueryBuilder<KommentarP>( + repository.entityManager("land"), KommentarP.class); kommBuilder.and("probeId", probe.getId()); Response kommentar = repository.filter(kommBuilder.getQuery(), "land"); - List<LKommentarP> kommentare = (List<LKommentarP>)kommentar.getData(); + List<KommentarP> kommentare = (List<KommentarP>)kommentar.getData(); QueryBuilder<Probenart> builder = new QueryBuilder<Probenart>( @@ -106,27 +105,21 @@ "stamm").getData(); String probenart = probenarten.get(0).getProbenart(); - QueryBuilder<LZusatzWert> zusatzBuilder = - new QueryBuilder<LZusatzWert>( - repository.entityManager("land"), LZusatzWert.class); + QueryBuilder<ZusatzWert> zusatzBuilder = + new QueryBuilder<ZusatzWert>( + repository.entityManager("land"), ZusatzWert.class); zusatzBuilder.and("probeId", probe.getId()); Response zusatz = repository.filter(zusatzBuilder.getQuery(), "land"); - List<LZusatzWert> zusatzwerte = (List<LZusatzWert>)zusatz.getData(); + List<ZusatzWert> zusatzwerte = (List<ZusatzWert>)zusatz.getData(); - QueryBuilder<ProbeTranslation> transBuilder = - new QueryBuilder<ProbeTranslation>( - repository.entityManager("land"), ProbeTranslation.class); - transBuilder.and("probe", probe.getId()); - Response trans = repository.filter(transBuilder.getQuery(), "land"); - List<ProbeTranslation> translation = (List<ProbeTranslation>)trans.getData(); String laf = ""; laf += probe.getDatenbasisId() == null ? "": lafLine("DATENBASIS_S", probe.getDatenbasisId().toString()); - laf += probe.getNetzbetreiberId() == null ? - "" : lafLine("NETZKENNUNG", probe.getNetzbetreiberId()); + //laf += probe.getNetzbetreiberId() == null ? + // "" : lafLine("NETZKENNUNG", probe.getNetzbetreiberId()); laf += probe.getMstId() == null ? "" : lafLine("MESSSTELLE", probe.getMstId()); - laf += lafLine("PROBE_ID", translation.get(0).getProbeIdAlt()); + laf += lafLine("PROBE_ID", probe.getIdAlt()); laf += lafLine("HAUPTPROBENNUMMER", probe.getHauptprobenNr()); laf += probe.getBaId() == null ? "" : lafLine("MESSPROGRAMM_S", "\"" + probe.getBaId() + "\""); @@ -153,10 +146,10 @@ "" : lafLine("DESKRIPTOREN", "\"" + probe.getMediaDesk() + "\""); laf += probe.getTest() == Boolean.TRUE ? lafLine("TESTDATEN", "1") : lafLine("TESTDATEN", "0"); - for (LZusatzWert zw : zusatzwerte) { + for (ZusatzWert zw : zusatzwerte) { laf += writeZusatzwert(zw); } - for (LKommentarP kp : kommentare) { + for (KommentarP kp : kommentare) { laf += writeKommentar(kp); } laf += writeMessung(probe); @@ -171,7 +164,7 @@ * @return Single LAF line. */ @SuppressWarnings("unchecked") - private String writeZusatzwert(LZusatzWert zw) { + private String writeZusatzwert(ZusatzWert zw) { QueryBuilder<ProbenZusatz> builder = new QueryBuilder<ProbenZusatz>( repository.entityManager("stamm"), @@ -184,7 +177,7 @@ String value = "\"" + zusatz.get(0).getBeschreibung() + "\""; value += " " + zw.getMesswertPzs(); - value += " " + zusatz.get(0).getMehId(); + value += " " + zusatz.get(0).getMessEinheitId(); value += " " + zw.getMessfehler(); return lafLine("PZB_S", value); } @@ -196,18 +189,18 @@ * @return LAF conform string */ @SuppressWarnings("unchecked") - private String writeOrt(LProbe probe) { - QueryBuilder<LOrtszuordnung> builder = - new QueryBuilder<LOrtszuordnung>( + private String writeOrt(Probe probe) { + QueryBuilder<Ortszuordnung> builder = + new QueryBuilder<Ortszuordnung>( repository.entityManager("land"), - LOrtszuordnung.class); + Ortszuordnung.class); builder.and("probeId", probe.getId()); Response objects = repository.filter(builder.getQuery(), "land"); - List<LOrtszuordnung> orte = - (List<LOrtszuordnung>)objects.getData(); + List<Ortszuordnung> orte = + (List<Ortszuordnung>)objects.getData(); String laf = ""; - for(LOrtszuordnung o : orte) { + for(Ortszuordnung o : orte) { laf += "%ORT%\n"; QueryBuilder<Ort> oBuilder = new QueryBuilder<Ort>( @@ -242,9 +235,9 @@ * @param kp The {@link LKommentarP} object. * @return Single LAF line. */ - private String writeKommentar(LKommentarP kp) { + private String writeKommentar(KommentarP kp) { DateFormat format = new SimpleDateFormat("yyyyMMdd HHmm"); - String value = "\"" + kp.getErzeuger() + "\" " + + String value = "\"" + kp.getMstId() + "\" " + format.format(kp.getDatum()) + " " + "\"" + kp.getText() + "\""; return lafLine("PROBENKOMMENTAR", value); @@ -257,32 +250,32 @@ * @return LAF conform string. */ @SuppressWarnings("unchecked") - private String writeMessung(LProbe probe) { + private String writeMessung(Probe probe) { DateFormat format = new SimpleDateFormat("yyyyMMdd HHmm"); // Get all messungen - QueryBuilder<LMessung> builder = - new QueryBuilder<LMessung>( + QueryBuilder<Messung> builder = + new QueryBuilder<Messung>( repository.entityManager("land"), - LMessung.class); + Messung.class); builder.and("probeId", probe.getId()); Response objects = repository.filter(builder.getQuery(), "land"); - List<LMessung> mess = (List<LMessung>)objects.getData(); + List<Messung> mess = (List<Messung>)objects.getData(); String laf = ""; - for(LMessung m : mess) { + for(Messung m : mess) { laf += "%MESSUNG%\n"; - QueryBuilder<LMesswert> wertBuilder = - new QueryBuilder<LMesswert>( - repository.entityManager("land"), LMesswert.class); + QueryBuilder<Messwert> wertBuilder = + new QueryBuilder<Messwert>( + repository.entityManager("land"), Messwert.class); wertBuilder.and("messungsId", m.getId()); Response messw = repository.filter(wertBuilder.getQuery(), "land"); - List<LMesswert> werte = (List<LMesswert>)messw.getData(); - QueryBuilder<LKommentarM> kommBuilder = - new QueryBuilder<LKommentarM>( - repository.entityManager("land"), LKommentarM.class); + List<Messwert> werte = (List<Messwert>)messw.getData(); + QueryBuilder<KommentarM> kommBuilder = + new QueryBuilder<KommentarM>( + repository.entityManager("land"), KommentarM.class); kommBuilder.and("messungsId", m.getId()); Response kommentar = repository.filter(kommBuilder.getQuery(), "land"); - List<LKommentarM> kommentare = (List<LKommentarM>)kommentar.getData(); + List<KommentarM> kommentare = (List<KommentarM>)kommentar.getData(); laf += lafLine("MESSUNGS_ID", m.getId().toString()); laf += lafLine("NEBENPROBENNUMMER", m.getNebenprobenNr()); laf += m.getMesszeitpunkt() == null ? @@ -293,10 +286,10 @@ "" : lafLine("MESSZEIT_SEKUNDEN", m.getMessdauer().toString()); laf += m.getMmtId() == null ? "" : lafLine("MESSMETHODE_S", m.getMmtId()); - for (LMesswert mw : werte) { + for (Messwert mw : werte) { laf += writeMesswert(mw); } - for (LKommentarM mk: kommentare) { + for (KommentarM mk: kommentare) { laf += writeKommentar(mk); } } @@ -308,9 +301,9 @@ * @param mk The {@link LKommentarM} object. * @return Single LAF line. */ - private String writeKommentar(LKommentarM mk) { + private String writeKommentar(KommentarM mk) { DateFormat format = new SimpleDateFormat("yyyyMMdd HHmm"); - String value = "\"" + mk.getErzeuger() + "\" " + + String value = "\"" + mk.getMstId() + "\" " + format.format(mk.getDatum()) + " " + "\"" + mk.getText() + "\""; return lafLine("KOMMENTAR", value); @@ -322,7 +315,7 @@ * @return Single LAF line. */ @SuppressWarnings("unchecked") - private String writeMesswert(LMesswert mw) { + private String writeMesswert(Messwert mw) { QueryBuilder<Messgroesse> builder = new QueryBuilder<Messgroesse>( repository.entityManager("stamm"),
--- a/src/main/java/de/intevation/lada/exporter/laf/LafExporter.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/exporter/laf/LafExporter.java Fri Jul 08 15:32:36 2016 +0200 @@ -17,7 +17,6 @@ import de.intevation.lada.exporter.ExportConfig; import de.intevation.lada.exporter.ExportFormat; import de.intevation.lada.exporter.Exporter; -import de.intevation.lada.model.land.LProbe; import de.intevation.lada.util.auth.UserInfo; /**
--- a/src/main/java/de/intevation/lada/factory/ProbeFactory.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/factory/ProbeFactory.java Fri Jul 08 15:32:36 2016 +0200 @@ -17,19 +17,17 @@ import org.apache.log4j.Logger; -import de.intevation.lada.model.land.LKommentarP; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LMesswert; -import de.intevation.lada.model.land.LOrtszuordnung; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.LStatusProtokoll; +import de.intevation.lada.model.land.KommentarP; import de.intevation.lada.model.land.Messprogramm; import de.intevation.lada.model.land.MessprogrammMmt; -import de.intevation.lada.model.land.MessungTranslation; -import de.intevation.lada.model.land.ProbeTranslation; -import de.intevation.lada.model.stamm.DeskriptorUmwelt; -import de.intevation.lada.model.stamm.Deskriptoren; -import de.intevation.lada.model.stamm.Ort; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Messwert; +import de.intevation.lada.model.land.Ortszuordnung; +import de.intevation.lada.model.land.StatusProtokoll; +import de.intevation.lada.model.stammdaten.DeskriptorUmwelt; +import de.intevation.lada.model.stammdaten.Deskriptoren; +import de.intevation.lada.model.stammdaten.Ort; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -62,7 +60,7 @@ * * @return List of probe objects. */ - public List<LProbe> create(String id, Long from, Long to) { + public List<Probe> create(String id, Long from, Long to) { QueryBuilder<Messprogramm> builder = new QueryBuilder<Messprogramm>( repository.entityManager("land"), @@ -80,7 +78,7 @@ start.setTime(new Date(from)); Calendar end = Calendar.getInstance(); end.setTime(new Date (to)); - List<LProbe> proben = new ArrayList<LProbe>(); + List<Probe> proben = new ArrayList<Probe>(); if ("M".equals(messprogramm.getProbenintervall())) { @@ -105,7 +103,7 @@ } /** - * Create LProbe objects using the interval and messprogramm details. + * Create Probe objects using the interval and messprogramm details. * * @param interval The time interval for probe objects. * @param messprogramm The messprogramm containing details. @@ -116,7 +114,7 @@ private void createProben( Date[] interval, Messprogramm messprogramm, - List<LProbe> proben + List<Probe> proben ) { Calendar start = Calendar.getInstance(); start.setTime(interval[0]); @@ -148,7 +146,7 @@ Date startDate = start.getTime(); end.add(Calendar.DATE, messprogramm.getTeilintervallBis() - endDay + messprogramm.getIntervallOffset()); Date endDate = end.getTime(); - LProbe probe = createObjects(messprogramm, startDate, endDate); + Probe probe = createObjects(messprogramm, startDate, endDate); if (probe != null) { proben.add(probe); } @@ -156,7 +154,7 @@ } } - private List<LProbe> generateMonth( + private List<Probe> generateMonth( Messprogramm messprogramm, Calendar start, Calendar end, @@ -170,7 +168,7 @@ 0 : messprogramm.getTeilintervallBis(); int manualDuration = teilBis - teilVon; - List<LProbe> proben = new ArrayList<LProbe>(); + List<Probe> proben = new ArrayList<Probe>(); int currentLength = getDurationMonth(start); if (manualDuration > 0) { @@ -184,7 +182,7 @@ for (;monthStart.before(end);) { if (monthStart.get(Calendar.DAY_OF_YEAR) > messprogramm.getGueltigVon() && monthStart.get(Calendar.DAY_OF_YEAR) < messprogramm.getGueltigBis()) { - LProbe probe = createObjects(messprogramm, monthStart.getTime(), monthEnd.getTime()); + Probe probe = createObjects(messprogramm, monthStart.getTime(), monthEnd.getTime()); if (probe != null) { proben.add(probe); } @@ -202,7 +200,7 @@ return proben; } - private List<LProbe> generateQuarter( + private List<Probe> generateQuarter( Messprogramm messprogramm, Calendar start, Calendar end, @@ -216,7 +214,7 @@ 0 : messprogramm.getTeilintervallBis(); int manualDuration = teilBis - teilVon; - List<LProbe> proben = new ArrayList<LProbe>(); + List<Probe> proben = new ArrayList<Probe>(); int currentLength = getDurationQuarter(start); if (manualDuration > 0) { @@ -230,7 +228,7 @@ for (;quarterStart.before(end);) { if (quarterStart.get(Calendar.DAY_OF_YEAR) > messprogramm.getGueltigVon() && quarterStart.get(Calendar.DAY_OF_YEAR) < messprogramm.getGueltigBis()) { - LProbe probe = createObjects(messprogramm, quarterStart.getTime(), quarterEnd.getTime()); + Probe probe = createObjects(messprogramm, quarterStart.getTime(), quarterEnd.getTime()); if (probe != null) { proben.add(probe); } @@ -248,7 +246,7 @@ return proben; } - private List<LProbe> generateHalf( + private List<Probe> generateHalf( Messprogramm messprogramm, Calendar start, Calendar end, @@ -262,7 +260,7 @@ 0 : messprogramm.getTeilintervallBis(); int manualDuration = teilBis - teilVon; - List<LProbe> proben = new ArrayList<LProbe>(); + List<Probe> proben = new ArrayList<Probe>(); int currentLength = getDurationHalf(start); if (manualDuration > 0) { @@ -276,7 +274,7 @@ for (;halfStart.before(end);) { if (halfStart.get(Calendar.DAY_OF_YEAR) > messprogramm.getGueltigVon() && halfStart.get(Calendar.DAY_OF_YEAR) < messprogramm.getGueltigBis()) { - LProbe probe = createObjects(messprogramm, halfStart.getTime(), halfEnd.getTime()); + Probe probe = createObjects(messprogramm, halfStart.getTime(), halfEnd.getTime()); if (probe != null) { proben.add(probe); } @@ -294,7 +292,7 @@ return proben; } - private List<LProbe> generate( + private List<Probe> generate( Messprogramm messprogramm, Calendar start, Calendar end, @@ -309,7 +307,7 @@ //int teilStart = messprogramm.getTeilintervallVon() + startDay; //int teilEnd = messprogramm.getTeilintervallBis() + startDay; - List<LProbe> proben = new ArrayList<LProbe>(); + List<Probe> proben = new ArrayList<Probe>(); int duration = messprogramm.getTeilintervallBis() - messprogramm.getTeilintervallVon(); @@ -321,7 +319,7 @@ end.set(Calendar.DAY_OF_YEAR, startDay + duration); logger.debug("from: " + start.getTime() + " to " + end.getTime()); startDay += days; - LProbe probe = createObjects(messprogramm, start.getTime(), end.getTime()); + Probe probe = createObjects(messprogramm, start.getTime(), end.getTime()); if (probe != null) { proben.add(probe); } @@ -437,32 +435,31 @@ * * @return The new probe object. */ - private LProbe createObjects( + private Probe createObjects( Messprogramm messprogramm, Date startDate, Date endDate ) { - QueryBuilder<LProbe> builderProbe = - new QueryBuilder<LProbe>( + QueryBuilder<Probe> builderProbe = + new QueryBuilder<Probe>( repository.entityManager("land"), - LProbe.class); + Probe.class); builderProbe.and("mprId", messprogramm.getId()); builderProbe.and("solldatumBeginn", startDate); builderProbe.and("solldatumEnde", endDate); - List<LProbe> proben = + List<Probe> proben = repository.filterPlain(builderProbe.getQuery(), "land"); if (!proben.isEmpty()) { return null; } - LProbe probe = new LProbe(); + Probe probe = new Probe(); probe.setBaId(messprogramm.getBaId()); probe.setDatenbasisId(messprogramm.getDatenbasisId()); probe.setMediaDesk(messprogramm.getMediaDesk()); probe.setMstId(messprogramm.getMstId()); probe.setLaborMstId(messprogramm.getLaborMstId()); - probe.setNetzbetreiberId(messprogramm.getNetzbetreiberId()); probe.setProbenartId(messprogramm.getProbenartId()); probe.setProbeNehmerId(messprogramm.getProbeNehmerId()); probe.setSolldatumBeginn(new Timestamp(startDate.getTime())); @@ -471,17 +468,14 @@ probe.setUmwId(messprogramm.getUmwId()); probe.setMprId(messprogramm.getId()); repository.create(probe, "land"); - ProbeTranslation translation = new ProbeTranslation(); - translation.setProbeId(probe); - repository.create(translation, "land"); if (messprogramm.getProbeKommentar() != null && !messprogramm.getProbeKommentar().equals("")) { - LKommentarP kommentar = new LKommentarP(); + KommentarP kommentar = new KommentarP(); kommentar.setDatum(new Timestamp(new Date().getTime())); kommentar.setProbeId(probe.getId()); kommentar.setText(messprogramm.getProbeKommentar()); - kommentar.setErzeuger(messprogramm.getMstId()); + kommentar.setMstId(messprogramm.getMstId()); repository.create(kommentar, "land"); } @@ -495,30 +489,26 @@ @SuppressWarnings("unchecked") List<MessprogrammMmt> mmts = (List<MessprogrammMmt>)response.getData(); for (MessprogrammMmt mmt : mmts) { - LMessung messung = new LMessung(); + Messung messung = new Messung(); messung.setFertig(false); messung.setGeplant(true); messung.setMmtId(mmt.getMmtId()); messung.setNebenprobenNr( - messprogramm.getNetzbetreiberId() + mmt.getMmtId()); + messprogramm.getMstId() + mmt.getMmtId()); messung.setProbeId(probe.getId()); repository.create(messung, "land"); - MessungTranslation mTranslation = new MessungTranslation(); - mTranslation.setMessungsId(messung); - repository.create(mTranslation, "land"); - LStatusProtokoll status = new LStatusProtokoll(); + StatusProtokoll status = new StatusProtokoll(); status.setDatum(new Timestamp(new Date().getTime())); status.setMessungsId(messung.getId()); - status.setErzeuger(probe.getMstId()); - status.setStatusStufe(1); - status.setStatusWert(0); + status.setMstId(probe.getMstId()); + status.setStatusKombi(1); repository.create(status, "land"); messung.setStatus(status.getId()); repository.update(messung, "land"); for (int mw : mmt.getMessgroessen()) { - LMesswert wert = new LMesswert(); + Messwert wert = new Messwert(); wert.setMessgroesseId(mw); wert.setMessungsId(messung.getId()); wert.setMesswert(0d); @@ -528,7 +518,7 @@ } if (messprogramm.getOrtId() != null && !messprogramm.getOrtId().equals("")) { - LOrtszuordnung ort = new LOrtszuordnung(); + Ortszuordnung ort = new Ortszuordnung(); ort.setOrtszuordnungTyp("E"); ort.setProbeId(probe.getId()); QueryBuilder<Ort> ortBuilder = new QueryBuilder<Ort>( @@ -544,7 +534,7 @@ } // Reolad the probe to have the old id probe = - (LProbe)repository.getById(LProbe.class, probe.getId(), "land").getData(); + (Probe)repository.getById(Probe.class, probe.getId(), "land").getData(); return probe; } @@ -649,7 +639,7 @@ * * @return The updated probe object. */ - public LProbe findUmweltId(LProbe probe) { + public Probe findUmweltId(Probe probe) { String[] mediaDesk = probe.getMediaDesk().split(" "); if (mediaDesk.length <= 1) { return probe; @@ -665,7 +655,7 @@ * * @return The updated probe object. */ - public LProbe findMediaDesk(LProbe probe) { + public Probe findMediaDesk(Probe probe) { Object result = repository.queryFromString( "SELECT get_media_from_media_desk( :mediaDesk );", "stamm") .setParameter("mediaDesk", probe.getMediaDesk())
--- a/src/main/java/de/intevation/lada/importer/laf/AttributeMapper.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/importer/laf/AttributeMapper.java Fri Jul 08 15:32:36 2016 +0200 @@ -20,20 +20,18 @@ import javax.inject.Inject; import de.intevation.lada.importer.ReportItem; -import de.intevation.lada.model.land.LKommentarM; -import de.intevation.lada.model.land.LKommentarP; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LMesswert; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.LZusatzWert; -import de.intevation.lada.model.land.MessungTranslation; -import de.intevation.lada.model.land.ProbeTranslation; -import de.intevation.lada.model.stamm.Datenbasis; -import de.intevation.lada.model.stamm.MessEinheit; -import de.intevation.lada.model.stamm.Messgroesse; -import de.intevation.lada.model.stamm.ProbenZusatz; -import de.intevation.lada.model.stamm.Probenart; -import de.intevation.lada.model.stamm.Umwelt; +import de.intevation.lada.model.land.KommentarM; +import de.intevation.lada.model.land.KommentarP; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Messwert; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.land.ZusatzWert; +import de.intevation.lada.model.stammdaten.Datenbasis; +import de.intevation.lada.model.stammdaten.MessEinheit; +import de.intevation.lada.model.stammdaten.Messgroesse; +import de.intevation.lada.model.stammdaten.ProbenZusatz; +import de.intevation.lada.model.stammdaten.Probenart; +import de.intevation.lada.model.stammdaten.Umwelt; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -83,7 +81,7 @@ * @return The updated entity object. */ @SuppressWarnings("unchecked") - public LProbe addAttribute(String key, Object value, LProbe probe) { + public Probe addAttribute(String key, Object value, Probe probe) { DateFormat format = new SimpleDateFormat("yyyyMMdd HHmm"); if ("datenbasis_s".equals(key) && probe.getDatenbasisId() == null) { Integer v = Integer.valueOf(value.toString()); @@ -120,10 +118,6 @@ probe.setMprId(v); } - if ("netzkennung".equals(key)) { - probe.setNetzbetreiberId(value.toString()); - } - if ("messstelle".equals(key)) { probe.setMstId(value.toString()); } @@ -234,7 +228,7 @@ * @param value The value to set. * @param probeTranslation The entity object. * @return The updated entity. - */ + * @SuppressWarnings("unchecked") public ProbeTranslation addAttribute( String key, @@ -256,7 +250,7 @@ probeTranslation.setProbeIdAlt(value.toString()); } return probeTranslation; - } + }*/ /** * Add an attribute to the given LKommentarP object. @@ -266,10 +260,10 @@ * @param kommentar The entity object. * @return The updated entity object. */ - public LKommentarP addAttribute( + public KommentarP addAttribute( String key, Object value, - LKommentarP kommentar + KommentarP kommentar ) { DateFormat format = new SimpleDateFormat("yyyyMMdd HHmm"); String v = value.toString(); @@ -284,7 +278,7 @@ this.warnings.add(new ReportItem(key, value.toString(), 674)); } String text = v.substring(23, v.length() -1); - kommentar.setErzeuger(erzeuger); + kommentar.setMstId(erzeuger); kommentar.setText(text); return kommentar; } @@ -297,10 +291,10 @@ * @param kommentar The entity object. * @return The updated entity object. */ - public LKommentarM addAttribute( + public KommentarM addAttribute( String key, Object value, - LKommentarM kommentar + KommentarM kommentar ) { DateFormat format = new SimpleDateFormat("yyyyMMdd HHmm"); String v = value.toString(); @@ -315,7 +309,7 @@ this.warnings.add(new ReportItem(key, value.toString(), 674)); } String text = v.substring(23, v.length() -1); - kommentar.setErzeuger(erzeuger); + kommentar.setMstId(erzeuger); kommentar.setText(text); return kommentar; } @@ -328,10 +322,10 @@ * @param messung The entity object. * @return The updated entity object. */ - public LMessung addAttribute( + public Messung addAttribute( String key, Object value, - LMessung messung + Messung messung ) { DateFormat format = new SimpleDateFormat("yyyyMMdd HHmm"); if ("nebenprobennummer".equals(key)) { @@ -374,7 +368,7 @@ * @param value The value to set. * @param mt The entity object. * @return The updated entity. - */ + * public MessungTranslation addAttribute( String key, Object value, @@ -385,6 +379,7 @@ } return mt; } + */ /** * Add an attribute to the given LMesswert object. @@ -395,10 +390,10 @@ * @return The updated entity object. */ @SuppressWarnings("unchecked") - public LMesswert addAttribute( + public Messwert addAttribute( String key, Object value, - LMesswert messwert + Messwert messwert ) { Pattern p = Pattern.compile( "(\".+\")( .+ )(\".+\")( .*)( .{1,12})( .{1,9})(.{0,9})(.{0,3})"); @@ -521,10 +516,10 @@ * @return The updated entity object. */ @SuppressWarnings("unchecked") - public LZusatzWert addAttribute( + public ZusatzWert addAttribute( String lKey, Object value, - LZusatzWert wert + ZusatzWert wert ) { String v = value.toString().substring(1); int ndx = v.indexOf("\""); @@ -564,10 +559,10 @@ * @param wert The entity object. * @return The updated entity object. */ - public LZusatzWert addAttributeS( + public ZusatzWert addAttributeS( String lKey, Object value, - LZusatzWert wert + ZusatzWert wert ) { String v = value.toString().substring(1); int ndx = v.indexOf("\"");
--- a/src/main/java/de/intevation/lada/importer/laf/LafParser.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/importer/laf/LafParser.java Fri Jul 08 15:32:36 2016 +0200 @@ -17,9 +17,9 @@ import org.apache.log4j.Logger; import de.intevation.lada.importer.ReportItem; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LOrtszuordnung; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Ortszuordnung; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.util.auth.UserInfo; import de.intevation.lada.validation.Validator; import de.intevation.lada.validation.Violation; @@ -183,8 +183,8 @@ * @param auth The authentication information. */ private void writeAll(UserInfo userInfo) { - String probeId = producer.getProbeTranslation().getProbeIdAlt() == null ? - "probeId" : producer.getProbeTranslation().getProbeIdAlt().toString(); + String probeId = producer.getProbe().getIdAlt() == null ? + "probeId" : producer.getProbe().getIdAlt().toString(); Violation violation = validateProbe(producer.getProbe()); if (violation.hasErrors()) { ReportItem err = new ReportItem("validation", violation.getErrors(), null); @@ -193,13 +193,13 @@ this.appendErrors(probeId, errs); return; } - boolean p = writer.writeProbe(userInfo, producer.getProbe(), producer.getProbeTranslation()); + boolean p = writer.writeProbe(userInfo, producer.getProbe()); if (!p) { this.errors.put(probeId, writer.getErrors()); return; } writer.writeProbenKommentare(userInfo, producer.getProbenKommentare()); - for (LMessung messung: producer.getMessungen().keySet()) { + for (Messung messung: producer.getMessungen()) { messung.setProbeId(producer.getProbe().getId()); Violation mViolation = messungValidator.validate(messung); if (mViolation.hasErrors()) { @@ -209,13 +209,13 @@ this.appendErrors(probeId, mErrs); continue; } - boolean m = writer.writeMessungen(userInfo, messung, producer.getMessungen().get(messung)); + boolean m = writer.writeMessungen(userInfo, messung); if (!m) { return; } } writer.writeOrte(userInfo, producer.getOrte()); - for (LOrtszuordnung ort: producer.getLOrte()) { + for (Ortszuordnung ort: producer.getOrtszuordnungen()) { Violation oViolation = ortValidator.validate(ort); if (oViolation.hasErrors()) { ReportItem oErr = new ReportItem("validation", oViolation.getErrors(), null); @@ -224,7 +224,7 @@ this.appendErrors(probeId, oErrs); continue; } - writer.writeLOrte(userInfo, ort); + writer.writeOrtszuordung(userInfo, ort); } writer.writeMessungKommentare(userInfo, producer.getMessungsKommentare()); writer.writeMesswerte(userInfo, producer.getMesswerte()); @@ -235,7 +235,7 @@ warns.add(warn); this.appendWarnings(probeId, warns); } - for (LMessung messung: producer.getMessungen().keySet()) { + for (Messung messung: producer.getMessungen()) { Violation mViolation = messungValidator.validate(messung); if (mViolation.hasWarnings()) { ReportItem mWarn = new ReportItem("validation", mViolation.getWarnings(), null); @@ -251,7 +251,7 @@ * * @param probe The probe object to validate. */ - private Violation validateProbe(LProbe probe) { + private Violation validateProbe(Probe probe) { return probeValidator.validate(probe); }
--- a/src/main/java/de/intevation/lada/importer/laf/LafProducer.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/importer/laf/LafProducer.java Fri Jul 08 15:32:36 2016 +0200 @@ -15,16 +15,14 @@ import javax.inject.Inject; import de.intevation.lada.importer.ReportItem; -import de.intevation.lada.model.land.LKommentarM; -import de.intevation.lada.model.land.LKommentarP; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LMesswert; -import de.intevation.lada.model.land.LOrtszuordnung; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.LZusatzWert; -import de.intevation.lada.model.land.MessungTranslation; -import de.intevation.lada.model.land.ProbeTranslation; -import de.intevation.lada.model.stamm.Ort; +import de.intevation.lada.model.land.KommentarM; +import de.intevation.lada.model.land.KommentarP; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Messwert; +import de.intevation.lada.model.land.Ortszuordnung; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.land.ZusatzWert; +import de.intevation.lada.model.stammdaten.Ort; /** * The LAFProducer creates entity objects form key-value pairs using the @@ -37,22 +35,12 @@ /** * The probe object created by this producer. */ - private LProbe probe; - - /** - * The probe translation object created by this producer. - */ - private ProbeTranslation probeTranslation; + private Probe probe; /** * The messung object created by this producer. */ - private LMessung messung; - - /** - * The messung translation object created by this producer. - */ - private MessungTranslation messungTranslation; + private Messung messung; /** * Creator used to build ort objects. @@ -63,22 +51,22 @@ /** * Probekommentare created by this producer. */ - private List<LKommentarP> pKommentare; + private List<KommentarP> pKommentare; /** * Messungskommentare created by this producer. */ - private Map<LMessung, List<LKommentarM>> mKommentare; + private Map<Messung, List<KommentarM>> mKommentare; /** * Messungen created by this producer. */ - private Map<LMessung, MessungTranslation> messungen; + private List<Messung> messungen; /** * Orte created by this producer. */ - private List<LOrtszuordnung> lorte; + private List<Ortszuordnung> ortszuordnungen; /** * SOrte created by this producer. @@ -88,12 +76,12 @@ /** * Messwerte created by this producer. */ - private Map<LMessung, List<LMesswert>> messwerte; + private Map<Messung, List<Messwert>> messwerte; /** * Zusatzwerte created by this producer. */ - private List<LZusatzWert> zusatzwerte; + private List<ZusatzWert> zusatzwerte; /** * Format mapping for probe objects. @@ -133,13 +121,12 @@ public LafProducer() { this.warnings = new HashMap<String, List<ReportItem>>(); this.errors = new HashMap<String, List<ReportItem>>(); - this.probe = new LProbe(); - this.probeTranslation = new ProbeTranslation(); - this.pKommentare = new ArrayList<LKommentarP>(); - this.mKommentare = new HashMap<LMessung, List<LKommentarM>>(); - this.messungen = new HashMap<LMessung, MessungTranslation>(); - this.lorte = new ArrayList<LOrtszuordnung>(); - this.messwerte = new HashMap<LMessung, List<LMesswert>>(); + this.probe = new Probe(); + this.pKommentare = new ArrayList<KommentarP>(); + this.mKommentare = new HashMap<Messung, List<KommentarM>>(); + this.messungen = new ArrayList<Messung>(); + this.ortszuordnungen = new ArrayList<Ortszuordnung>(); + this.messwerte = new HashMap<Messung, List<Messwert>>(); String fileName = "/import.json"; LafFormat format = new LafFormat(); format.readConfigFile(fileName); @@ -161,23 +148,23 @@ throws LafParserException { String lKey = key.toLowerCase(); if(lKey.equals("probenkommentar")) { - LKommentarP kommentar = new LKommentarP(); + KommentarP kommentar = new KommentarP(); kommentar.setProbeId(this.probe.getId()); this.pKommentare.add( mapper.addAttribute(lKey, values, kommentar)); } else if (lKey.equals("kommentar")) { - LKommentarM kommentar = new LKommentarM(); + KommentarM kommentar = new KommentarM(); kommentar.setMessungsId(this.messung.getId()); if (this.mKommentare.get(this.messung) == null) { - this.mKommentare.put(this.messung, new ArrayList<LKommentarM>()); + this.mKommentare.put(this.messung, new ArrayList<KommentarM>()); } this.mKommentare.get(this.messung).add( mapper.addAttribute(lKey, values, kommentar)); } else if (lKey.equals("probenzusatzbeschreibung")) { - LZusatzWert wert = new LZusatzWert(); - LZusatzWert zusatzWert = mapper.addAttribute(lKey, values, wert); + ZusatzWert wert = new ZusatzWert(); + ZusatzWert zusatzWert = mapper.addAttribute(lKey, values, wert); if (zusatzWert != null) { zusatzWert.setProbeId(probe.getId()); this.zusatzwerte.add(zusatzWert); @@ -195,8 +182,8 @@ } } else if (lKey.equals("pzb_s")) { - LZusatzWert wert = new LZusatzWert(); - LZusatzWert zusatzWert = mapper.addAttributeS(lKey, values, wert); + ZusatzWert wert = new ZusatzWert(); + ZusatzWert zusatzWert = mapper.addAttributeS(lKey, values, wert); if (zusatzWert != null) { zusatzWert.setProbeId(probe.getId()); this.zusatzwerte.add(zusatzWert); @@ -214,12 +201,12 @@ } } else if (lKey.equals("messwert")) { - LMesswert m = new LMesswert(); + Messwert m = new Messwert(); m.setMessungsId(this.messung.getId()); - LMesswert wert = mapper.addAttribute(lKey, values, m); + Messwert wert = mapper.addAttribute(lKey, values, m); if (wert != null) { if (this.messwerte.get(this.messung) == null) { - this.messwerte.put(this.messung, new ArrayList<LMesswert>()); + this.messwerte.put(this.messung, new ArrayList<Messwert>()); } this.messwerte.get(this.messung).add( mapper.addAttribute(lKey, values, wert)); @@ -238,13 +225,10 @@ } else if (isValidMessung(lKey, values.toString())) { this.messung = mapper.addAttribute(lKey, values, this.messung); - this.messungTranslation = - mapper.addAttribute(lKey, values, this.messungTranslation); } else if (isValidProbe(lKey, values.toString())) { this.probe = mapper.addAttribute(lKey, values, this.probe); - this.probeTranslation = mapper.addAttribute(lKey, values, this.probeTranslation); - if (this.probe == null || this.probeTranslation == null) { + if (this.probe == null) { this.errors.put(values.toString(), mapper.getErrors()); throw new LafParserException(values.toString() + " exists"); } @@ -314,18 +298,14 @@ /** * @return the {@link LProbe} entity. */ - public LProbe getProbe() { + public Probe getProbe() { return this.probe; } - public ProbeTranslation getProbeTranslation() { - return this.probeTranslation; - } - /** * @return List of {@link LMessung} entities. */ - public Map<LMessung, MessungTranslation> getMessungen() { + public List<Messung> getMessungen() { return this.messungen; } @@ -339,35 +319,35 @@ /** * @return List of {@link LOrt} entities. */ - public List<LOrtszuordnung> getLOrte() { - return this.lorte; + public List<Ortszuordnung> getOrtszuordnungen() { + return this.ortszuordnungen; } /** * @return List of {@link LKommentarP} entities. */ - public List<LKommentarP> getProbenKommentare() { + public List<KommentarP> getProbenKommentare() { return this.pKommentare; } /** * @return List of {@link LKommentarM} entities. */ - public Map<LMessung, List<LKommentarM>> getMessungsKommentare() { + public Map<Messung, List<KommentarM>> getMessungsKommentare() { return this.mKommentare; } /** * @return List of {@link LMesswert} entities. */ - public Map<LMessung, List<LMesswert>> getMesswerte() { + public Map<Messung, List<Messwert>> getMesswerte() { return this.messwerte; } /** * @return List of {@link LZusatzWert} entities. */ - public List<LZusatzWert> getZusatzwerte() { + public List<ZusatzWert> getZusatzwerte() { return this.zusatzwerte; } @@ -377,15 +357,15 @@ public void reset() { this.errors = new HashMap<String, List<ReportItem>>(); this.warnings = new HashMap<String, List<ReportItem>>(); - this.probe = new LProbe(); - this.messungen = new HashMap<LMessung, MessungTranslation>(); + this.probe = new Probe(); + this.messungen = new ArrayList<Messung>(); this.messung = null; - this.lorte = new ArrayList<LOrtszuordnung>(); + this.ortszuordnungen = new ArrayList<Ortszuordnung>(); this.orte = new ArrayList<Ort>(); this.ort.reset(); - this.messwerte = new HashMap<LMessung, List<LMesswert>>(); - this.mKommentare = new HashMap<LMessung, List<LKommentarM>>(); - this.pKommentare = new ArrayList<LKommentarP>(); + this.messwerte = new HashMap<Messung, List<Messwert>>(); + this.mKommentare = new HashMap<Messung, List<KommentarM>>(); + this.pKommentare = new ArrayList<KommentarP>(); mapper.reset(); } @@ -393,17 +373,16 @@ * Add the current {@link LMessung} entity to the List and create a new one. */ public void newMessung() { - if (this.messung != null && this.messungTranslation != null) { + if (this.messung != null) { if (this.messung.getFertig() == null) { this.messung.setFertig(false); } if (this.messung.getGeplant() == null) { this.messung.setGeplant(false); } - this.messungen.put(this.messung, this.messungTranslation); + this.messungen.add(this.messung); } - this.messung = new LMessung(); - this.messungTranslation = new MessungTranslation(); + this.messung = new Messung(); } /** @@ -416,9 +395,9 @@ if (o != null) { this.orte.add(o); } - LOrtszuordnung lo = this.ort.toLOrt(); + Ortszuordnung lo = this.ort.toOrtszuordnung(); if (lo != null) { - this.lorte.add(lo); + this.ortszuordnungen.add(lo); } } OrtCreator creator = this.ort; @@ -451,14 +430,14 @@ * @return the errors */ public Map<String, List<ReportItem>> getErrors() { - if (this.probe == null || this.probeTranslation == null) { + if (this.probe == null) { return this.errors; } if (mapper.getErrors() == null || mapper.getErrors().size() == 0) { return this.errors; } - String key = probeTranslation.getProbeIdAlt() == null ? - "probeId" : probeTranslation.getProbeIdAlt(); + String key = probe.getIdAlt() == null ? + "probeId" : probe.getIdAlt(); List<ReportItem> err = this.errors.get(key); if (err == null) { this.errors.put(key, mapper.getErrors());
--- a/src/main/java/de/intevation/lada/importer/laf/LafWriter.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/importer/laf/LafWriter.java Fri Jul 08 15:32:36 2016 +0200 @@ -15,15 +15,13 @@ import javax.persistence.PersistenceException; import de.intevation.lada.importer.ReportItem; -import de.intevation.lada.model.land.LKommentarM; -import de.intevation.lada.model.land.LKommentarP; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LMesswert; -import de.intevation.lada.model.land.LOrtszuordnung; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.MessungTranslation; -import de.intevation.lada.model.land.ProbeTranslation; -import de.intevation.lada.model.stamm.Ort; +import de.intevation.lada.model.land.KommentarM; +import de.intevation.lada.model.land.KommentarP; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Messwert; +import de.intevation.lada.model.land.Ortszuordnung; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.stammdaten.Ort; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization; @@ -84,20 +82,18 @@ * @param probe The new {@link LProbe} object. * @return success */ - public boolean writeProbe(UserInfo userInfo, LProbe probe, ProbeTranslation probeTranslation) { - if (!authorization.isAuthorized(userInfo, probe, LProbe.class)) { + public boolean writeProbe(UserInfo userInfo, Probe probe) { + if (!authorization.isAuthorized(userInfo, probe, Probe.class)) { errors.add(new ReportItem("auth", "not authorized", 699)); return false; } - if (probeTranslation.getProbeIdAlt() == null) { + if (probe.getIdAlt() == null) { errors.add(new ReportItem("probeId", "missing", 673)); return false; } try { repository.create(probe, "land"); - probeTranslation.setProbeId(probe); this.currentProbeId = probe.getId(); - repository.create(probeTranslation, "land"); } catch (PersistenceException e) { errors.add(new ReportItem("probe", "writing", 670)); @@ -116,13 +112,10 @@ */ public boolean writeMessungen( UserInfo userInfo, - LMessung messung, - MessungTranslation messungTranslation + Messung messung ) { messung.setProbeId(this.currentProbeId); repository.create(messung, "land"); - messungTranslation.setMessungsId(messung); - repository.create(messungTranslation, "land"); return true; } @@ -144,7 +137,7 @@ * @param orte List of {@link LOrt} objects. * @return success */ - public boolean writeLOrte(UserInfo userInfo, LOrtszuordnung ort) { + public boolean writeOrtszuordung(UserInfo userInfo, Ortszuordnung ort) { ort.setProbeId(this.currentProbeId); repository.create(ort, "land"); return true; @@ -159,9 +152,9 @@ */ public boolean writeProbenKommentare( UserInfo userInfo, - List<LKommentarP> kommentare + List<KommentarP> kommentare ) { - for(LKommentarP kommentar: kommentare) { + for(KommentarP kommentar: kommentare) { kommentar.setProbeId(this.currentProbeId); repository.create(kommentar, "land"); } @@ -177,10 +170,10 @@ */ public boolean writeMessungKommentare( UserInfo userInfo, - Map<LMessung, List<LKommentarM>> kommentare + Map<Messung, List<KommentarM>> kommentare ) { - for (LMessung messung : kommentare.keySet()) { - for (LKommentarM kommentar: kommentare.get(messung)) { + for (Messung messung : kommentare.keySet()) { + for (KommentarM kommentar: kommentare.get(messung)) { kommentar.setMessungsId(messung.getId()); repository.create(kommentar, "land"); } @@ -197,10 +190,10 @@ */ public boolean writeMesswerte( UserInfo userInfo, - Map<LMessung, List<LMesswert>> werte + Map<Messung, List<Messwert>> werte ) { - for (LMessung messung : werte.keySet()) { - for(LMesswert messwert: werte.get(messung)) { + for (Messung messung : werte.keySet()) { + for (Messwert messwert: werte.get(messung)) { messwert.setMessungsId(messung.getId()); repository.create(messwert, "land"); }
--- a/src/main/java/de/intevation/lada/importer/laf/OrtCreator.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/importer/laf/OrtCreator.java Fri Jul 08 15:32:36 2016 +0200 @@ -16,10 +16,10 @@ import org.apache.log4j.Logger; import de.intevation.lada.importer.ReportItem; -import de.intevation.lada.model.land.LOrtszuordnung; -import de.intevation.lada.model.stamm.Ort; -import de.intevation.lada.model.stamm.Staat; -import de.intevation.lada.model.stamm.Verwaltungseinheit; +import de.intevation.lada.model.land.Ortszuordnung; +import de.intevation.lada.model.stammdaten.Ort; +import de.intevation.lada.model.stammdaten.Staat; +import de.intevation.lada.model.stammdaten.Verwaltungseinheit; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -685,7 +685,7 @@ } ort.setKoordXExtern(x); ort.setKoordYExtern(y); - ort.setKdaId(Integer.valueOf(art)); + ort.setKoordinatenArtId(Integer.valueOf(art)); return ort; } @@ -730,7 +730,7 @@ ort.setLongitude(Double.valueOf(x)); ort.setKoordYExtern(y); ort.setLatitude(Double.valueOf(y)); - ort.setKdaId(Integer.valueOf(art)); + ort.setKoordinatenArtId(Integer.valueOf(art)); return ort; } @@ -739,7 +739,7 @@ * * @return The new LOrt object. */ - public LOrtszuordnung toLOrt() { + public Ortszuordnung toOrtszuordnung() { if (this.ortId == null && (this.ortCode == null || this.ortCode.length() == 0) ) { @@ -760,7 +760,7 @@ this.ortId = orte.get(0).getId(); } } - LOrtszuordnung ort = new LOrtszuordnung(); + Ortszuordnung ort = new Ortszuordnung(); ort.setOrtId(Long.valueOf(this.ortId)); ort.setProbeId(this.probeId); ort.setOrtszuordnungTyp(this.ortTyp);
--- a/src/main/java/de/intevation/lada/lock/TimestampLocker.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/lock/TimestampLocker.java Fri Jul 08 15:32:36 2016 +0200 @@ -15,8 +15,8 @@ import org.apache.log4j.Logger; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType; @@ -51,10 +51,10 @@ */ @Override public boolean isLocked(Object o) { - if (o instanceof LProbe) { - LProbe newProbe = (LProbe)o; - LProbe oldProbe = (LProbe)repository.getById( - LProbe.class, + if (o instanceof Probe) { + Probe newProbe = (Probe)o; + Probe oldProbe = (Probe)repository.getById( + Probe.class, newProbe.getId(), "land").getData(); logger.debug("old: " + oldProbe.getTreeModified().getTime()); @@ -76,8 +76,8 @@ return true; } Response response = - repository.getById(LProbe.class, id, "land"); - LProbe probe = (LProbe)response.getData(); + repository.getById(Probe.class, id, "land"); + Probe probe = (Probe)response.getData(); return isNewer(o, probe.getTreeModified()); } if (m.getName().equals("getMessungsId")) { @@ -89,8 +89,8 @@ return true; } Response mResponse = - repository.getById(LMessung.class, id, "land"); - LMessung messung = (LMessung)mResponse.getData(); + repository.getById(Messung.class, id, "land"); + Messung messung = (Messung)mResponse.getData(); boolean newerMessung = isNewer(o, messung.getTreeModified()); return newerMessung; }
--- a/src/main/java/de/intevation/lada/model/KommentarM.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model; - -import java.io.Serializable; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; -import javax.persistence.Table; -import javax.persistence.Transient; - - -/** - * The persistent class for the kommentar_m database table. - */ -@MappedSuperclass -@Table(name="kommentar_m") -public class KommentarM implements Serializable { - private static final long serialVersionUID = 1L; - - @Column(name="messungs_id") - private Integer messungsId; - - private Timestamp datum; - - private String erzeuger; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - private String text; - - @Transient - private boolean owner; - - @Transient - private boolean readonly; - - public KommentarM() { - } - - public Timestamp getDatum() { - return this.datum; - } - - public void setDatum(Timestamp datum) { - this.datum = datum; - } - - public String getErzeuger() { - return this.erzeuger; - } - - public void setErzeuger(String erzeuger) { - this.erzeuger = erzeuger; - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getText() { - return this.text; - } - - public void setText(String text) { - this.text = text; - } - - public boolean isOwner() { - return owner; - } - - public void setOwner(boolean owner) { - this.owner = owner; - } - - public boolean isReadonly() { - return readonly; - } - - public void setReadonly(boolean readonly) { - this.readonly = readonly; - } - - public Integer getMessungsId() { - return this.messungsId; - } - - public void setMessungsId(Integer messungsId) { - this.messungsId = messungsId; - } -}
--- a/src/main/java/de/intevation/lada/model/KommentarP.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model; - -import java.io.Serializable; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; -import javax.persistence.Table; -import javax.persistence.Transient; - - -/** - * The persistent class for the kommentar_p database table. - */ -@MappedSuperclass -@Table(name="kommentar_p") -public class KommentarP implements Serializable { - private static final long serialVersionUID = 1L; - - private Timestamp datum; - - private String erzeuger; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - private String text; - - @Column(name="probe_id") - private Integer probeId; - - @Transient - private boolean owner; - - @Transient - private boolean readonly; - - public KommentarP() { - } - - public Timestamp getDatum() { - return this.datum; - } - - public void setDatum(Timestamp datum) { - this.datum = datum; - } - - public String getErzeuger() { - return this.erzeuger; - } - - public void setErzeuger(String erzeuger) { - this.erzeuger = erzeuger; - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getText() { - return this.text; - } - - public void setText(String text) { - this.text = text; - } - - public Integer getProbeId() { - return probeId; - } - - public void setProbeId(Integer probeId) { - this.probeId = probeId; - } - - public boolean isOwner() { - return owner; - } - - public void setOwner(boolean owner) { - this.owner = owner; - } - - public boolean isReadonly() { - return readonly; - } - - public void setReadonly(boolean readonly) { - this.readonly = readonly; - } -}
--- a/src/main/java/de/intevation/lada/model/Messung.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model; - -import java.io.Serializable; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; -import javax.persistence.Table; -import javax.persistence.Transient; - - -/** - * The persistent class for the messung database table. - */ -@MappedSuperclass -@Table(name="messung") -public class Messung implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - private Boolean fertig; - - @Column(name="letzte_aenderung") - private Timestamp letzteAenderung; - - private Integer messdauer; - - private Timestamp messzeitpunkt; - - @Column(name="mmt_id") - private String mmtId; - - @Column(name="probe_id") - private Integer probeId; - - private Integer status; - - @Transient - private boolean owner; - - @Transient - private boolean readonly; - - public Messung() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Boolean getFertig() { - return this.fertig; - } - - public void setFertig(Boolean fertig) { - this.fertig = fertig; - } - - public Timestamp getLetzteAenderung() { - return this.letzteAenderung; - } - - public Integer getMessdauer() { - return this.messdauer; - } - - public void setMessdauer(Integer messdauer) { - this.messdauer = messdauer; - } - - public Timestamp getMesszeitpunkt() { - return this.messzeitpunkt; - } - - public void setMesszeitpunkt(Timestamp messzeitpunkt) { - this.messzeitpunkt = messzeitpunkt; - } - - public String getMmtId() { - return this.mmtId; - } - - public void setMmtId(String mmtId) { - this.mmtId = mmtId; - } - - public Integer getProbeId() { - return probeId; - } - - public void setProbeId(Integer probeId) { - this.probeId = probeId; - } - - /** - * @return the status - */ - public Integer getStatus() { - return status; - } - - /** - * @param status the status to set - */ - public void setStatus(Integer status) { - this.status = status; - } - - public boolean isOwner() { - return owner; - } - - public void setOwner(boolean owner) { - this.owner = owner; - } - - public boolean isReadonly() { - return readonly; - } - - public void setReadonly(boolean readonly) { - this.readonly = readonly; - } -}
--- a/src/main/java/de/intevation/lada/model/Messwert.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model; - -import java.io.Serializable; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; -import javax.persistence.Table; -import javax.persistence.Transient; - -import de.intevation.lada.util.data.MathUtil; - - -/** - * The persistent class for the messwert database table. - */ -@MappedSuperclass -@Table(name="messwert") -public class Messwert implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - private Boolean grenzwertueberschreitung; - - @Column(name="letzte_aenderung") - private Timestamp letzteAenderung; - - @Column(name="meh_id") - private Integer mehId; - - private Float messfehler; - - @Column(name="messgroesse_id") - private Integer messgroesseId; - - @Column(name="messungs_id") - private Integer messungsId; - - private Double messwert; - - @Column(name="messwert_nwg") - private String messwertNwg; - - @Column(name="nwg_zu_messwert") - private Double nwgZuMesswert; - - @Transient - private boolean owner; - - @Transient - private boolean readonly; - - public Messwert() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Boolean getGrenzwertueberschreitung() { - return this.grenzwertueberschreitung; - } - - public void setGrenzwertueberschreitung(Boolean grenzwertueberschreitung) { - this.grenzwertueberschreitung = grenzwertueberschreitung; - } - - public Timestamp getLetzteAenderung() { - return this.letzteAenderung; - } - - public Integer getMehId() { - return this.mehId; - } - - public void setMehId(Integer mehId) { - this.mehId = mehId; - } - - public Float getMessfehler() { - return this.messfehler; - } - - public void setMessfehler(Float messfehler) { - this.messfehler = messfehler; - } - - public Integer getMessgroesseId() { - return this.messgroesseId; - } - - public void setMessgroesseId(Integer messgroesseId) { - this.messgroesseId = messgroesseId; - } - - public Integer getMessungsId() { - return this.messungsId; - } - - public void setMessungsId(Integer messungsId) { - this.messungsId = messungsId; - } - - public Double getMesswert() { - return this.messwert; - } - - public void setMesswert(Double messwert) { - this.messwert = MathUtil.roundDoubleToThree(messwert); - } - - public String getMesswertNwg() { - return this.messwertNwg; - } - - public void setMesswertNwg(String messwertNwg) { - this.messwertNwg = messwertNwg; - } - - public Double getNwgZuMesswert() { - return this.nwgZuMesswert; - } - - public void setNwgZuMesswert(Double nwgZuMesswert) { - this.nwgZuMesswert = MathUtil.roundDoubleToThree(nwgZuMesswert); - } - - public boolean isOwner() { - return owner; - } - - public void setOwner(boolean owner) { - this.owner = owner; - } - - public boolean isReadonly() { - return readonly; - } - - public void setReadonly(boolean readonly) { - this.readonly = readonly; - } - -}
--- a/src/main/java/de/intevation/lada/model/Ortszuordnung.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model; - -import java.io.Serializable; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; -import javax.persistence.Table; -import javax.persistence.Transient; - - -/** - * The persistent class for the ortszuordnung database table. - */ -@MappedSuperclass -@Table(name="ortszuordnung") -public class Ortszuordnung implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - @Column(name="letzte_aenderung") - private Timestamp letzteAenderung; - - @Column(name="ort_id") - private Long ortId; - - @Column(name="ortszuordnung_typ") - private String ortszuordnungTyp; - - private String ortszusatztext; - - @Column(name="probe_id") - private Integer probeId; - - @Transient - private boolean owner; - - @Transient - private boolean readonly; - - public Ortszuordnung() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Timestamp getLetzteAenderung() { - return this.letzteAenderung; - } - - public Long getOrtId() { - return this.ortId; - } - - public void setOrtId(Long ortId) { - this.ortId = ortId; - } - - public String getOrtszuordnungTyp() { - return this.ortszuordnungTyp; - } - - public void setOrtszuordnungTyp(String ortszuordnungTyp) { - this.ortszuordnungTyp = ortszuordnungTyp; - } - - public String getOrtszusatztext() { - return this.ortszusatztext; - } - - public void setOrtszusatztext(String ortszusatztext) { - this.ortszusatztext = ortszusatztext; - } - - public Integer getProbeId() { - return this.probeId; - } - - public void setProbeId(Integer probeId) { - this.probeId = probeId; - } - - public boolean isOwner() { - return owner; - } - - public void setOwner(boolean owner) { - this.owner = owner; - } - - public boolean isReadonly() { - return readonly; - } - - public void setReadonly(boolean readonly) { - this.readonly = readonly; - } - -}
--- a/src/main/java/de/intevation/lada/model/Probe.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,199 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model; - -import java.io.Serializable; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; -import javax.persistence.Table; - - -/** - * The persistent class for the probe database table. - */ -@MappedSuperclass -@Table(name="probe") -public class Probe implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - @Column(name="ba_id") - private String baId; - - @Column(name="datenbasis_id") - private Integer datenbasisId; - - @Column(name="letzte_aenderung") - private Timestamp letzteAenderung; - - private String media; - - @Column(name="media_desk") - private String mediaDesk; - - private Long mittelungsdauer; - - @Column(name="mst_id") - private String mstId; - - @Column(name="labor_mst_id") - private String laborMstId; - - @Column(name="netzbetreiber_id") - private String netzbetreiberId; - - @Column(name="probeentnahme_beginn") - private Timestamp probeentnahmeBeginn; - - @Column(name="probeentnahme_ende") - private Timestamp probeentnahmeEnde; - - @Column(name="probenart_id") - private Integer probenartId; - - private Boolean test; - - @Column(name="umw_id") - private String umwId; - - public Probe() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getBaId() { - return this.baId; - } - - public void setBaId(String baId) { - this.baId = baId; - } - - public Integer getDatenbasisId() { - return this.datenbasisId; - } - - public void setDatenbasisId(Integer datenbasisId) { - this.datenbasisId = datenbasisId; - } - - public Timestamp getLetzteAenderung() { - return this.letzteAenderung; - } - - public String getMedia() { - return this.media; - } - - public void setMedia(String media) { - this.media = media; - } - - public String getMediaDesk() { - return this.mediaDesk; - } - - public void setMediaDesk(String mediaDesk) { - this.mediaDesk = mediaDesk; - } - - public Long getMittelungsdauer() { - return this.mittelungsdauer; - } - - public void setMittelungsdauer(Long mittelungsdauer) { - this.mittelungsdauer = mittelungsdauer; - } - - public String getMstId() { - return this.mstId; - } - - public void setMstId(String mstId) { - this.mstId = mstId; - } - - /** - * @return the laborMstId - */ - public String getLaborMstId() { - return laborMstId; - } - - /** - * @param laborMstId the laborMstId to set - */ - public void setLaborMstId(String laborMstId) { - this.laborMstId = laborMstId; - } - - public String getNetzbetreiberId() { - return this.netzbetreiberId; - } - - public void setNetzbetreiberId(String netzbetreiberId) { - this.netzbetreiberId = netzbetreiberId; - } - - public Timestamp getProbeentnahmeBeginn() { - return this.probeentnahmeBeginn; - } - - public void setProbeentnahmeBeginn(Timestamp probeentnahmeBeginn) { - this.probeentnahmeBeginn = probeentnahmeBeginn; - } - - public Timestamp getProbeentnahmeEnde() { - return this.probeentnahmeEnde; - } - - public void setProbeentnahmeEnde(Timestamp probeentnahmeEnde) { - this.probeentnahmeEnde = probeentnahmeEnde; - } - - public Integer getProbenartId() { - return this.probenartId; - } - - public void setProbenartId(Integer probenartId) { - this.probenartId = probenartId; - } - - public Boolean getTest() { - return this.test; - } - - public void setTest(Boolean test) { - this.test = test; - } - - public String getUmwId() { - return this.umwId; - } - - public void setUmwId(String umwId) { - this.umwId = umwId; - } - - -}
--- a/src/main/java/de/intevation/lada/model/StatusProtokoll.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model; - -import java.io.Serializable; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; -import javax.persistence.Table; -import javax.persistence.Transient; - - -/** - * The persistent class for the status database table. - */ -@MappedSuperclass -@Table(name="status_protokoll") -public class StatusProtokoll implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", nullable=false, insertable=false) - private Integer id; - - @Column(name="messungs_id") - private Integer messungsId; - - @Column(name="status_stufe") - private Integer statusStufe; - - @Column(name="status_wert") - private Integer statusWert; - - private String erzeuger; - - @Column(name="datum") - private Timestamp datum; - - @Column(name="text") - private String text; - - @Column(name="tree_modified") - private Timestamp treeModified; - - @Transient - private boolean owner; - - @Transient - private boolean readonly; - - public StatusProtokoll() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getStatusStufe() { - return this.statusStufe; - } - - public void setStatusStufe(Integer statusStufe) { - this.statusStufe = statusStufe; - } - - public Integer getStatusWert() { - return this.statusWert; - } - - public void setStatusWert(Integer statusWert) { - this.statusWert = statusWert; - } - - public String getErzeuger() { - return this.erzeuger; - } - - public void setErzeuger(String erzeuger) { - this.erzeuger = erzeuger; - } - - public Integer getMessungsId() { - return this.messungsId; - } - - public void setMessungsId(Integer messungsId) { - this.messungsId = messungsId; - } - - public Timestamp getDatum() { - return this.datum; - } - - public void setDatum(Timestamp datum) { - this.datum = datum; - } - - public String getText() { - return this.text; - } - - public void setText(String text) { - this.text = text; - } - - public Timestamp getTreeModified() { - return treeModified; - } - - public void setTreeModified(Timestamp treeModified) { - this.treeModified = treeModified; - } - - public boolean isOwner() { - return owner; - } - - public void setOwner(boolean owner) { - this.owner = owner; - } - - public boolean isReadonly() { - return readonly; - } - - public void setReadonly(boolean readonly) { - this.readonly = readonly; - } -}
--- a/src/main/java/de/intevation/lada/model/ZusatzWert.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model; - -import java.io.Serializable; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; -import javax.persistence.Table; -import javax.persistence.Transient; - -import de.intevation.lada.util.data.MathUtil; - - -/** - * The persistent class for the zusatz_wert database table. - */ -@MappedSuperclass -@Table(name="zusatz_wert") -public class ZusatzWert implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", nullable=false, insertable=false) - private Integer id; - - @Column(name="letzte_aenderung") - private Timestamp letzteAenderung; - - private Float messfehler; - - @Column(name="messwert_pzs") - private Double messwertPzs; - - @Column(name="nwg_zu_messwert") - private Double nwgZuMesswert; - - @Column(name="probe_id") - private Integer probeId; - - @Column(name="pzs_id") - private String pzsId; - - @Transient - private boolean owner; - - @Transient - private boolean readonly; - - public ZusatzWert() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Timestamp getLetzteAenderung() { - return this.letzteAenderung; - } - - public Float getMessfehler() { - return this.messfehler; - } - - public void setMessfehler(Float messfehler) { - this.messfehler = messfehler; - } - - public Double getMesswertPzs() { - return this.messwertPzs; - } - - public void setMesswertPzs(Double messwertPzs) { - this.messwertPzs = MathUtil.roundDoubleToThree(messwertPzs); - } - - public Double getNwgZuMesswert() { - return this.nwgZuMesswert; - } - - public void setNwgZuMesswert(Double nwgZuMesswert) { - this.nwgZuMesswert = MathUtil.roundDoubleToThree(nwgZuMesswert); - } - - public Integer getProbeId() { - return this.probeId; - } - - public void setProbeId(Integer probeId) { - this.probeId = probeId; - } - - public String getPzsId() { - return this.pzsId; - } - - public void setPzsId(String pzsId) { - this.pzsId = pzsId; - } - - public boolean isOwner() { - return owner; - } - - public void setOwner(boolean owner) { - this.owner = owner; - } - - public boolean isReadonly() { - return readonly; - } - - public void setReadonly(boolean readonly) { - this.readonly = readonly; - } - -}
--- a/src/main/java/de/intevation/lada/model/bund/KommentarM.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.bund; - -import javax.persistence.Entity; -import javax.persistence.Table; - - -/** - * The persistent class for the kommentar_m database table. - */ -@Entity -@Table(name="kommentar_m") -public class KommentarM extends de.intevation.lada.model.KommentarM { - private static final long serialVersionUID = 1L; - -}
--- a/src/main/java/de/intevation/lada/model/bund/KommentarP.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.bund; - -import javax.persistence.Entity; -import javax.persistence.Table; - - -/** - * The persistent class for the kommentar_p database table. - */ -@Entity -@Table(name="kommentar_p") -public class KommentarP extends de.intevation.lada.model.KommentarP { - private static final long serialVersionUID = 1L; - -}
--- a/src/main/java/de/intevation/lada/model/bund/List.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.bund; - -import java.io.Serializable; -import javax.persistence.*; -import java.sql.Timestamp; - - -/** - * The persistent class for the list database table. - */ -@Entity -@Table(name="list") -public class List implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String beschreibuing; - - private String bezeichnung; - - @Column(name="gueltig_bis") - private Timestamp gueltigBis; - - @Column(name="letzte_aenderung") - private Timestamp letzteAenderung; - - private String typ; - - public List() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getBeschreibuing() { - return this.beschreibuing; - } - - public void setBeschreibuing(String beschreibuing) { - this.beschreibuing = beschreibuing; - } - - public String getBezeichnung() { - return this.bezeichnung; - } - - public void setBezeichnung(String bezeichnung) { - this.bezeichnung = bezeichnung; - } - - public Timestamp getGueltigBis() { - return this.gueltigBis; - } - - public void setGueltigBis(Timestamp gueltigBis) { - this.gueltigBis = gueltigBis; - } - - public Timestamp getLetzteAenderung() { - return this.letzteAenderung; - } - - public String getTyp() { - return this.typ; - } - - public void setTyp(String typ) { - this.typ = typ; - } - -}
--- a/src/main/java/de/intevation/lada/model/bund/ListZuordnung.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.bund; - -import java.io.Serializable; -import javax.persistence.*; - - -/** - * The persistent class for the list_zuordnung database table. - */ -@Entity -@Table(name="list_zuordnung") -public class ListZuordnung implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @Column(name="list_id") - private Integer listId; - - @Column(name="probe_id") - private Integer probeId; - - public ListZuordnung() { - } - - public Integer getListId() { - return this.listId; - } - - public void setListId(Integer listId) { - this.listId = listId; - } - - public Integer getProbeId() { - return this.probeId; - } - - public void setProbeId(Integer probeId) { - this.probeId = probeId; - } -}
--- a/src/main/java/de/intevation/lada/model/bund/Messung.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.bund; - -import javax.persistence.Entity; -import javax.persistence.Table; - - -/** - * The persistent class for the messung database table. - */ -@Entity -@Table(name="messung") -public class Messung extends de.intevation.lada.model.Messung { - private static final long serialVersionUID = 1L; - -}
--- a/src/main/java/de/intevation/lada/model/bund/Messwert.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.bund; - -import javax.persistence.Entity; -import javax.persistence.Table; - - -/** - * The persistent class for the messwert database table. - */ -@Entity -@Table(name="messwert") -public class Messwert extends de.intevation.lada.model.Messwert { - private static final long serialVersionUID = 1L; - -}
--- a/src/main/java/de/intevation/lada/model/bund/Ortszuordnung.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.bund; - -import javax.persistence.Entity; -import javax.persistence.Table; - -/** - * The persistent class for the ortszuordung database table. - */ -@Entity -@Table(name="ortszuordung") -public class Ortszuordnung extends de.intevation.lada.model.Ortszuordnung { - private static final long serialVersionUID = 1L; - -}
--- a/src/main/java/de/intevation/lada/model/bund/Probe.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.bund; - -import javax.persistence.Entity; -import javax.persistence.Table; - - -/** - * The persistent class for the probe database table. - */ -@Entity -@Table(name="probe") -public class Probe extends de.intevation.lada.model.Probe { - private static final long serialVersionUID = 1L; - -}
--- a/src/main/java/de/intevation/lada/model/bund/StatusProtokoll.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.bund; - -import javax.persistence.Entity; -import javax.persistence.Table; - -@Entity -@Table(name = "status_protokoll") -public class StatusProtokoll extends de.intevation.lada.model.StatusProtokoll { - private static final long serialVersionUID = 1L; -}
--- a/src/main/java/de/intevation/lada/model/bund/ZusatzWert.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.bund; - -import javax.persistence.Entity; -import javax.persistence.Table; - - -/** - * The persistent class for the zusatz_wert database table. - */ -@Entity -@Table(name="zusatz_wert") -public class ZusatzWert extends de.intevation.lada.model.ZusatzWert { - private static final long serialVersionUID = 1L; - -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/land/KommentarM.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,115 @@ +package de.intevation.lada.model.land; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; + + +/** + * The persistent class for the kommentar_m database table. + * + */ +@Entity +@Table(name="kommentar_m") +public class KommentarM implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + private Integer id; + + private Timestamp datum; + + @Column(name="messungs_id") + private Integer messungsId; + + @Column(name="mst_id") + private String mstId; + + private String text; + + @Transient + private boolean owner; + + @Transient + private boolean readonly; + + public KommentarM() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Timestamp getDatum() { + return this.datum; + } + + public void setDatum(Timestamp datum) { + this.datum = datum; + } + + public Integer getMessungsId() { + return this.messungsId; + } + + public void setMessungsId(Integer messungsId) { + this.messungsId = messungsId; + } + + public String getMstId() { + return this.mstId; + } + + public void setMstId(String mstId) { + this.mstId = mstId; + } + + public String getText() { + return this.text; + } + + public void setText(String text) { + this.text = text; + } + + /** + * @return the owner + */ + public boolean isOwner() { + return owner; + } + + /** + * @param owner the owner to set + */ + public void setOwner(boolean owner) { + this.owner = owner; + } + + /** + * @return the readonly + */ + public boolean isReadonly() { + return readonly; + } + + /** + * @param readonly the readonly to set + */ + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/land/KommentarP.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,115 @@ +package de.intevation.lada.model.land; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; + + +/** + * The persistent class for the kommentar_p database table. + * + */ +@Entity +@Table(name="kommentar_p") +public class KommentarP implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + private Integer id; + + private Timestamp datum; + + @Column(name="mst_id") + private String mstId; + + @Column(name="probe_id") + private Integer probeId; + + private String text; + + @Transient + private boolean owner; + + @Transient + private boolean readonly; + + public KommentarP() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Timestamp getDatum() { + return this.datum; + } + + public void setDatum(Timestamp datum) { + this.datum = datum; + } + + public String getMstId() { + return this.mstId; + } + + public void setMstId(String mstId) { + this.mstId = mstId; + } + + public Integer getProbeId() { + return this.probeId; + } + + public void setProbeId(Integer probeId) { + this.probeId = probeId; + } + + public String getText() { + return this.text; + } + + public void setText(String text) { + this.text = text; + } + + /** + * @return the owner + */ + public boolean isOwner() { + return owner; + } + + /** + * @param owner the owner to set + */ + public void setOwner(boolean owner) { + this.owner = owner; + } + + /** + * @return the readonly + */ + public boolean isReadonly() { + return readonly; + } + + /** + * @param readonly the readonly to set + */ + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } + +}
--- a/src/main/java/de/intevation/lada/model/land/LKommentarM.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.land; - -import javax.persistence.Entity; -import javax.persistence.Table; - -import de.intevation.lada.model.KommentarM; - - -/** - * The persistent class for the kommentar_m database table. - */ -@Entity -@Table(name="kommentar_m") -public class LKommentarM extends KommentarM { - private static final long serialVersionUID = 1L; - -}
--- a/src/main/java/de/intevation/lada/model/land/LKommentarP.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.land; - -import javax.persistence.Entity; -import javax.persistence.Table; - -import de.intevation.lada.model.KommentarP; - - -/** - * The persistent class for the kommentar_p database table. - */ -@Entity -@Table(name="kommentar_p") -public class LKommentarP extends KommentarP { - private static final long serialVersionUID = 1L; - -}
--- a/src/main/java/de/intevation/lada/model/land/LMessung.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.land; - -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.Transient; - -import com.fasterxml.jackson.annotation.JsonIgnore; - -import de.intevation.lada.model.Messung; - - -/** - * The persistent class for the messung database table. - */ -@Entity -@Table(name="messung") -public class LMessung extends Messung { - private static final long serialVersionUID = 1L; - - @Column(name="nebenproben_nr") - private String nebenprobenNr; - - @OneToOne(mappedBy="messungs") - private MessungTranslation messungTranslation; - - private Boolean geplant; - - @OneToOne - @JoinColumn(name="probe_id", insertable=false, updatable=false) - private LProbe probe; - - @Column(name="tree_modified", insertable=false, updatable=false) - private Timestamp treeModified; - - @Transient - private Boolean statusEdit; - - @Transient - private Timestamp parentModified; - - public LMessung() { - } - - public Boolean getGeplant() { - return this.geplant; - } - - public void setGeplant(Boolean geplant) { - this.geplant = geplant; - } - - public Timestamp getTreeModified() { - return this.treeModified; - } - - public void setTreeModified(Timestamp treeModified) { - this.treeModified = treeModified; - } - - public Boolean getStatusEdit() { - return statusEdit; - } - - public void setStatusEdit(Boolean statusEdit) { - this.statusEdit = statusEdit; - } - - public Timestamp getParentModified() { - if (this.parentModified == null && this.probe != null) { - return this.probe.getTreeModified(); - } - return this.parentModified; - } - - public void setParentModified(Timestamp parentModified) { - this.parentModified = parentModified; - } - - public String getNebenprobenNr() { - return nebenprobenNr; - } - - public void setNebenprobenNr(String nebenprobenNr) { - this.nebenprobenNr = nebenprobenNr; - } - - @JsonIgnore - public MessungTranslation getMessungTranslation() { - return this.messungTranslation; - } - - public void setMessungsTranslation(MessungTranslation messungTranslation) { - this.messungTranslation = messungTranslation; - } - - public Integer getMessungsIdAlt() { - return this.messungTranslation.getMessungsIdAlt(); - } - - public void setMessungsIdAlt(Integer messungsIdAlt) {} - -}
--- a/src/main/java/de/intevation/lada/model/land/LMesswert.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.land; - -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.Transient; - - -/** - * The persistent class for the messwert database table. - */ -@Entity -@Table(name="messwert") -public class LMesswert extends de.intevation.lada.model.Messwert { - private static final long serialVersionUID = 1L; - - @Column(name="tree_modified", insertable=false, updatable=false) - private Timestamp treeModified; - - @OneToOne - @JoinColumn(name="messungs_id", insertable=false, updatable=false) - private LMessung messung; - - @Transient - private Timestamp parentModified; - - public Timestamp getTreeModified() { - return treeModified; - } - - public void setTreeModified(Timestamp treeModified) { - this.treeModified = treeModified; - } - - public Timestamp getParentModified() { - if (this.parentModified == null && this.messung != null) { - return this.messung.getTreeModified(); - } - return this.parentModified; - } - - public void setParentModified(Timestamp parentModified) { - this.parentModified = parentModified; - } -}
--- a/src/main/java/de/intevation/lada/model/land/LOrtszuordnung.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.land; - -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.Transient; - - -/** - * The persistent class for the ortszuordnung database table. - */ -@Entity -@Table(name="ortszuordnung") -public class LOrtszuordnung extends de.intevation.lada.model.Ortszuordnung { - private static final long serialVersionUID = 1L; - - @OneToOne - @JoinColumn(name="probe_id", insertable=false, updatable=false) - private LProbe probe; - - @Column(name="tree_modified") - private Timestamp treeModified; - - @Transient - private Timestamp parentModified; - - public LOrtszuordnung() { - } - - public Timestamp getTreeModified() { - return this.treeModified; - } - - public void setTreeModified(Timestamp treeModified) { - this.treeModified = treeModified; - } - - public Timestamp getParentModified() { - if (this.parentModified == null && this.probe != null) { - return this.probe.getTreeModified(); - } - return this.parentModified; - } - - public void setParentModified(Timestamp parentModified) { - this.parentModified = parentModified; - } -}
--- a/src/main/java/de/intevation/lada/model/land/LProbe.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,177 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.land; - -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.Transient; - -import com.fasterxml.jackson.annotation.JsonIgnore; - -import de.intevation.lada.model.Probe; - - -/** - * The persistent class for the probe database table. - */ -@Entity -@Table(name="probe") -public class LProbe extends Probe { - private static final long serialVersionUID = 1L; - - @OneToOne(mappedBy="probe") - private ProbeTranslation probeTranslation; - - @Column(name="hauptproben_nr") - private String hauptprobenNr; - - @Column(name="erzeuger_id") - private Integer erzeugerId; - - @Column(name="mp_kat") - private String mpKat; - - @Column(name="mpl_id") - private String mplId; - - @Column(name="mpr_id") - private Integer mprId; - - @Column(name="probe_nehmer_id") - private Integer probeNehmerId; - - @Column(name="solldatum_beginn") - private Timestamp solldatumBeginn; - - @Column(name="solldatum_ende") - private Timestamp solldatumEnde; - - @Column(name="tree_modified", insertable=false, updatable=false) - private Timestamp treeModified; - - @Transient - private boolean readonly; - - @Transient - private boolean owner; - - public LProbe() { - } - - public Integer getErzeugerId() { - return this.erzeugerId; - } - - public void setErzeugerId(Integer erzeugerId) { - this.erzeugerId = erzeugerId; - } - - public String getMpKat() { - return this.mpKat; - } - - public void setMpKat(String mpKat) { - this.mpKat = mpKat; - } - - public String getMplId() { - return this.mplId; - } - - public void setMplId(String mplId) { - this.mplId = mplId; - } - - public Integer getMprId() { - return this.mprId; - } - - public void setMprId(Integer mprId) { - this.mprId = mprId; - } - - public Integer getProbeNehmerId() { - return this.probeNehmerId; - } - - public void setProbeNehmerId(Integer probeNehmerId) { - this.probeNehmerId = probeNehmerId; - } - - public Timestamp getSolldatumBeginn() { - return this.solldatumBeginn; - } - - public void setSolldatumBeginn(Timestamp solldatumBeginn) { - this.solldatumBeginn = solldatumBeginn; - } - - public Timestamp getSolldatumEnde() { - return this.solldatumEnde; - } - - public void setSolldatumEnde(Timestamp solldatumEnde) { - this.solldatumEnde = solldatumEnde; - } - - @JsonIgnore - public ProbeTranslation getProbeTranslation() { - return probeTranslation; - } - - public void setProbeTranslation(ProbeTranslation probeTranslation) { - this.probeTranslation = probeTranslation; - } - - public String getHauptprobenNr() { - return this.hauptprobenNr; - } - - public void setHauptprobenNr(String hauptprobenNr) { - this.hauptprobenNr = hauptprobenNr; - } - - public String getProbeIdAlt() { - if (this.probeTranslation != null) { - return this.probeTranslation.getProbeIdAlt(); - } - else { - return ""; - } - } - - public void setProbeIdAlt(String probeIdAlt) {} - - public boolean getOwner() { - return this.owner; - } - - public void setOwner(boolean value) { - this.owner = value; - } - - public Timestamp getTreeModified() { - return this.treeModified; - } - - public void setTreeModified(Timestamp treeModified) { - this.treeModified = treeModified; - } - - public boolean getReadonly() { - return this.readonly; - } - - public void setReadonly(boolean value) { - this.readonly = value; - } -}
--- a/src/main/java/de/intevation/lada/model/land/LStatusProtokoll.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.land; - -import java.sql.Timestamp; - -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.Transient; - -import de.intevation.lada.model.StatusProtokoll; - -/** - * The persistent class for the probe database table. - */ -@Entity -@Table(name="status_protokoll") -public class LStatusProtokoll extends StatusProtokoll { - private static final long serialVersionUID = 1L; - - @OneToOne - @JoinColumn(name="messungs_id", insertable=false, updatable=false) - private LMessung messung; - - @Transient - private Timestamp parentModified; - - public Timestamp getParentModified() { - if (this.parentModified == null && this.messung != null) { - return this.messung.getTreeModified(); - } - return this.parentModified; - } - - public void setParentModified(Timestamp parentModified) { - this.parentModified = parentModified; - } -}
--- a/src/main/java/de/intevation/lada/model/land/LZusatzWert.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.land; - -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.Transient; - - -/** - * The persistent class for the zusatz_wert database table. - */ -@Entity -@Table(name="zusatz_wert") -public class LZusatzWert extends de.intevation.lada.model.ZusatzWert { - private static final long serialVersionUID = 1L; - - @Column(name="tree_modified", insertable=false, updatable=false) - private Timestamp treeModified; - - @OneToOne - @JoinColumn(name="probe_id", insertable=false, updatable=false) - private LProbe probe; - - @Transient - private Timestamp parentModified; - - public Timestamp getTreeModified() { - return treeModified; - } - - public void setTreeModified(Timestamp treeModified) { - this.treeModified = treeModified; - } - - public Timestamp getParentModified() { - if (this.parentModified == null && this.probe != null) { - return this.probe.getTreeModified(); - } - return this.parentModified; - } - - public void setParentModified(Timestamp parentModified) { - this.parentModified = parentModified; - } -}
--- a/src/main/java/de/intevation/lada/model/land/Messprogramm.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/model/land/Messprogramm.java Fri Jul 08 15:32:36 2016 +0200 @@ -1,10 +1,3 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ package de.intevation.lada.model.land; import java.io.Serializable; @@ -15,20 +8,18 @@ import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; -import javax.persistence.Table; /** * The persistent class for the messprogramm database table. + * */ @Entity -@Table(name="messprogramm") public class Messprogramm implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) private Integer id; @Column(name="ba_id") @@ -49,6 +40,11 @@ @Column(name="intervall_offset") private Integer intervallOffset; + private String kommentar; + + @Column(name="labor_mst_id") + private String laborMstId; + @Column(name="letzte_aenderung") private Timestamp letzteAenderung; @@ -58,14 +54,6 @@ @Column(name="mst_id") private String mstId; - @Column(name="labor_mst_id") - private String laborMstId; - - private String name; - - @Column(name="netzbetreiber_id") - private String netzbetreiberId; - @Column(name="ort_id") private Integer ortId; @@ -150,10 +138,30 @@ this.intervallOffset = intervallOffset; } + public String getKommentar() { + return this.kommentar; + } + + public void setKommentar(String kommentar) { + this.kommentar = kommentar; + } + + public String getLaborMstId() { + return this.laborMstId; + } + + public void setLaborMstId(String laborMstId) { + this.laborMstId = laborMstId; + } + public Timestamp getLetzteAenderung() { return this.letzteAenderung; } + public void setLetzteAenderung(Timestamp letzteAenderung) { + this.letzteAenderung = letzteAenderung; + } + public String getMediaDesk() { return this.mediaDesk; } @@ -170,30 +178,6 @@ this.mstId = mstId; } - public String getLaborMstId() { - return laborMstId; - } - - public void setLaborMstId(String laborMstId) { - this.laborMstId = laborMstId; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public String getNetzbetreiberId() { - return this.netzbetreiberId; - } - - public void setNetzbetreiberId(String netzbetreiberId) { - this.netzbetreiberId = netzbetreiberId; - } - public Integer getOrtId() { return this.ortId; } @@ -265,4 +249,5 @@ public void setUmwId(String umwId) { this.umwId = umwId; } + }
--- a/src/main/java/de/intevation/lada/model/land/MessprogrammMmt.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/model/land/MessprogrammMmt.java Fri Jul 08 15:32:36 2016 +0200 @@ -1,10 +1,3 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ package de.intevation.lada.model.land; import java.io.Serializable; @@ -22,10 +15,9 @@ import org.hibernate.annotations.TypeDefs; import de.intevation.lada.util.data.IntegerArrayType; - - /** * The persistent class for the messprogramm_mmt database table. + * */ @Entity @Table(name="messprogramm_mmt") @@ -35,7 +27,6 @@ @Id @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) private Integer id; @Column(name="letzte_aenderung") @@ -44,12 +35,12 @@ @Type(type="IntegerArray") private Integer[] messgroessen; + @Column(name="messprogramm_id") + private Integer messprogrammId; + @Column(name="mmt_id") private String mmtId; - @Column(name="messprogramm_id") - private Integer messprogrammId; - public MessprogrammMmt() { } @@ -65,6 +56,10 @@ return this.letzteAenderung; } + public void setLetzteAenderung(Timestamp letzteAenderung) { + this.letzteAenderung = letzteAenderung; + } + public Integer[] getMessgroessen() { return this.messgroessen; } @@ -73,6 +68,14 @@ this.messgroessen = messgroessen; } + public Integer getMessprogrammId() { + return this.messprogrammId; + } + + public void setMessprogrammId(Integer messprogrammId) { + this.messprogrammId = messprogrammId; + } + public String getMmtId() { return this.mmtId; } @@ -81,11 +84,4 @@ this.mmtId = mmtId; } - public Integer getMessprogrammId() { - return this.messprogrammId; - } - - public void setMessprogramm(Integer messprogrammId) { - this.messprogrammId = messprogrammId; - } }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/land/Messung.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,221 @@ +package de.intevation.lada.model.land; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Transient; + + +/** + * The persistent class for the messung database table. + * + */ +@Entity +public class Messung implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + private Integer id; + + private Boolean fertig; + + private Boolean geplant; + + @Column(name="id_alt") + private Integer idAlt; + + @Column(name="letzte_aenderung") + private Timestamp letzteAenderung; + + private Integer messdauer; + + private Timestamp messzeitpunkt; + + @Column(name="mmt_id") + private String mmtId; + + @Column(name="nebenproben_nr") + private String nebenprobenNr; + + @Column(name="probe_id") + private Integer probeId; + + private Integer status; + + @Column(name="tree_modified") + private Timestamp treeModified; + + @Transient + private Boolean statusEdit; + + @Transient + private Timestamp parentModified; + + @Transient + private boolean owner; + + @Transient + private boolean readonly; + + public Messung() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Boolean getFertig() { + return this.fertig; + } + + public void setFertig(Boolean fertig) { + this.fertig = fertig; + } + + public Boolean getGeplant() { + return this.geplant; + } + + public void setGeplant(Boolean geplant) { + this.geplant = geplant; + } + + public Integer getIdAlt() { + return this.idAlt; + } + + public void setIdAlt(Integer idAlt) { + this.idAlt = idAlt; + } + + public Timestamp getLetzteAenderung() { + return this.letzteAenderung; + } + + public void setLetzteAenderung(Timestamp letzteAenderung) { + this.letzteAenderung = letzteAenderung; + } + + public Integer getMessdauer() { + return this.messdauer; + } + + public void setMessdauer(Integer messdauer) { + this.messdauer = messdauer; + } + + public Timestamp getMesszeitpunkt() { + return this.messzeitpunkt; + } + + public void setMesszeitpunkt(Timestamp messzeitpunkt) { + this.messzeitpunkt = messzeitpunkt; + } + + public String getMmtId() { + return this.mmtId; + } + + public void setMmtId(String mmtId) { + this.mmtId = mmtId; + } + + public String getNebenprobenNr() { + return this.nebenprobenNr; + } + + public void setNebenprobenNr(String nebenprobenNr) { + this.nebenprobenNr = nebenprobenNr; + } + + public Integer getProbeId() { + return this.probeId; + } + + public void setProbeId(Integer probeId) { + this.probeId = probeId; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Timestamp getTreeModified() { + return this.treeModified; + } + + public void setTreeModified(Timestamp treeModified) { + this.treeModified = treeModified; + } + + /** + * @return the statusEdit + */ + public Boolean getStatusEdit() { + return statusEdit; + } + + /** + * @param statusEdit the statusEdit to set + */ + public void setStatusEdit(Boolean statusEdit) { + this.statusEdit = statusEdit; + } + + /** + * @return the parentModified + */ + public Timestamp getParentModified() { + return parentModified; + } + + /** + * @param parentModified the parentModified to set + */ + public void setParentModified(Timestamp parentModified) { + this.parentModified = parentModified; + } + + /** + * @return the owner + */ + public boolean isOwner() { + return owner; + } + + /** + * @param owner the owner to set + */ + public void setOwner(boolean owner) { + this.owner = owner; + } + + /** + * @return the readonly + */ + public boolean isReadonly() { + return readonly; + } + + /** + * @param readonly the readonly to set + */ + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } + +}
--- a/src/main/java/de/intevation/lada/model/land/MessungTranslation.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.land; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.OneToOne; -import javax.persistence.Table; - -import org.hibernate.annotations.DynamicInsert; -import org.hibernate.annotations.DynamicUpdate; - -import com.fasterxml.jackson.annotation.JsonIgnore; - - -/** - * The persistent class for the messung_translation database table. - */ -@Entity -@Table(name="messung_translation") -@DynamicInsert -@DynamicUpdate -public class MessungTranslation implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true) - private Integer id; - - @OneToOne - private LMessung messungs; - - @Column(name="messungs_id_alt") - private Integer messungsIdAlt; - - public MessungTranslation() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - @JsonIgnore - public LMessung getMessungsId() { - return this.messungs; - } - - public void setMessungsId(LMessung messung) { - this.messungs = messung; - } - - public Integer getMessungsIdAlt() { - return this.messungsIdAlt; - } - - public void setMessungsIdAlt(Integer messungsIdAlt) { - this.messungsIdAlt = messungsIdAlt; - } -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/land/Messwert.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,195 @@ +package de.intevation.lada.model.land; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Transient; + + +/** + * The persistent class for the messwert database table. + * + */ +@Entity +public class Messwert implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + private Integer id; + + private Boolean grenzwertueberschreitung; + + @Column(name="letzte_aenderung") + private Timestamp letzteAenderung; + + @Column(name="meh_id") + private Integer mehId; + + private Float messfehler; + + @Column(name="messgroesse_id") + private Integer messgroesseId; + + @Column(name="messungs_id") + private Integer messungsId; + + private Double messwert; + + @Column(name="messwert_nwg") + private String messwertNwg; + + @Column(name="nwg_zu_messwert") + private Double nwgZuMesswert; + + @Column(name="tree_modified") + private Timestamp treeModified; + + @Transient + private boolean owner; + + @Transient + private boolean readonly; + + @Transient + private Timestamp parentModified; + + public Messwert() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Boolean getGrenzwertueberschreitung() { + return this.grenzwertueberschreitung; + } + + public void setGrenzwertueberschreitung(Boolean grenzwertueberschreitung) { + this.grenzwertueberschreitung = grenzwertueberschreitung; + } + + public Timestamp getLetzteAenderung() { + return this.letzteAenderung; + } + + public void setLetzteAenderung(Timestamp letzteAenderung) { + this.letzteAenderung = letzteAenderung; + } + + public Integer getMehId() { + return this.mehId; + } + + public void setMehId(Integer mehId) { + this.mehId = mehId; + } + + public Float getMessfehler() { + return this.messfehler; + } + + public void setMessfehler(Float messfehler) { + this.messfehler = messfehler; + } + + public Integer getMessgroesseId() { + return this.messgroesseId; + } + + public void setMessgroesseId(Integer messgroesseId) { + this.messgroesseId = messgroesseId; + } + + public Integer getMessungsId() { + return this.messungsId; + } + + public void setMessungsId(Integer messungsId) { + this.messungsId = messungsId; + } + + public Double getMesswert() { + return this.messwert; + } + + public void setMesswert(Double messwert) { + this.messwert = messwert; + } + + public String getMesswertNwg() { + return this.messwertNwg; + } + + public void setMesswertNwg(String messwertNwg) { + this.messwertNwg = messwertNwg; + } + + public Double getNwgZuMesswert() { + return this.nwgZuMesswert; + } + + public void setNwgZuMesswert(Double nwgZuMesswert) { + this.nwgZuMesswert = nwgZuMesswert; + } + + public Timestamp getTreeModified() { + return this.treeModified; + } + + public void setTreeModified(Timestamp treeModified) { + this.treeModified = treeModified; + } + + /** + * @return the owner + */ + public boolean isOwner() { + return owner; + } + + /** + * @param owner the owner to set + */ + public void setOwner(boolean owner) { + this.owner = owner; + } + + /** + * @return the readonly + */ + public boolean isReadonly() { + return readonly; + } + + /** + * @param readonly the readonly to set + */ + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } + + /** + * @return the parentModified + */ + public Timestamp getParentModified() { + return parentModified; + } + + /** + * @param parentModified the parentModified to set + */ + public void setParentModified(Timestamp parentModified) { + this.parentModified = parentModified; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/land/Ortszuordnung.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,101 @@ +package de.intevation.lada.model.land; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + + +/** + * The persistent class for the ortszuordnung database table. + * + */ +@Entity +public class Ortszuordnung implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + private Integer id; + + @Column(name="letzte_aenderung") + private Timestamp letzteAenderung; + + @Column(name="ort_id") + private Long ortId; + + @Column(name="ortszuordnung_typ") + private String ortszuordnungTyp; + + private String ortszusatztext; + + @Column(name="probe_id") + private Integer probeId; + + @Column(name="tree_modified") + private Timestamp treeModified; + + public Ortszuordnung() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Timestamp getLetzteAenderung() { + return this.letzteAenderung; + } + + public void setLetzteAenderung(Timestamp letzteAenderung) { + this.letzteAenderung = letzteAenderung; + } + + public Long getOrtId() { + return this.ortId; + } + + public void setOrtId(Long ortId) { + this.ortId = ortId; + } + + public String getOrtszuordnungTyp() { + return this.ortszuordnungTyp; + } + + public void setOrtszuordnungTyp(String ortszuordnungTyp) { + this.ortszuordnungTyp = ortszuordnungTyp; + } + + public String getOrtszusatztext() { + return this.ortszusatztext; + } + + public void setOrtszusatztext(String ortszusatztext) { + this.ortszusatztext = ortszusatztext; + } + + public Integer getProbeId() { + return this.probeId; + } + + public void setProbeId(Integer probeId) { + this.probeId = probeId; + } + + public Timestamp getTreeModified() { + return this.treeModified; + } + + public void setTreeModified(Timestamp treeModified) { + this.treeModified = treeModified; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/land/Probe.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,297 @@ +package de.intevation.lada.model.land; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Transient; + + +/** + * The persistent class for the probe database table. + * + */ +@Entity +public class Probe implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + private Integer id; + + @Column(name="ba_id") + private String baId; + + @Column(name="datenbasis_id") + private Integer datenbasisId; + + @Column(name="erzeuger_id") + private Integer erzeugerId; + + @Column(name="hauptproben_nr") + private String hauptprobenNr; + + @Column(name="id_alt") + private String idAlt; + + @Column(name="labor_mst_id") + private String laborMstId; + + @Column(name="letzte_aenderung") + private Timestamp letzteAenderung; + + private String media; + + @Column(name="media_desk") + private String mediaDesk; + + private Long mittelungsdauer; + + @Column(name="mpl_id") + private Integer mplId; + + @Column(name="mpr_id") + private Integer mprId; + + @Column(name="mst_id") + private String mstId; + + @Column(name="probe_nehmer_id") + private Integer probeNehmerId; + + @Column(name="probeentnahme_beginn") + private Timestamp probeentnahmeBeginn; + + @Column(name="probeentnahme_ende") + private Timestamp probeentnahmeEnde; + + @Column(name="probenart_id") + private Integer probenartId; + + @Column(name="solldatum_beginn") + private Timestamp solldatumBeginn; + + @Column(name="solldatum_ende") + private Timestamp solldatumEnde; + + private Boolean test; + + @Column(name="tree_modified") + private Timestamp treeModified; + + @Column(name="umw_id") + private String umwId; + + @Transient + private boolean readonly; + + @Transient + private boolean owner; + + public Probe() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBaId() { + return this.baId; + } + + public void setBaId(String baId) { + this.baId = baId; + } + + public Integer getDatenbasisId() { + return this.datenbasisId; + } + + public void setDatenbasisId(Integer datenbasisId) { + this.datenbasisId = datenbasisId; + } + + public Integer getErzeugerId() { + return this.erzeugerId; + } + + public void setErzeugerId(Integer erzeugerId) { + this.erzeugerId = erzeugerId; + } + + public String getHauptprobenNr() { + return this.hauptprobenNr; + } + + public void setHauptprobenNr(String hauptprobenNr) { + this.hauptprobenNr = hauptprobenNr; + } + + public String getIdAlt() { + return this.idAlt; + } + + public void setIdAlt(String idAlt) { + this.idAlt = idAlt; + } + + public String getLaborMstId() { + return this.laborMstId; + } + + public void setLaborMstId(String laborMstId) { + this.laborMstId = laborMstId; + } + + public Timestamp getLetzteAenderung() { + return this.letzteAenderung; + } + + public void setLetzteAenderung(Timestamp letzteAenderung) { + this.letzteAenderung = letzteAenderung; + } + + public String getMedia() { + return this.media; + } + + public void setMedia(String media) { + this.media = media; + } + + public String getMediaDesk() { + return this.mediaDesk; + } + + public void setMediaDesk(String mediaDesk) { + this.mediaDesk = mediaDesk; + } + + public Long getMittelungsdauer() { + return this.mittelungsdauer; + } + + public void setMittelungsdauer(Long mittelungsdauer) { + this.mittelungsdauer = mittelungsdauer; + } + + public Integer getMplId() { + return this.mplId; + } + + public void setMplId(Integer mplId) { + this.mplId = mplId; + } + + public Integer getMprId() { + return this.mprId; + } + + public void setMprId(Integer mprId) { + this.mprId = mprId; + } + + public String getMstId() { + return this.mstId; + } + + public void setMstId(String mstId) { + this.mstId = mstId; + } + + public Integer getProbeNehmerId() { + return this.probeNehmerId; + } + + public void setProbeNehmerId(Integer probeNehmerId) { + this.probeNehmerId = probeNehmerId; + } + + public Timestamp getProbeentnahmeBeginn() { + return this.probeentnahmeBeginn; + } + + public void setProbeentnahmeBeginn(Timestamp probeentnahmeBeginn) { + this.probeentnahmeBeginn = probeentnahmeBeginn; + } + + public Timestamp getProbeentnahmeEnde() { + return this.probeentnahmeEnde; + } + + public void setProbeentnahmeEnde(Timestamp probeentnahmeEnde) { + this.probeentnahmeEnde = probeentnahmeEnde; + } + + public Integer getProbenartId() { + return this.probenartId; + } + + public void setProbenartId(Integer probenartId) { + this.probenartId = probenartId; + } + + public Timestamp getSolldatumBeginn() { + return this.solldatumBeginn; + } + + public void setSolldatumBeginn(Timestamp solldatumBeginn) { + this.solldatumBeginn = solldatumBeginn; + } + + public Timestamp getSolldatumEnde() { + return this.solldatumEnde; + } + + public void setSolldatumEnde(Timestamp solldatumEnde) { + this.solldatumEnde = solldatumEnde; + } + + public Boolean getTest() { + return this.test; + } + + public void setTest(Boolean test) { + this.test = test; + } + + public Timestamp getTreeModified() { + return this.treeModified; + } + + public void setTreeModified(Timestamp treeModified) { + this.treeModified = treeModified; + } + + public String getUmwId() { + return this.umwId; + } + + public void setUmwId(String umwId) { + this.umwId = umwId; + } + + public boolean isReadonly() { + return readonly; + } + + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } + + public boolean isOwner() { + return owner; + } + + public void setOwner(boolean owner) { + this.owner = owner; + } +}
--- a/src/main/java/de/intevation/lada/model/land/ProbeInfo.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,273 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.land; - -import java.io.Serializable; -import javax.persistence.*; -import java.sql.Timestamp; - - -/** - * The persistent class for the probe_info database table. - */ -@Entity -@Table(name="probe_info") -@NamedQuery(name="ProbeInfo.findAll", query="SELECT p FROM ProbeInfo p") -public class ProbeInfo implements Serializable { - private static final long serialVersionUID = 1L; - - @Column(name="ba_id") - private String baId; - - @Column(name="datenbasis_id") - private Integer datenbasisId; - - @Column(name="erzeuger_id") - private Integer erzeugerId; - - @Column(name="hauptproben_nr") - private String hauptprobenNr; - - @Id - private Integer id; - - @Column(name="letzte_aenderung") - private Timestamp letzteAenderung; - - private String media; - - @Column(name="media_desk") - private String mediaDesk; - - private Long mittelungsdauer; - - @Column(name="mp_kat") - private String mpKat; - - @Column(name="mpl_id") - private String mplId; - - @Column(name="mpr_id") - private Integer mprId; - - @Column(name="mst_id") - private String mstId; - - @Column(name="netzbetreiber_id") - private String netzbetreiberId; - - @Column(name="probe_id_alt") - private String probeIdAlt; - - @Column(name="probe_nehmer_id") - private Integer probeNehmerId; - - @Column(name="probeentnahme_beginn") - private Timestamp probeentnahmeBeginn; - - @Column(name="probeentnahme_ende") - private Timestamp probeentnahmeEnde; - - @Column(name="probenart_id") - private Integer probenartId; - - @Column(name="solldatum_beginn") - private Timestamp solldatumBeginn; - - @Column(name="solldatum_ende") - private Timestamp solldatumEnde; - - private Boolean test; - - @Column(name="umw_id") - private String umwId; - - public ProbeInfo() { - } - - public String getBaId() { - return this.baId; - } - - public void setBaId(String baId) { - this.baId = baId; - } - - public Integer getDatenbasisId() { - return this.datenbasisId; - } - - public void setDatenbasisId(Integer datenbasisId) { - this.datenbasisId = datenbasisId; - } - - public Integer getErzeugerId() { - return this.erzeugerId; - } - - public void setErzeugerId(Integer erzeugerId) { - this.erzeugerId = erzeugerId; - } - - public String getHauptprobenNr() { - return this.hauptprobenNr; - } - - public void setHauptprobenNr(String hauptprobenNr) { - this.hauptprobenNr = hauptprobenNr; - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Timestamp getLetzteAenderung() { - return this.letzteAenderung; - } - - public String getMedia() { - return this.media; - } - - public void setMedia(String media) { - this.media = media; - } - - public String getMediaDesk() { - return this.mediaDesk; - } - - public void setMediaDesk(String mediaDesk) { - this.mediaDesk = mediaDesk; - } - - public Long getMittelungsdauer() { - return this.mittelungsdauer; - } - - public void setMittelungsdauer(Long mittelungsdauer) { - this.mittelungsdauer = mittelungsdauer; - } - - public String getMpKat() { - return this.mpKat; - } - - public void setMpKat(String mpKat) { - this.mpKat = mpKat; - } - - public String getMplId() { - return this.mplId; - } - - public void setMplId(String mplId) { - this.mplId = mplId; - } - - public Integer getMprId() { - return this.mprId; - } - - public void setMprId(Integer mprId) { - this.mprId = mprId; - } - - public String getMstId() { - return this.mstId; - } - - public void setMstId(String mstId) { - this.mstId = mstId; - } - - public String getNetzbetreiberId() { - return this.netzbetreiberId; - } - - public void setNetzbetreiberId(String netzbetreiberId) { - this.netzbetreiberId = netzbetreiberId; - } - - public String getProbeIdAlt() { - return this.probeIdAlt; - } - - public void setProbeIdAlt(String probeIdAlt) { - this.probeIdAlt = probeIdAlt; - } - - public Integer getProbeNehmerId() { - return this.probeNehmerId; - } - - public void setProbeNehmerId(Integer probeNehmerId) { - this.probeNehmerId = probeNehmerId; - } - - public Timestamp getProbeentnahmeBeginn() { - return this.probeentnahmeBeginn; - } - - public void setProbeentnahmeBeginn(Timestamp probeentnahmeBeginn) { - this.probeentnahmeBeginn = probeentnahmeBeginn; - } - - public Timestamp getProbeentnahmeEnde() { - return this.probeentnahmeEnde; - } - - public void setProbeentnahmeEnde(Timestamp probeentnahmeEnde) { - this.probeentnahmeEnde = probeentnahmeEnde; - } - - public Integer getProbenartId() { - return this.probenartId; - } - - public void setProbenartId(Integer probenartId) { - this.probenartId = probenartId; - } - - public Timestamp getSolldatumBeginn() { - return this.solldatumBeginn; - } - - public void setSolldatumBeginn(Timestamp solldatumBeginn) { - this.solldatumBeginn = solldatumBeginn; - } - - public Timestamp getSolldatumEnde() { - return this.solldatumEnde; - } - - public void setSolldatumEnde(Timestamp solldatumEnde) { - this.solldatumEnde = solldatumEnde; - } - - public Boolean getTest() { - return this.test; - } - - public void setTest(Boolean test) { - this.test = test; - } - - public String getUmwId() { - return this.umwId; - } - - public void setUmwId(String umwId) { - this.umwId = umwId; - } - -}
--- a/src/main/java/de/intevation/lada/model/land/ProbeInfo2.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,283 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.land; - -import java.io.Serializable; -import javax.persistence.*; -import java.sql.Timestamp; - - -/** - * The persistent class for the probe_info2 database table. - */ -@Entity -@Table(name="probe_info2") -@NamedQuery(name="ProbeInfo2.findAll", query="SELECT p FROM ProbeInfo2 p") -public class ProbeInfo2 implements Serializable { - private static final long serialVersionUID = 1L; - - @Column(name="ba_id") - private String baId; - - @Column(name="datenbasis_id") - private Integer datenbasisId; - - @Column(name="erzeuger_id") - private Integer erzeugerId; - - @Column(name="hauptproben_nr") - private String hauptprobenNr; - - @Id - private Integer id; - - @Column(name="letzte_aenderung") - private Timestamp letzteAenderung; - - private String media; - - @Column(name="media_desk") - private String mediaDesk; - - private Long mittelungsdauer; - - @Column(name="mp_kat") - private String mpKat; - - @Column(name="mpl_id") - private String mplId; - - @Column(name="mpr_id") - private Integer mprId; - - @Column(name="mst_id") - private String mstId; - - @Column(name="netzbetreiber_id") - private String netzbetreiberId; - - @Column(name="probe_id_alt") - private String probeIdAlt; - - @Column(name="probe_nehmer_id") - private Integer probeNehmerId; - - @Column(name="probeentnahme_beginn") - private Timestamp probeentnahmeBeginn; - - @Column(name="probeentnahme_ende") - private Timestamp probeentnahmeEnde; - - @Column(name="probenart_id") - private Integer probenartId; - - private Boolean readonly; - - @Column(name="solldatum_beginn") - private Timestamp solldatumBeginn; - - @Column(name="solldatum_ende") - private Timestamp solldatumEnde; - - private Boolean test; - - @Column(name="umw_id") - private String umwId; - - public ProbeInfo2() { - } - - public String getBaId() { - return this.baId; - } - - public void setBaId(String baId) { - this.baId = baId; - } - - public Integer getDatenbasisId() { - return this.datenbasisId; - } - - public void setDatenbasisId(Integer datenbasisId) { - this.datenbasisId = datenbasisId; - } - - public Integer getErzeugerId() { - return this.erzeugerId; - } - - public void setErzeugerId(Integer erzeugerId) { - this.erzeugerId = erzeugerId; - } - - public String getHauptprobenNr() { - return this.hauptprobenNr; - } - - public void setHauptprobenNr(String hauptprobenNr) { - this.hauptprobenNr = hauptprobenNr; - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Timestamp getLetzteAenderung() { - return this.letzteAenderung; - } - - public String getMedia() { - return this.media; - } - - public void setMedia(String media) { - this.media = media; - } - - public String getMediaDesk() { - return this.mediaDesk; - } - - public void setMediaDesk(String mediaDesk) { - this.mediaDesk = mediaDesk; - } - - public Long getMittelungsdauer() { - return this.mittelungsdauer; - } - - public void setMittelungsdauer(Long mittelungsdauer) { - this.mittelungsdauer = mittelungsdauer; - } - - public String getMpKat() { - return this.mpKat; - } - - public void setMpKat(String mpKat) { - this.mpKat = mpKat; - } - - public String getMplId() { - return this.mplId; - } - - public void setMplId(String mplId) { - this.mplId = mplId; - } - - public Integer getMprId() { - return this.mprId; - } - - public void setMprId(Integer mprId) { - this.mprId = mprId; - } - - public String getMstId() { - return this.mstId; - } - - public void setMstId(String mstId) { - this.mstId = mstId; - } - - public String getNetzbetreiberId() { - return this.netzbetreiberId; - } - - public void setNetzbetreiberId(String netzbetreiberId) { - this.netzbetreiberId = netzbetreiberId; - } - - public String getProbeIdAlt() { - return this.probeIdAlt; - } - - public void setProbeIdAlt(String probeIdAlt) { - this.probeIdAlt = probeIdAlt; - } - - public Integer getProbeNehmerId() { - return this.probeNehmerId; - } - - public void setProbeNehmerId(Integer probeNehmerId) { - this.probeNehmerId = probeNehmerId; - } - - public Timestamp getProbeentnahmeBeginn() { - return this.probeentnahmeBeginn; - } - - public void setProbeentnahmeBeginn(Timestamp probeentnahmeBeginn) { - this.probeentnahmeBeginn = probeentnahmeBeginn; - } - - public Timestamp getProbeentnahmeEnde() { - return this.probeentnahmeEnde; - } - - public void setProbeentnahmeEnde(Timestamp probeentnahmeEnde) { - this.probeentnahmeEnde = probeentnahmeEnde; - } - - public Integer getProbenartId() { - return this.probenartId; - } - - public void setProbenartId(Integer probenartId) { - this.probenartId = probenartId; - } - - public Boolean getReadonly() { - return this.readonly; - } - - public void setReadonly(Boolean readonly) { - this.readonly = readonly; - } - - public Timestamp getSolldatumBeginn() { - return this.solldatumBeginn; - } - - public void setSolldatumBeginn(Timestamp solldatumBeginn) { - this.solldatumBeginn = solldatumBeginn; - } - - public Timestamp getSolldatumEnde() { - return this.solldatumEnde; - } - - public void setSolldatumEnde(Timestamp solldatumEnde) { - this.solldatumEnde = solldatumEnde; - } - - public Boolean getTest() { - return this.test; - } - - public void setTest(Boolean test) { - this.test = test; - } - - public String getUmwId() { - return this.umwId; - } - - public void setUmwId(String umwId) { - this.umwId = umwId; - } - -}
--- a/src/main/java/de/intevation/lada/model/land/ProbeTranslation.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.land; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.OneToOne; -import javax.persistence.Table; - -import org.hibernate.annotations.DynamicInsert; -import org.hibernate.annotations.DynamicUpdate; - -import com.fasterxml.jackson.annotation.JsonIgnore; - - -/** - * The persistent class for the probe_translation database table. - */ -@Entity -@Table(name="probe_translation") -@DynamicInsert -@DynamicUpdate -public class ProbeTranslation implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true) - private Integer id; - - @OneToOne - private LProbe probe; - - @Column(name="probe_id_alt", insertable= true, updatable=true, nullable=true) - private String probeIdAlt; - - public ProbeTranslation() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - @JsonIgnore - public LProbe getProbeId() { - return this.probe; - } - - public void setProbeId(LProbe probe) { - this.probe = probe; - } - - public String getProbeIdAlt() { - return this.probeIdAlt; - } - - public void setProbeIdAlt(String probeIdAlt) { - this.probeIdAlt = probeIdAlt; - } - -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/land/StatusProtokoll.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,187 @@ +package de.intevation.lada.model.land; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; + + +/** + * The persistent class for the status_protokoll database table. + * + */ +@Entity +@Table(name="status_protokoll") +public class StatusProtokoll implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + private Integer id; + + private Timestamp datum; + + @Column(name="messungs_id") + private Integer messungsId; + + @Column(name="mst_id") + private String mstId; + + @Column(name="status_kombi") + private Integer statusKombi; + + private String text; + + @Column(name="tree_modified") + private Timestamp treeModified; + + @Transient + private boolean owner; + + @Transient + private boolean readonly; + + @Transient + private Timestamp parentModified; + + @Transient + private Integer statusStufe; + + @Transient + private Integer statusWert; + + public StatusProtokoll() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Timestamp getDatum() { + return this.datum; + } + + public void setDatum(Timestamp datum) { + this.datum = datum; + } + + public Integer getMessungsId() { + return this.messungsId; + } + + public void setMessungsId(Integer messungsId) { + this.messungsId = messungsId; + } + + public String getMstId() { + return this.mstId; + } + + public void setMstId(String mstId) { + this.mstId = mstId; + } + + public Integer getStatusKombi() { + return this.statusKombi; + } + + public void setStatusKombi(Integer statusKombi) { + this.statusKombi = statusKombi; + } + + public String getText() { + return this.text; + } + + public void setText(String text) { + this.text = text; + } + + public Timestamp getTreeModified() { + return this.treeModified; + } + + public void setTreeModified(Timestamp treeModified) { + this.treeModified = treeModified; + } + + /** + * @return the owner + */ + public boolean isOwner() { + return owner; + } + + /** + * @param owner the owner to set + */ + public void setOwner(boolean owner) { + this.owner = owner; + } + + /** + * @return the readonly + */ + public boolean isReadonly() { + return readonly; + } + + /** + * @param readonly the readonly to set + */ + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } + + /** + * @return the parentModified + */ + public Timestamp getParentModified() { + return parentModified; + } + + /** + * @param parentModified the parentModified to set + */ + public void setParentModified(Timestamp parentModified) { + this.parentModified = parentModified; + } + + /** + * @return the statusStufe + */ + public Integer getStatusStufe() { + return statusStufe; + } + + /** + * @param statusStufe the statusStufe to set + */ + public void setStatusStufe(Integer statusStufe) { + this.statusStufe = statusStufe; + } + + /** + * @return the statusWert + */ + public Integer getStatusWert() { + return statusWert; + } + + /** + * @param statusWert the statusWert to set + */ + public void setStatusWert(Integer statusWert) { + this.statusWert = statusWert; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/land/ZusatzWert.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,149 @@ +package de.intevation.lada.model.land; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; + + +/** + * The persistent class for the zusatz_wert database table. + * + */ +@Entity +@Table(name="zusatz_wert") +public class ZusatzWert implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + private Integer id; + + @Column(name="letzte_aenderung") + private Timestamp letzteAenderung; + + private float messfehler; + + @Column(name="messwert_pzs") + private double messwertPzs; + + @Column(name="nwg_zu_messwert") + private double nwgZuMesswert; + + @Column(name="probe_id") + private Integer probeId; + + @Column(name="pzs_id") + private String pzsId; + + @Column(name="tree_modified") + private Timestamp treeModified; + + @Transient + private boolean owner; + + @Transient + private boolean readonly; + + public ZusatzWert() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Timestamp getLetzteAenderung() { + return this.letzteAenderung; + } + + public void setLetzteAenderung(Timestamp letzteAenderung) { + this.letzteAenderung = letzteAenderung; + } + + public float getMessfehler() { + return this.messfehler; + } + + public void setMessfehler(float messfehler) { + this.messfehler = messfehler; + } + + public double getMesswertPzs() { + return this.messwertPzs; + } + + public void setMesswertPzs(double messwertPzs) { + this.messwertPzs = messwertPzs; + } + + public double getNwgZuMesswert() { + return this.nwgZuMesswert; + } + + public void setNwgZuMesswert(double nwgZuMesswert) { + this.nwgZuMesswert = nwgZuMesswert; + } + + public Integer getProbeId() { + return this.probeId; + } + + public void setProbeId(Integer probeId) { + this.probeId = probeId; + } + + public String getPzsId() { + return this.pzsId; + } + + public void setPzsId(String pzsId) { + this.pzsId = pzsId; + } + + public Timestamp getTreeModified() { + return this.treeModified; + } + + public void setTreeModified(Timestamp treeModified) { + this.treeModified = treeModified; + } + + /** + * @return the owner + */ + public boolean isOwner() { + return owner; + } + + /** + * @param owner the owner to set + */ + public void setOwner(boolean owner) { + this.owner = owner; + } + + /** + * @return the readonly + */ + public boolean isReadonly() { + return readonly; + } + + /** + * @param readonly the readonly to set + */ + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } + +}
--- a/src/main/java/de/intevation/lada/model/stamm/Auth.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the auth database table. - */ -@Entity -@Table(name="auth") -public class Auth implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - @Column(name="funktion_id") - private Integer funktionId; - - @Column(name="labor_mst_id") - private String laborMstId; - - @Column(name="ldap_group") - private String ldapGroup; - - @Column(name="mst_id") - private String mstId; - - @Column(name="netzbetreiber_id") - private String netzbetreiberId; - - public Auth() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getFunktionId() { - return this.funktionId; - } - - public void setFunktionId(Integer funktionId) { - this.funktionId = funktionId; - } - - public String getLaborMstId() { - return this.laborMstId; - } - - public void setLaborMstId(String laborMstId) { - this.laborMstId = laborMstId; - } - - public String getLdapGroup() { - return this.ldapGroup; - } - - public void setLdapGroup(String ldapGroup) { - this.ldapGroup = ldapGroup; - } - - public String getMstId() { - return this.mstId; - } - - public void setMstId(String mstId) { - this.mstId = mstId; - } - - public String getNetzbetreiberId() { - return this.netzbetreiberId; - } - - public void setNetzbetreiberId(String netzbetreiberId) { - this.netzbetreiberId = netzbetreiberId; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/AuthFunktion.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the auth_funktion database table. - * - */ -@Entity -@Table(name="auth_funktion") -public class AuthFunktion implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String funktion; - - public AuthFunktion() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getFunktion() { - return this.funktion; - } - - public void setFunktion(String funktion) { - this.funktion = funktion; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/AuthLstUmw.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the auth_lst_umw database table. - * - */ -@Entity -@Table(name="auth_lst_umw") -public class AuthLstUmw implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - @Column(name="lst_id") - private String lstId; - - @Column(name="umw_id") - private String umwId; - - public AuthLstUmw() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getLstId() { - return this.lstId; - } - - public void setLstId(String lstId) { - this.lstId = lstId; - } - - public String getUmwId() { - return this.umwId; - } - - public void setUmwId(String umwId) { - this.umwId = umwId; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/Datenbasis.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the datenbasis database table. - */ -@Entity -@Table(name="datenbasis") -public class Datenbasis implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String beschreibung; - - private String datenbasis; - - public Datenbasis() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getBeschreibung() { - return this.beschreibung; - } - - public void setBeschreibung(String beschreibung) { - this.beschreibung = beschreibung; - } - - public String getDatenbasis() { - return this.datenbasis; - } - - public void setDatenbasis(String datenbasis) { - this.datenbasis = datenbasis; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/DatensatzErzeuger.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.Transient; - - -/** - * The persistent class for the datensatz_erzeuger database table. - * - */ -@Entity -@Table(name="datensatz_erzeuger") -public class DatensatzErzeuger implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - private String bezeichnung; - - @Column(name="da_erzeuger_id") - private String daErzeugerId; - - @Column(name="letzte_aenderung") - private Timestamp letzteAenderung; - - @Column(name="mst_id") - private String mstId; - - @Column(name="netzbetreiber_id") - private String netzbetreiberId; - - @Transient - private boolean readonly; - - public DatensatzErzeuger() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getBezeichnung() { - return this.bezeichnung; - } - - public void setBezeichnung(String bezeichnung) { - this.bezeichnung = bezeichnung; - } - - public String getDaErzeugerId() { - return this.daErzeugerId; - } - - public void setDaErzeugerId(String daErzeugerId) { - this.daErzeugerId = daErzeugerId; - } - - public Timestamp getLetzteAenderung() { - return this.letzteAenderung; - } - - public String getMstId() { - return this.mstId; - } - - public void setMstId(String mstId) { - this.mstId = mstId; - } - - public String getNetzbetreiberId() { - return this.netzbetreiberId; - } - - public void setNetzbetreiberId(String netzbetreiberId) { - this.netzbetreiberId = netzbetreiberId; - } - - public boolean isReadonly() { - return readonly; - } - - public void setReadonly(boolean readonly) { - this.readonly = readonly; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/DeVg.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,215 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.Date; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; - -import org.hibernate.annotations.Type; - -import com.vividsolutions.jts.geom.MultiPolygon; - - -/** - * The persistent class for the de_vg database table. - */ -@Entity -@Table(name="de_vg") -public class DeVg implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String ags; - - private String bemerk; - - @Column(name="debkg_id") - private String debkgId; - - private String des; - - private String gen; - - @Column(name="geom", columnDefinition="geometry") - @Type(type = "org.hibernate.spatial.GeometryType") - private MultiPolygon geom; - - private double gf; - - private double isn; - - private BigDecimal length; - - private String nambild; - - @Column(name="rau_rs") - private String rauRs; - - private String rs; - - @Column(name="rs_alt") - private String rsAlt; - - @Column(name="shape_area") - private BigDecimal shapeArea; - - private double use; - - @Temporal(TemporalType.DATE) - private Date wirksamkei; - - public DeVg() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getAgs() { - return this.ags; - } - - public void setAgs(String ags) { - this.ags = ags; - } - - public String getBemerk() { - return this.bemerk; - } - - public void setBemerk(String bemerk) { - this.bemerk = bemerk; - } - - public String getDebkgId() { - return this.debkgId; - } - - public void setDebkgId(String debkgId) { - this.debkgId = debkgId; - } - - public String getDes() { - return this.des; - } - - public void setDes(String des) { - this.des = des; - } - - public String getGen() { - return this.gen; - } - - public void setGen(String gen) { - this.gen = gen; - } - - public MultiPolygon getGeom() { - return this.geom; - } - - public void setGeom(MultiPolygon geom) { - this.geom = geom; - } - - public double getGf() { - return this.gf; - } - - public void setGf(double gf) { - this.gf = gf; - } - - public double getIsn() { - return this.isn; - } - - public void setIsn(double isn) { - this.isn = isn; - } - - public BigDecimal getLength() { - return this.length; - } - - public void setLength(BigDecimal length) { - this.length = length; - } - - public String getNambild() { - return this.nambild; - } - - public void setNambild(String nambild) { - this.nambild = nambild; - } - - public String getRauRs() { - return this.rauRs; - } - - public void setRauRs(String rauRs) { - this.rauRs = rauRs; - } - - public String getRs() { - return this.rs; - } - - public void setRs(String rs) { - this.rs = rs; - } - - public String getRsAlt() { - return this.rsAlt; - } - - public void setRsAlt(String rsAlt) { - this.rsAlt = rsAlt; - } - - public BigDecimal getShapeArea() { - return this.shapeArea; - } - - public void setShapeArea(BigDecimal shapeArea) { - this.shapeArea = shapeArea; - } - - public double getUse() { - return this.use; - } - - public void setUse(double use) { - this.use = use; - } - - public Date getWirksamkei() { - return this.wirksamkei; - } - - public void setWirksamkei(Date wirksamkei) { - this.wirksamkei = wirksamkei; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/DeskriptorUmwelt.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - -/** - * The persistent class for the deskriptor_umwelt database table. - */ -@Entity -@Table(name="deskriptor_umwelt") -public class DeskriptorUmwelt implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private Integer s00; - - private Integer s01; - - private Integer s02; - - private Integer s03; - - private Integer s04; - - private Integer s05; - - private Integer s06; - - private Integer s07; - - private Integer s08; - - private Integer s09; - - private Integer s10; - - private Integer s11; - - private Integer s12; - - @Column(name="umw_id") - private String umwId; - - public DeskriptorUmwelt() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getS00() { - return this.s00; - } - - public void setS00(Integer s00) { - this.s00 = s00; - } - - public Integer getS01() { - return this.s01; - } - - public void setS01(Integer s01) { - this.s01 = s01; - } - - public Integer getS02() { - return this.s02; - } - - public void setS02(Integer s02) { - this.s02 = s02; - } - - public Integer getS03() { - return this.s03; - } - - public void setS03(Integer s03) { - this.s03 = s03; - } - - public Integer getS04() { - return this.s04; - } - - public void setS04(Integer s04) { - this.s04 = s04; - } - - public Integer getS05() { - return this.s05; - } - - public void setS05(Integer s05) { - this.s05 = s05; - } - - public Integer getS06() { - return this.s06; - } - - public void setS06(Integer s06) { - this.s06 = s06; - } - - public Integer getS07() { - return this.s07; - } - - public void setS07(Integer s07) { - this.s07 = s07; - } - - public Integer getS08() { - return this.s08; - } - - public void setS08(Integer s08) { - this.s08 = s08; - } - - public Integer getS09() { - return this.s09; - } - - public void setS09(Integer s09) { - this.s09 = s09; - } - - public Integer getS10() { - return this.s10; - } - - public void setS10(Integer s10) { - this.s10 = s10; - } - - public Integer getS11() { - return this.s11; - } - - public void setS11(Integer s11) { - this.s11 = s11; - } - - public Integer getS12() { - return this.s12; - } - - public void setS12(Integer s12) { - this.s12 = s12; - } - - public String getUmwId() { - return this.umwId; - } - - public void setUmwId(String umwId) { - this.umwId = umwId; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/Deskriptoren.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,138 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the deskriptoren database table. - */ -@Entity -@Table(name="deskriptoren") -public class Deskriptoren implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String bedeutung; - - private String beschreibung; - - private Integer ebene; - - @Column(name="s_xx") - private Integer sXx; - - private Integer sn; - - private Integer vorgaenger; - - public Deskriptoren() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getBedeutung() { - return this.bedeutung; - } - - public void setBedeutung(String bedeutung) { - this.bedeutung = bedeutung; - } - - public String getBeschreibung() { - return this.beschreibung; - } - - public void setBeschreibung(String beschreibung) { - this.beschreibung = beschreibung; - } - - public Integer getEbene() { - return this.ebene; - } - - public void setEbene(Integer ebene) { - this.ebene = ebene; - } - - public Integer getSXx() { - return this.sXx; - } - - public void setSXx(Integer sXx) { - this.sXx = sXx; - } - - public Integer getSn() { - return this.sn; - } - - public void setSn(Integer sn) { - this.sn = sn; - } - - /* - public Deskriptoren getDeskriptoren() { - return this.deskriptoren; - } - - public void setDeskriptoren(Deskriptoren deskriptoren) { - this.deskriptoren = deskriptoren; - } - - public List<Deskriptoren> getDeskriptorens() { - return this.deskriptorens; - } - - public void setDeskriptorens(List<Deskriptoren> deskriptorens) { - this.deskriptorens = deskriptorens; - } - - public Deskriptoren addDeskriptoren(Deskriptoren deskriptoren) { - getDeskriptorens().add(deskriptoren); - deskriptoren.setDeskriptoren(this); - - return deskriptoren; - } - - public Deskriptoren removeDeskriptoren(Deskriptoren deskriptoren) { - getDeskriptorens().remove(deskriptoren); - deskriptoren.setDeskriptoren(null); - - return deskriptoren; - } - */ - - /** - * @return the vorgaenger - */ - public Integer getVorgaenger() { - return vorgaenger; - } - - /** - * @param vorgaenger the vorgaenger to set - */ - public void setVorgaenger(Integer vorgaenger) { - this.vorgaenger = vorgaenger; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/Favorite.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; - - -/** - * The persistent class for the favorite database table. - * - */ -@Entity -@Table(name="favorite") -public class Favorite implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - //bi-directional many-to-one association to LadaUser - @Column(name="user_id") - private Integer userId; - - @Column(name="query_id") - private Integer queryId; - - public Favorite() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getUserId() { - return this.userId; - } - - public void setUserId(Integer userId) { - this.userId = userId; - } - - public Integer getQueryId() { - return this.queryId; - } - - public void setQueryId(Integer queryId) { - this.queryId = queryId; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/Filter.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.Transient; - -import com.fasterxml.jackson.annotation.JsonIgnore; - - -/** - * The persistent class for the filter database table. - * - */ -@Entity -public class Filter implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - @Column(name="data_index") - private String dataIndex; - - private String label; - - private Boolean multiselect; - - private String type; - - //bi-directional many-to-one association to Query - @ManyToOne - private Query query; - - @Transient - private String value; - - public Filter() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getDataIndex() { - return this.dataIndex; - } - - public void setDataIndex(String dataIndex) { - this.dataIndex = dataIndex; - } - - public String getLabel() { - return this.label; - } - - public void setLabel(String label) { - this.label = label; - } - - public Boolean getMultiselect() { - return this.multiselect; - } - - public void setMultiselect(Boolean multiselect) { - this.multiselect = multiselect; - } - - public String getType() { - return this.type; - } - - public void setType(String type) { - this.type = type; - } - - @JsonIgnore - public Query getQuery() { - return this.query; - } - - @JsonIgnore - public void setQuery(Query query) { - this.query = query; - } - - /** - * @return the value - */ - public String getValue() { - return value; - } - - /** - * @param value the value to set - */ - public void setValue(String value) { - this.value = value; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/FilterValue.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; - - -/** - * The persistent class for the filter_value database table. - * - */ -@Entity -@Table(name="filter_value") -public class FilterValue implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - private String value; - - //bi-directional many-to-one association to Filter - @Column(name="filter_id") - private Integer filterId; - - //bi-directional many-to-one association to LadaUser - @Column(name="user_id") - private Integer userId; - - public FilterValue() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getValue() { - return this.value; - } - - public void setValue(String value) { - this.value = value; - } - - public Integer getFilterId() { - return this.filterId; - } - - public void setFilterId(Integer filterId) { - this.filterId = filterId; - } - - public Integer getUserId() { - return this.userId; - } - - public void setUserId(Integer userId) { - this.userId = userId; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/KoordinatenArt.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the koordinaten_art database table. - */ -@Entity -@Table(name="koordinaten_art") -public class KoordinatenArt implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - @Column(name="idf_geo_key") - private String idfGeoKey; - - private String koordinatenart; - - public KoordinatenArt() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getIdfGeoKey() { - return this.idfGeoKey; - } - - public void setIdfGeoKey(String idfGeoKey) { - this.idfGeoKey = idfGeoKey; - } - - public String getKoordinatenart() { - return this.koordinatenart; - } - - public void setKoordinatenart(String koordinatenart) { - this.koordinatenart = koordinatenart; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/LadaUser.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; -import java.util.List; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.OneToMany; -import javax.persistence.Table; - - -/** - * The persistent class for the lada_user database table. - * - */ -@Entity -@Table(name="lada_user") -public class LadaUser implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - private String name; - - public LadaUser() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/MessEinheit.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the mess_einheit database table. - */ -@Entity -@Table(name="mess_einheit") -public class MessEinheit implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String beschreibung; - - private String einheit; - - @Column(name="eudf_messeinheit_id") - private String eudfMesseinheitId; - - @Column(name="umrechnungs_faktor_eudf") - private Long umrechnungsFaktorEudf; - - public MessEinheit() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getBeschreibung() { - return this.beschreibung; - } - - public void setBeschreibung(String beschreibung) { - this.beschreibung = beschreibung; - } - - public String getEinheit() { - return this.einheit; - } - - public void setEinheit(String einheit) { - this.einheit = einheit; - } - - public String getEudfMesseinheitId() { - return this.eudfMesseinheitId; - } - - public void setEudfMesseinheitId(String eudfMesseinheitId) { - this.eudfMesseinheitId = eudfMesseinheitId; - } - - public Long getUmrechnungsFaktorEudf() { - return this.umrechnungsFaktorEudf; - } - - public void setUmrechnungsFaktorEudf(Long umrechnungsFaktorEudf) { - this.umrechnungsFaktorEudf = umrechnungsFaktorEudf; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/MessMethode.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the mess_methode database table. - */ -@Entity -@Table(name="mess_methode") -public class MessMethode implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private String id; - - private String beschreibung; - - private String messmethode; - - public MessMethode() { - } - - public String getId() { - return this.id; - } - - public void setId(String id) { - this.id = id; - } - - public String getBeschreibung() { - return this.beschreibung; - } - - public void setBeschreibung(String beschreibung) { - this.beschreibung = beschreibung; - } - - public String getMessmethode() { - return this.messmethode; - } - - public void setMessmethode(String messmethode) { - this.messmethode = messmethode; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/MessStelle.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.NamedQuery; -import javax.persistence.Table; - - -/** - * The persistent class for the mess_stelle database table. - */ -@Entity -@Table(name="mess_stelle") -@NamedQuery(name="MessStelle.findAll", query="SELECT m FROM MessStelle m") -public class MessStelle implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private String id; - - private String amtskennung; - - private String beschreibung; - - @Column(name="mess_stelle") - private String messStelle; - - @Column(name="mst_typ") - private String mstTyp; - - @Column(name="netzbetreiber_id") - private String netzbetreiberId; - - public MessStelle() { - } - - public String getId() { - return this.id; - } - - public void setId(String id) { - this.id = id; - } - - public String getAmtskennung() { - return this.amtskennung; - } - - public void setAmtskennung(String amtskennung) { - this.amtskennung = amtskennung; - } - - public String getBeschreibung() { - return this.beschreibung; - } - - public void setBeschreibung(String beschreibung) { - this.beschreibung = beschreibung; - } - - public String getMessStelle() { - return this.messStelle; - } - - public void setMessStelle(String messStelle) { - this.messStelle = messStelle; - } - - public String getMstTyp() { - return this.mstTyp; - } - - public void setMstTyp(String mstTyp) { - this.mstTyp = mstTyp; - } - - public String getNetzbetreiberId() { - return this.netzbetreiberId; - } - - public void setNetzbetreiberId(String netzbetreiberId) { - this.netzbetreiberId = netzbetreiberId; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/Messgroesse.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the messgroesse database table. - */ -@Entity -@Table(name="messgroesse") -public class Messgroesse implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String beschreibung; - - @Column(name="default_farbe") - private String defaultFarbe; - - @Column(name="eudf_nuklid_id") - private Long eudfNuklidId; - - @Column(name="idf_nuklid_key") - private String idfNuklidKey; - - @Column(name="ist_leitnuklid") - private Boolean istLeitnuklid; - - @Column(name="kennung_bvl") - private String kennungBvl; - - private String messgroesse; - - public Messgroesse() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getBeschreibung() { - return this.beschreibung; - } - - public void setBeschreibung(String beschreibung) { - this.beschreibung = beschreibung; - } - - public String getDefaultFarbe() { - return this.defaultFarbe; - } - - public void setDefaultFarbe(String defaultFarbe) { - this.defaultFarbe = defaultFarbe; - } - - public Long getEudfNuklidId() { - return this.eudfNuklidId; - } - - public void setEudfNuklidId(Long eudfNuklidId) { - this.eudfNuklidId = eudfNuklidId; - } - - public String getIdfNuklidKey() { - return this.idfNuklidKey; - } - - public void setIdfNuklidKey(String idfNuklidKey) { - this.idfNuklidKey = idfNuklidKey; - } - - public Boolean getIstLeitnuklid() { - return this.istLeitnuklid; - } - - public void setIstLeitnuklid(Boolean istLeitnuklid) { - this.istLeitnuklid = istLeitnuklid; - } - - public String getKennungBvl() { - return this.kennungBvl; - } - - public void setKennungBvl(String kennungBvl) { - this.kennungBvl = kennungBvl; - } - - public String getMessgroesse() { - return this.messgroesse; - } - - public void setMessgroesse(String messgroesse) { - this.messgroesse = messgroesse; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/MessgroessenGruppe.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the messgroessen_gruppe database table. - */ -@Entity -@Table(name="messgroessen_gruppe") -public class MessgroessenGruppe implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String bezeichnung; - - @Column(name="ist_leitnuklidgruppe") - private String istLeitnuklidgruppe; - - public MessgroessenGruppe() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getBezeichnung() { - return this.bezeichnung; - } - - public void setBezeichnung(String bezeichnung) { - this.bezeichnung = bezeichnung; - } - - public String getIstLeitnuklidgruppe() { - return this.istLeitnuklidgruppe; - } - - public void setIstLeitnuklidgruppe(String istLeitnuklidgruppe) { - this.istLeitnuklidgruppe = istLeitnuklidgruppe; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/MessprogrammKategorie.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.Transient; - - -/** - * The persistent class for the messprogramm_kategorie database table. - * - */ -@Entity -@Table(name="messprogramm_kategorie") -public class MessprogrammKategorie implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - private String bezeichnung; - - @Column(name="letzte_aenderung") - private Timestamp letzteAenderung; - - @Column(name="mpl_id") - private String mplId; - - @Column(name="netzbetreiber_id") - private String netzbetreiberId; - - @Transient - private boolean readonly; - - public MessprogrammKategorie() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getBezeichnung() { - return this.bezeichnung; - } - - public void setBezeichnung(String bezeichnung) { - this.bezeichnung = bezeichnung; - } - - public Timestamp getLetzteAenderung() { - return this.letzteAenderung; - } - - public String getMplId() { - return this.mplId; - } - - public void setMplId(String mplId) { - this.mplId = mplId; - } - - public String getNetzbetreiberId() { - return this.netzbetreiberId; - } - - public void setNetzbetreiberId(String netzbetreiberId) { - this.netzbetreiberId = netzbetreiberId; - } - - public boolean isReadonly() { - return readonly; - } - - public void setReadonly(boolean readonly) { - this.readonly = readonly; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/MgGrp.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.EmbeddedId; -import javax.persistence.Entity; -import javax.persistence.Table; - - -/** - * The persistent class for the mg_grp database table. - */ -@Entity -@Table(name="mg_grp") -public class MgGrp implements Serializable { - private static final long serialVersionUID = 1L; - - @EmbeddedId - private MgGrpPK id; - - public MgGrp() { - } - - public MgGrpPK getId() { - return this.id; - } - - public void setId(MgGrpPK id) { - this.id = id; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/MgGrpPK.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Embeddable; - - -/** - * The primary key class for the mg_grp database table. - */ -@Embeddable -public class MgGrpPK implements Serializable { - //default serial version id, required for serializable classes. - private static final long serialVersionUID = 1L; - - @Column(name="messgroessengruppe_id") - private Integer messgroessengruppeId; - - @Column(name="messgroesse_id") - private Integer messgroesseId; - - public MgGrpPK() { - } - public Integer getMessgroessengruppeId() { - return this.messgroessengruppeId; - } - public void setMessgroessengruppeId(Integer messgroessengruppeId) { - this.messgroessengruppeId = messgroessengruppeId; - } - public Integer getMessgroesseId() { - return this.messgroesseId; - } - public void setMessgroesseId(Integer messgroesseId) { - this.messgroesseId = messgroesseId; - } - - public boolean equals(Object other) { - if (this == other) { - return true; - } - if (!(other instanceof MgGrpPK)) { - return false; - } - MgGrpPK castOther = (MgGrpPK)other; - return - this.messgroessengruppeId.equals(castOther.messgroessengruppeId) - && this.messgroesseId.equals(castOther.messgroesseId); - } - - public int hashCode() { - final int prime = 31; - int hash = 17; - hash = hash * prime + this.messgroessengruppeId.hashCode(); - hash = hash * prime + this.messgroesseId.hashCode(); - return hash; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/MmtMessgroesse.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.EmbeddedId; -import javax.persistence.Entity; -import javax.persistence.Table; - - -/** - * The persistent class for the mmt_messgroesse database table. - */ -@Entity -@Table(name="mmt_messgroesse") -public class MmtMessgroesse implements Serializable { - private static final long serialVersionUID = 1L; - - @EmbeddedId - private MmtMessgroessePK id; - - public MmtMessgroesse() { - } - - public MmtMessgroessePK getMmtMessgroessePK() { - return this.id; - } - - public void setMmtMessgroessePK(MmtMessgroessePK id) { - this.id = id; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/MmtMessgroesseGrp.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.EmbeddedId; -import javax.persistence.Entity; -import javax.persistence.Table; - - -/** - * The persistent class for the mmt_messgroesse_grp database table. - */ -@Entity -@Table(name="mmt_messgroesse_grp") -public class MmtMessgroesseGrp implements Serializable { - private static final long serialVersionUID = 1L; - - @EmbeddedId - private MmtMessgroesseGrpPK id; - - public MmtMessgroesseGrp() { - } - - public MmtMessgroesseGrpPK getId() { - return this.id; - } - - public void setId(MmtMessgroesseGrpPK id) { - this.id = id; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/MmtMessgroesseGrpPK.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Embeddable; - - -/** - * The primary key class for the mmt_messgroesse_grp database table. - */ -@Embeddable -public class MmtMessgroesseGrpPK implements Serializable { - //default serial version id, required for serializable classes. - private static final long serialVersionUID = 1L; - - @Column(name="messgroessengruppe_id") - private Integer messgroessengruppeId; - - @Column(name="mmt_id") - private String mmtId; - - public MmtMessgroesseGrpPK() { - } - public Integer getMessgroessengruppeId() { - return this.messgroessengruppeId; - } - public void setMessgroessengruppeId(Integer messgroessengruppeId) { - this.messgroessengruppeId = messgroessengruppeId; - } - public String getMmtId() { - return this.mmtId; - } - public void setMmtId(String mmtId) { - this.mmtId = mmtId; - } - - public boolean equals(Object other) { - if (this == other) { - return true; - } - if (!(other instanceof MmtMessgroesseGrpPK)) { - return false; - } - MmtMessgroesseGrpPK castOther = (MmtMessgroesseGrpPK)other; - return - this.messgroessengruppeId.equals(castOther.messgroessengruppeId) - && this.mmtId.equals(castOther.mmtId); - } - - public int hashCode() { - final int prime = 31; - int hash = 17; - hash = hash * prime + this.messgroessengruppeId.hashCode(); - hash = hash * prime + this.mmtId.hashCode(); - return hash; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/MmtMessgroessePK.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Embeddable; - - -@Embeddable -public class MmtMessgroessePK implements Serializable{ - - private static final long serialVersionUID = 1L; - - @Column(name="messgroesse_id") - private Integer messgroesseId; - - @Column(name="mmt_id") - private String mmtId; - - public MmtMessgroessePK() { - } - public Integer getMessgroessengruppeId() { - return this.messgroesseId; - } - public void setMessgroessengruppeId(Integer messgroesseId) { - this.messgroesseId = messgroesseId; - } - public String getMmtId() { - return this.mmtId; - } - public void setMmtId(String mmtId) { - this.mmtId = mmtId; - } - - public boolean equals(Object other) { - if (this == other) { - return true; - } - if (!(other instanceof MmtMessgroessePK)) { - return false; - } - MmtMessgroessePK castOther = (MmtMessgroessePK)other; - return - this.messgroesseId.equals(castOther.messgroesseId) - && this.mmtId.equals(castOther.mmtId); - } - - public int hashCode() { - final int prime = 31; - int hash = 17; - hash = hash * prime + this.messgroesseId.hashCode(); - hash = hash * prime + this.mmtId.hashCode(); - return hash; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/NetzBetreiber.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the netz_betreiber database table. - */ -@Entity -@Table(name="netz_betreiber") -public class NetzBetreiber implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private String id; - - private Boolean aktiv; - - @Column(name="idf_netzbetreiber") - private String idfNetzbetreiber; - - @Column(name="is_bmn") - private Boolean isBmn; - - private String mailverteiler; - - private String netzbetreiber; - - @Column(name="zust_mst_id") - private String zustMstId; - - public NetzBetreiber() { - } - - public String getId() { - return this.id; - } - - public void setId(String id) { - this.id = id; - } - - public Boolean getAktiv() { - return this.aktiv; - } - - public void setAktiv(Boolean aktiv) { - this.aktiv = aktiv; - } - - public String getIdfNetzbetreiber() { - return this.idfNetzbetreiber; - } - - public void setIdfNetzbetreiber(String idfNetzbetreiber) { - this.idfNetzbetreiber = idfNetzbetreiber; - } - - public Boolean getIsBmn() { - return this.isBmn; - } - - public void setIsBmn(Boolean isBmn) { - this.isBmn = isBmn; - } - - public String getMailverteiler() { - return this.mailverteiler; - } - - public void setMailverteiler(String mailverteiler) { - this.mailverteiler = mailverteiler; - } - - public String getNetzbetreiber() { - return this.netzbetreiber; - } - - public void setNetzbetreiber(String netzbetreiber) { - this.netzbetreiber = netzbetreiber; - } - - public String getZustMstId() { - return this.zustMstId; - } - - public void setZustMstId(String zustMstId) { - this.zustMstId = zustMstId; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/Ort.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,308 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.Transient; - - -/** - * The persistent class for the ort database table. - * - */ -@Entity -@Table(name="ort") -public class Ort implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - private String aktiv; - - @Column(name="anlage_id") - private Integer anlageId; - - private String berichtstext; - - @Column(name="gem_id") - private String gemId; - - @Column(name="hoehe_land") - private Float hoeheLand; - - @Column(name="kda_id") - private Integer kdaId; - - @Column(name="koord_x_extern") - private String koordXExtern; - - @Column(name="koord_y_extern") - private String koordYExtern; - - private String kurztext; - - private String langtext; - - private Double latitude; - - @Column(name="letzte_aenderung") - private Timestamp letzteAenderung; - - private Double longitude; - - @Column(name="mp_art") - private String mpArt; - - @Column(name="netzbetreiber_id") - private String netzbetreiberId; - - @Column(name="nuts_code") - private String nutsCode; - - @Column(name="ort_id") - private String ortId; - - @Column(name="ort_typ") - private Integer ortTyp; - - @Column(name="oz_id") - private Integer ozId; - - private String sektor; - - @Column(name="staat_id") - private Integer staatId; - - private String unscharf; - - private String zone; - - private String zustaendigkeit; - - @Transient - private boolean readonly; - - public Ort() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getAktiv() { - return this.aktiv; - } - - public void setAktiv(String aktiv) { - this.aktiv = aktiv; - } - - public Integer getAnlageId() { - return this.anlageId; - } - - public void setAnlageId(Integer anlageId) { - this.anlageId = anlageId; - } - - public String getBerichtstext() { - return this.berichtstext; - } - - public void setBerichtstext(String berichtstext) { - this.berichtstext = berichtstext; - } - - public String getGemId() { - return this.gemId; - } - - public void setGemId(String gemId) { - this.gemId = gemId; - } - - public Float getHoeheLand() { - return this.hoeheLand; - } - - public void setHoeheLand(Float hoeheLand) { - this.hoeheLand = hoeheLand; - } - - public Integer getKdaId() { - return this.kdaId; - } - - public void setKdaId(Integer kdaId) { - this.kdaId = kdaId; - } - - public String getKoordXExtern() { - return this.koordXExtern; - } - - public void setKoordXExtern(String koordXExtern) { - this.koordXExtern = koordXExtern; - } - - public String getKoordYExtern() { - return this.koordYExtern; - } - - public void setKoordYExtern(String koordYExtern) { - this.koordYExtern = koordYExtern; - } - - public String getKurztext() { - return this.kurztext; - } - - public void setKurztext(String kurztext) { - this.kurztext = kurztext; - } - - public String getLangtext() { - return this.langtext; - } - - public void setLangtext(String langtext) { - this.langtext = langtext; - } - - public Double getLatitude() { - return this.latitude; - } - - public void setLatitude(Double latitude) { - this.latitude = latitude; - } - - public Timestamp getLetzteAenderung() { - return this.letzteAenderung; - } - - public Double getLongitude() { - return this.longitude; - } - - public void setLongitude(Double longitude) { - this.longitude = longitude; - } - - public String getMpArt() { - return this.mpArt; - } - - public void setMpArt(String mpArt) { - this.mpArt = mpArt; - } - - public String getNetzbetreiberId() { - return this.netzbetreiberId; - } - - public void setNetzbetreiberId(String netzbetreiberId) { - this.netzbetreiberId = netzbetreiberId; - } - - public String getNutsCode() { - return this.nutsCode; - } - - public void setNutsCode(String nutsCode) { - this.nutsCode = nutsCode; - } - - public String getOrtId() { - return this.ortId; - } - - public void setOrtId(String ortId) { - this.ortId = ortId; - } - - public Integer getOrtTyp() { - return this.ortTyp; - } - - public void setOrtTyp(Integer ortTyp) { - this.ortTyp = ortTyp; - } - - public Integer getOzId() { - return this.ozId; - } - - public void setOzId(Integer ozId) { - this.ozId = ozId; - } - - public String getSektor() { - return this.sektor; - } - - public void setSektor(String sektor) { - this.sektor = sektor; - } - - public Integer getStaatId() { - return this.staatId; - } - - public void setStaatId(Integer staatId) { - this.staatId = staatId; - } - - public String getUnscharf() { - return this.unscharf; - } - - public void setUnscharf(String unscharf) { - this.unscharf = unscharf; - } - - public String getZone() { - return this.zone; - } - - public void setZone(String zone) { - this.zone = zone; - } - - public String getZustaendigkeit() { - return this.zustaendigkeit; - } - - public void setZustaendigkeit(String zustaendigkeit) { - this.zustaendigkeit = zustaendigkeit; - } - - public boolean isReadonly() { - return readonly; - } - - public void setReadonly(boolean readonly) { - this.readonly = readonly; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/OrtTyp.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the ort_typ database table. - * - */ -@Entity -@Table(name="ort_typ") -public class OrtTyp implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - @Column(name="ort_typ") - private String ortTyp; - - public OrtTyp() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getOrtTyp() { - return this.ortTyp; - } - - public void setOrtTyp(String ortTyp) { - this.ortTyp = ortTyp; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/PflichtMessgroesse.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the pflicht_messgroesse database table. - */ -@Entity -@Table(name="pflicht_messgroesse") -public class PflichtMessgroesse implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - @Column(name="messgroesse_id") - private Integer messgroesseId; - - @Column(name="datenbasis_id") - private Integer datenbasisId; - - @Column(name="mmt_id") - private String mmtId; - - @Column(name="umw_id") - private String umweltId; - - public PflichtMessgroesse() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getMessgroesseId() { - return this.messgroesseId; - } - - public void setMessgroesseId(Integer messgroesseId) { - this.messgroesseId = messgroesseId; - } - - public Integer getDatenbasisId() { - return this.datenbasisId; - } - - public void setDatenbasisId(Integer datenbasisId) { - this.datenbasisId = datenbasisId; - } - - public String getMmtId() { - return this.mmtId; - } - - public void setMmtId(String mmtId) { - this.mmtId = mmtId; - } - - public String getUmweltId() { - return this.umweltId; - } - - public void setUmweltId(String umweltId) { - this.umweltId = umweltId; - } -}
--- a/src/main/java/de/intevation/lada/model/stamm/ProbenZusatz.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the proben_zusatz database table. - */ -@Entity -@Table(name="proben_zusatz") -public class ProbenZusatz implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private String id; - - private String beschreibung; - - @Column(name="eudf_keyword") - private String eudfKeyword; - - private String zusatzwert; - - @Column(name="meh_id") - private Integer mehId; - - public ProbenZusatz() { - } - - public String getId() { - return this.id; - } - - public void setId(String id) { - this.id = id; - } - - public String getBeschreibung() { - return this.beschreibung; - } - - public void setBeschreibung(String beschreibung) { - this.beschreibung = beschreibung; - } - - public String getEudfKeyword() { - return this.eudfKeyword; - } - - public void setEudfKeyword(String eudfKeyword) { - this.eudfKeyword = eudfKeyword; - } - - public String getZusatzwert() { - return this.zusatzwert; - } - - public void setZusatzwert(String zusatzwert) { - this.zusatzwert = zusatzwert; - } - - public Integer getMehId() { - return this.mehId; - } - - public void setMehId(Integer mehId) { - this.mehId = mehId; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/Probenart.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the probenart database table. - */ -@Entity -@Table(name="probenart") -public class Probenart implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String beschreibung; - - private String probenart; - - @Column(name="probenart_eudf_id") - private String probenartEudfId; - - public Probenart() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getBeschreibung() { - return this.beschreibung; - } - - public void setBeschreibung(String beschreibung) { - this.beschreibung = beschreibung; - } - - public String getProbenart() { - return this.probenart; - } - - public void setProbenart(String probenart) { - this.probenart = probenart; - } - - public String getProbenartEudfId() { - return this.probenartEudfId; - } - - public void setProbenartEudfId(String probenartEudfId) { - this.probenartEudfId = probenartEudfId; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/Probenehmer.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,196 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; -import java.sql.Timestamp; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Transient; - - -/** - * The persistent class for the probenehmer database table. - * - */ -@Entity -public class Probenehmer implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - private String bearbeiter; - - private String bemerkung; - - private String betrieb; - - private String bezeichnung; - - @Column(name="kurz_bezeichnung") - private String kurzBezeichnung; - - @Column(name="letzte_aenderung") - private Timestamp letzteAenderung; - - @Column(name="netzbetreiber_id") - private String netzbetreiberId; - - private String ort; - - private String plz; - - @Column(name="prn_id") - private String prnId; - - private String strasse; - - private String telefon; - - private String tp; - - private String typ; - - @Transient - private boolean readonly; - - public Probenehmer() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getBearbeiter() { - return this.bearbeiter; - } - - public void setBearbeiter(String bearbeiter) { - this.bearbeiter = bearbeiter; - } - - public String getBemerkung() { - return this.bemerkung; - } - - public void setBemerkung(String bemerkung) { - this.bemerkung = bemerkung; - } - - public String getBetrieb() { - return this.betrieb; - } - - public void setBetrieb(String betrieb) { - this.betrieb = betrieb; - } - - public String getBezeichnung() { - return this.bezeichnung; - } - - public void setBezeichnung(String bezeichnung) { - this.bezeichnung = bezeichnung; - } - - public String getKurzBezeichnung() { - return this.kurzBezeichnung; - } - - public void setKurzBezeichnung(String kurzBezeichnung) { - this.kurzBezeichnung = kurzBezeichnung; - } - - public Timestamp getLetzteAenderung() { - return this.letzteAenderung; - } - - public String getNetzbetreiberId() { - return this.netzbetreiberId; - } - - public void setNetzbetreiberId(String netzbetreiberId) { - this.netzbetreiberId = netzbetreiberId; - } - - public String getOrt() { - return this.ort; - } - - public void setOrt(String ort) { - this.ort = ort; - } - - public String getPlz() { - return this.plz; - } - - public void setPlz(String plz) { - this.plz = plz; - } - - public String getPrnId() { - return this.prnId; - } - - public void setPrnId(String prnId) { - this.prnId = prnId; - } - - public String getStrasse() { - return this.strasse; - } - - public void setStrasse(String strasse) { - this.strasse = strasse; - } - - public String getTelefon() { - return this.telefon; - } - - public void setTelefon(String telefon) { - this.telefon = telefon; - } - - public String getTp() { - return this.tp; - } - - public void setTp(String tp) { - this.tp = tp; - } - - public String getTyp() { - return this.typ; - } - - public void setTyp(String typ) { - this.typ = typ; - } - - public boolean isReadonly() { - return readonly; - } - - public void setReadonly(boolean readonly) { - this.readonly = readonly; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/Query.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,155 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; -import java.util.List; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.OneToMany; -import javax.persistence.OrderBy; -import javax.persistence.Transient; - - -/** - * The persistent class for the query database table. - * - */ -@Entity -public class Query implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - private String description; - - private String name; - - private String sql; - - private String type; - - @Transient - private Boolean favorite; - - //bi-directional many-to-one association to Filter - @OneToMany(fetch=FetchType.EAGER, mappedBy="query") - private List<Filter> filters; - - //bi-directional many-to-one association to Result - @OneToMany(fetch=FetchType.EAGER, mappedBy="query") - @OrderBy("index") - private List<Result> results; - - public Query() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getDescription() { - return this.description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public String getSql() { - return this.sql; - } - - public void setSql(String sql) { - this.sql = sql; - } - - public String getType() { - return this.type; - } - - public void setType(String type) { - this.type = type; - } - - public Boolean isFavorite() { - if (favorite == null) { - return false; - } - return favorite; - } - - public void setFavorite(Boolean favorite) { - this.favorite = favorite; - } - - public List<Filter> getFilters() { - return this.filters; - } - - public void setFilters(List<Filter> filters) { - this.filters = filters; - } - - public Filter addFilter(Filter filter) { - getFilters().add(filter); - filter.setQuery(this); - - return filter; - } - - public Filter removeFilter(Filter filter) { - getFilters().remove(filter); - filter.setQuery(null); - - return filter; - } - - public List<Result> getResults() { - return this.results; - } - - public void setResults(List<Result> results) { - this.results = results; - } - - public Result addResult(Result result) { - getResults().add(result); - result.setQuery(this); - - return result; - } - - public Result removeResult(Result result) { - getResults().remove(result); - result.setQuery(null); - - return result; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/Result.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.Table; - -import com.fasterxml.jackson.annotation.JsonIgnore; - - -/** - * The persistent class for the result database table. - * - */ -@Entity -@Table(name="result") -public class Result implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - @Column(name="id", unique=true, nullable=false) - private Integer id; - - @Column(name="data_index") - private String dataIndex; - - private Boolean flex; - - private String header; - - private Integer width; - - private Integer index; - - //bi-directional many-to-one association to Query - @ManyToOne - private Query query; - - public Result() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getDataIndex() { - return this.dataIndex; - } - - public void setDataIndex(String dataIndex) { - this.dataIndex = dataIndex; - } - - public Boolean getFlex() { - return this.flex; - } - - public void setFlex(Boolean flex) { - this.flex = flex; - } - - public String getHeader() { - return this.header; - } - - public void setHeader(String header) { - this.header = header; - } - - public Integer getWidth() { - return this.width; - } - - public void setWidth(Integer width) { - this.width = width; - } - - public Integer getIndex() { - return index; - } - - public void setIndex(Integer index) { - this.index = index; - } - - @JsonIgnore - public Query getQuery() { - return this.query; - } - - @JsonIgnore - public void setQuery(Query query) { - this.query = query; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/Staat.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the staat database table. - */ -@Entity -@Table(name="staat") -public class Staat implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String eu; - - @Column(name="hkl_id") - private Integer hklId; - - @Column(name="koord_x_extern") - private String koordXExtern; - - @Column(name="koord_y_extern") - private String koordYExtern; - - private String staat; - - @Column(name="staat_iso") - private String staatIso; - - @Column(name="staat_kurz") - private String staatKurz; - - @Column(name="kda_id") - private Integer koordinatenartId; - - public Staat() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getEu() { - return this.eu; - } - - public void setEu(String eu) { - this.eu = eu; - } - - public Integer getHklId() { - return this.hklId; - } - - public void setHklId(Integer hklId) { - this.hklId = hklId; - } - - public String getKoordXExtern() { - return this.koordXExtern; - } - - public void setKoordXExtern(String koordXExtern) { - this.koordXExtern = koordXExtern; - } - - public String getKoordYExtern() { - return this.koordYExtern; - } - - public void setKoordYExtern(String koordYExtern) { - this.koordYExtern = koordYExtern; - } - - public String getStaat() { - return this.staat; - } - - public void setStaat(String staat) { - this.staat = staat; - } - - public String getStaatIso() { - return this.staatIso; - } - - public void setStaatIso(String staatIso) { - this.staatIso = staatIso; - } - - public String getStaatKurz() { - return this.staatKurz; - } - - public void setStaatKurz(String staatKurz) { - this.staatKurz = staatKurz; - } - - public Integer getKoordinatenartId() { - return this.koordinatenartId; - } - - public void setKoordinatenartId(Integer koordinatenartId) { - this.koordinatenartId = koordinatenartId; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/StatusErreichbar.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the status_erreichbar database table. - * - */ -@Entity -@Table(name="status_erreichbar") -public class StatusErreichbar implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - @Column(name="wert_id") - private Integer wertId; - - @Column(name="stufe_id") - private Integer stufeId; - - @Column(name="cur_stufe") - private Integer curStufe; - - @Column(name="cur_wert") - private Integer curWert; - - public StatusErreichbar() { - } - - public Integer getWertId() { - return this.wertId; - } - - public Integer getStufeId() { - return this.stufeId; - } - - public Integer getCurStufe() { - return this.curStufe; - } - - public Integer getCurWert() { - return this.curWert; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/StatusKombi.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; -import java.util.List; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.OneToMany; -import javax.persistence.Table; - - -/** - * The persistent class for the status_kombi database table. - * - */ -@Entity -@Table(name="status_kombi") -public class StatusKombi implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - @Column(name="stufe_id") - private Integer stufeId; - - @Column(name="wert_id") - private Integer wertId; - - //bi-directional many-to-one association to StatusReihenfolge - @OneToMany(mappedBy="von") - private List<StatusReihenfolge> statusReihenfolges1; - - //bi-directional many-to-one association to StatusReihenfolge - @OneToMany(mappedBy="zu") - private List<StatusReihenfolge> statusReihenfolges2; - - public StatusKombi() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getStufeId() { - return this.stufeId; - } - - public void setStufeId(Integer stufeId) { - this.stufeId = stufeId; - } - - public Integer getWertId() { - return this.wertId; - } - - public void setWertId(Integer wertId) { - this.wertId = wertId; - } - - public List<StatusReihenfolge> getStatusReihenfolges1() { - return this.statusReihenfolges1; - } - - public void setStatusReihenfolges1(List<StatusReihenfolge> statusReihenfolges1) { - this.statusReihenfolges1 = statusReihenfolges1; - } - - public StatusReihenfolge addStatusReihenfolges1(StatusReihenfolge statusReihenfolges1) { - getStatusReihenfolges1().add(statusReihenfolges1); - statusReihenfolges1.setVon(this); - - return statusReihenfolges1; - } - - public StatusReihenfolge removeStatusReihenfolges1(StatusReihenfolge statusReihenfolges1) { - getStatusReihenfolges1().remove(statusReihenfolges1); - statusReihenfolges1.setVon(null); - - return statusReihenfolges1; - } - - public List<StatusReihenfolge> getStatusReihenfolges2() { - return this.statusReihenfolges2; - } - - public void setStatusReihenfolges2(List<StatusReihenfolge> statusReihenfolges2) { - this.statusReihenfolges2 = statusReihenfolges2; - } - - public StatusReihenfolge addStatusReihenfolges2(StatusReihenfolge statusReihenfolges2) { - getStatusReihenfolges2().add(statusReihenfolges2); - statusReihenfolges2.setZu(this); - - return statusReihenfolges2; - } - - public StatusReihenfolge removeStatusReihenfolges2(StatusReihenfolge statusReihenfolges2) { - getStatusReihenfolges2().remove(statusReihenfolges2); - statusReihenfolges2.setZu(null); - - return statusReihenfolges2; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/StatusReihenfolge.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; - -/** - * The persistent class for the status_reihenfolge database table. - * - */ -@Entity -@Table(name="status_reihenfolge") -public class StatusReihenfolge implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - //bi-directional many-to-one association to StatusKombi - @ManyToOne - @JoinColumn(name="von_id") - private StatusKombi von; - - //bi-directional many-to-one association to StatusKombi - @ManyToOne - @JoinColumn(name="zu_id") - private StatusKombi zu; - - public StatusReihenfolge() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public StatusKombi getVon() { - return this.von; - } - - public void setVon(StatusKombi von) { - this.von = von; - } - - public StatusKombi getZu() { - return this.zu; - } - - public void setZu(StatusKombi zu) { - this.zu = zu; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/StatusStufe.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the status_stufe database table. - */ -@Entity -@Table(name="status_stufe") -public class StatusStufe implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String stufe; - - public StatusStufe() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getStufe() { - return this.stufe; - } - - public void setStufe(String stufe) { - this.stufe = stufe; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/StatusWert.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the status_wert database table. - * - */ -@Entity -@Table(name="status_wert") -public class StatusWert implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String wert; - - public StatusWert() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getWert() { - return this.wert; - } - - public void setWert(String wert) { - this.wert = wert; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/Umwelt.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the umwelt database table. - */ -@Entity -@Table(name="umwelt") -public class Umwelt implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private String id; - - private String beschreibung; - - @Column(name="umwelt_bereich") - private String umweltBereich; - - @Column(name="meh_id") - private Integer mehId; - - public Umwelt() { - } - - public String getId() { - return this.id; - } - - public void setId(String id) { - this.id = id; - } - - public String getBeschreibung() { - return this.beschreibung; - } - - public void setBeschreibung(String beschreibung) { - this.beschreibung = beschreibung; - } - - public String getUmweltBereich() { - return this.umweltBereich; - } - - public void setUmweltBereich(String umweltBereich) { - this.umweltBereich = umweltBereich; - } - - public Integer getMehId() { - return this.mehId; - } - - public void setMehId(Integer mehId) { - this.mehId = mehId; - } - -}
--- a/src/main/java/de/intevation/lada/model/stamm/Verwaltungseinheit.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,197 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.model.stamm; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * The persistent class for the verwaltungseinheit database table. - */ -@Entity -@Table(name="verwaltungseinheit") -public class Verwaltungseinheit implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private String id; - - private String bezeichnung; - - private String bundesland; - - @Column(name="is_bundesland") - private String isBundesland; - - @Column(name="is_gemeinde") - private String isGemeinde; - - @Column(name="is_landkreis") - private String isLandkreis; - - @Column(name="is_regbezirk") - private String isRegbezirk; - - @Column(name="koord_x_extern") - private String koordXExtern; - - @Column(name="koord_y_extern") - private String koordYExtern; - - private String kreis; - - private Double latitude; - - private Double longitude; - - private String nuts; - - private String plz; - - private String regbezirk; - - @Column(name="kda_id") - private Integer koordinatenartId; - - public Verwaltungseinheit() { - } - - public String getId() { - return this.id; - } - - public void setId(String id) { - this.id = id; - } - - public String getBezeichnung() { - return this.bezeichnung; - } - - public void setBezeichnung(String bezeichnung) { - this.bezeichnung = bezeichnung; - } - - public String getBundesland() { - return this.bundesland; - } - - public void setBundesland(String bundesland) { - this.bundesland = bundesland; - } - - public String getIsBundesland() { - return this.isBundesland; - } - - public void setIsBundesland(String isBundesland) { - this.isBundesland = isBundesland; - } - - public String getIsGemeinde() { - return this.isGemeinde; - } - - public void setIsGemeinde(String isGemeinde) { - this.isGemeinde = isGemeinde; - } - - public String getIsLandkreis() { - return this.isLandkreis; - } - - public void setIsLandkreis(String isLandkreis) { - this.isLandkreis = isLandkreis; - } - - public String getIsRegbezirk() { - return this.isRegbezirk; - } - - public void setIsRegbezirk(String isRegbezirk) { - this.isRegbezirk = isRegbezirk; - } - - public String getKoordXExtern() { - return this.koordXExtern; - } - - public void setKoordXExtern(String koordXExtern) { - this.koordXExtern = koordXExtern; - } - - public String getKoordYExtern() { - return this.koordYExtern; - } - - public void setKoordYExtern(String koordYExtern) { - this.koordYExtern = koordYExtern; - } - - public String getKreis() { - return this.kreis; - } - - public void setKreis(String kreis) { - this.kreis = kreis; - } - - public Double getLatitude() { - return this.latitude; - } - - public void setLatitude(Double latitude) { - this.latitude = latitude; - } - - public Double getLongitude() { - return this.longitude; - } - - public void setLongitude(Double longitude) { - this.longitude = longitude; - } - - public String getNuts() { - return this.nuts; - } - - public void setNuts(String nuts) { - this.nuts = nuts; - } - - public String getPlz() { - return this.plz; - } - - public void setPlz(String plz) { - this.plz = plz; - } - - public String getRegbezirk() { - return this.regbezirk; - } - - public void setRegbezirk(String regbezirk) { - this.regbezirk = regbezirk; - } - - public Integer getKoordinatenartId() { - return this.koordinatenartId; - } - - public void setKoordinatenArt(Integer koordinatenartId) { - this.koordinatenartId = koordinatenartId; - } - -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Auth.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,89 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the auth database table. + * + */ +@Entity +@Table(name="auth") +public class Auth implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + @Column(name="funktion_id") + private Integer funktionId; + + @Column(name="labor_mst_id") + private String laborMstId; + + @Column(name="ldap_group") + private String ldapGroup; + + @Column(name="mst_id") + private String mstId; + + @Column(name="netzbetreiber_id") + private String netzbetreiberId; + + public Auth() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getFunktionId() { + return this.funktionId; + } + + public void setFunktionId(Integer funktionId) { + this.funktionId = funktionId; + } + + public String getLaborMstId() { + return this.laborMstId; + } + + public void setLaborMstId(String laborMstId) { + this.laborMstId = laborMstId; + } + + public String getLdapGroup() { + return this.ldapGroup; + } + + public void setLdapGroup(String ldapGroup) { + this.ldapGroup = ldapGroup; + } + + public String getMstId() { + return this.mstId; + } + + public void setMstId(String mstId) { + this.mstId = mstId; + } + + public String getNetzbetreiberId() { + return this.netzbetreiberId; + } + + public void setNetzbetreiberId(String netzbetreiberId) { + this.netzbetreiberId = netzbetreiberId; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/AuthFunktion.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,43 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the auth_funktion database table. + * + */ +@Entity +@Table(name="auth_funktion") +public class AuthFunktion implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String funktion; + + public AuthFunktion() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getFunktion() { + return this.funktion; + } + + public void setFunktion(String funktion) { + this.funktion = funktion; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/AuthLstUmw.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,56 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the auth_lst_umw database table. + * + */ +@Entity +@Table(name="auth_lst_umw") +public class AuthLstUmw implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + @Column(name="mst_id") + private String mstId; + + @Column(name="umw_id") + private String umwId; + + public AuthLstUmw() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getMstId() { + return this.mstId; + } + + public void setMstId(String mstId) { + this.mstId = mstId; + } + + public String getUmwId() { + return this.umwId; + } + + public void setUmwId(String umwId) { + this.umwId = umwId; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Datenbasis.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,52 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the datenbasis database table. + * + */ +@Entity +@Table(name="datenbasis") +public class Datenbasis implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String beschreibung; + + private String datenbasis; + + public Datenbasis() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBeschreibung() { + return this.beschreibung; + } + + public void setBeschreibung(String beschreibung) { + this.beschreibung = beschreibung; + } + + public String getDatenbasis() { + return this.datenbasis; + } + + public void setDatenbasis(String datenbasis) { + this.datenbasis = datenbasis; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/DatensatzErzeuger.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,101 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; + + +/** + * The persistent class for the datensatz_erzeuger database table. + * + */ +@Entity +@Table(name="datensatz_erzeuger") +public class DatensatzErzeuger implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String bezeichnung; + + @Column(name="datensatz_erzeuger_id") + private String datensatzErzeugerId; + + @Column(name="letzte_aenderung") + private Timestamp letzteAenderung; + + @Column(name="mst_id") + private String mstId; + + @Column(name="netzbetreiber_id") + private String netzbetreiberId; + + @Transient + private boolean readonly; + + public DatensatzErzeuger() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBezeichnung() { + return this.bezeichnung; + } + + public void setBezeichnung(String bezeichnung) { + this.bezeichnung = bezeichnung; + } + + public String getDatensatzErzeugerId() { + return this.datensatzErzeugerId; + } + + public void setDatensatzErzeugerId(String datensatzErzeugerId) { + this.datensatzErzeugerId = datensatzErzeugerId; + } + + public Timestamp getLetzteAenderung() { + return this.letzteAenderung; + } + + public void setLetzteAenderung(Timestamp letzteAenderung) { + this.letzteAenderung = letzteAenderung; + } + + public String getMstId() { + return this.mstId; + } + + public void setMstId(String mstId) { + this.mstId = mstId; + } + + public String getNetzbetreiberId() { + return this.netzbetreiberId; + } + + public void setNetzbetreiberId(String netzbetreiberId) { + this.netzbetreiberId = netzbetreiberId; + } + + public boolean isReadonly() { + return readonly; + } + + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/DeVg.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,205 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import com.vividsolutions.jts.geom.MultiPolygon; + + +/** + * The persistent class for the de_vg database table. + * + */ +@Entity +@Table(name="de_vg") +public class DeVg implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String ags; + + private String bemerk; + + @Column(name="debkg_id") + private String debkgId; + + private String des; + + private String gen; + + private MultiPolygon geom; + + private double gf; + + private double isn; + + private BigDecimal length; + + private String nambild; + + @Column(name="rau_rs") + private String rauRs; + + private String rs; + + @Column(name="rs_alt") + private String rsAlt; + + @Column(name="shape_area") + private BigDecimal shapeArea; + + private double use; + + @Temporal(TemporalType.DATE) + private Date wirksamkei; + + public DeVg() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getAgs() { + return this.ags; + } + + public void setAgs(String ags) { + this.ags = ags; + } + + public String getBemerk() { + return this.bemerk; + } + + public void setBemerk(String bemerk) { + this.bemerk = bemerk; + } + + public String getDebkgId() { + return this.debkgId; + } + + public void setDebkgId(String debkgId) { + this.debkgId = debkgId; + } + + public String getDes() { + return this.des; + } + + public void setDes(String des) { + this.des = des; + } + + public String getGen() { + return this.gen; + } + + public void setGen(String gen) { + this.gen = gen; + } + + public MultiPolygon getGeom() { + return this.geom; + } + + public void setGeom(MultiPolygon geom) { + this.geom = geom; + } + + public double getGf() { + return this.gf; + } + + public void setGf(double gf) { + this.gf = gf; + } + + public double getIsn() { + return this.isn; + } + + public void setIsn(double isn) { + this.isn = isn; + } + + public BigDecimal getLength() { + return this.length; + } + + public void setLength(BigDecimal length) { + this.length = length; + } + + public String getNambild() { + return this.nambild; + } + + public void setNambild(String nambild) { + this.nambild = nambild; + } + + public String getRauRs() { + return this.rauRs; + } + + public void setRauRs(String rauRs) { + this.rauRs = rauRs; + } + + public String getRs() { + return this.rs; + } + + public void setRs(String rs) { + this.rs = rs; + } + + public String getRsAlt() { + return this.rsAlt; + } + + public void setRsAlt(String rsAlt) { + this.rsAlt = rsAlt; + } + + public BigDecimal getShapeArea() { + return this.shapeArea; + } + + public void setShapeArea(BigDecimal shapeArea) { + this.shapeArea = shapeArea; + } + + public double getUse() { + return this.use; + } + + public void setUse(double use) { + this.use = use; + } + + public Date getWirksamkei() { + return this.wirksamkei; + } + + public void setWirksamkei(Date wirksamkei) { + this.wirksamkei = wirksamkei; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/DeskriptorUmwelt.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,175 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the deskriptor_umwelt database table. + * + */ +@Entity +@Table(name="deskriptor_umwelt") +public class DeskriptorUmwelt implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private Integer s00; + + private Integer s01; + + private Integer s02; + + private Integer s03; + + private Integer s04; + + private Integer s05; + + private Integer s06; + + private Integer s07; + + private Integer s08; + + private Integer s09; + + private Integer s10; + + private Integer s11; + + private Integer s12; + + @Column(name="umw_id") + private String umwId; + + public DeskriptorUmwelt() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getS00() { + return this.s00; + } + + public void setS00(Integer s00) { + this.s00 = s00; + } + + public Integer getS01() { + return this.s01; + } + + public void setS01(Integer s01) { + this.s01 = s01; + } + + public Integer getS02() { + return this.s02; + } + + public void setS02(Integer s02) { + this.s02 = s02; + } + + public Integer getS03() { + return this.s03; + } + + public void setS03(Integer s03) { + this.s03 = s03; + } + + public Integer getS04() { + return this.s04; + } + + public void setS04(Integer s04) { + this.s04 = s04; + } + + public Integer getS05() { + return this.s05; + } + + public void setS05(Integer s05) { + this.s05 = s05; + } + + public Integer getS06() { + return this.s06; + } + + public void setS06(Integer s06) { + this.s06 = s06; + } + + public Integer getS07() { + return this.s07; + } + + public void setS07(Integer s07) { + this.s07 = s07; + } + + public Integer getS08() { + return this.s08; + } + + public void setS08(Integer s08) { + this.s08 = s08; + } + + public Integer getS09() { + return this.s09; + } + + public void setS09(Integer s09) { + this.s09 = s09; + } + + public Integer getS10() { + return this.s10; + } + + public void setS10(Integer s10) { + this.s10 = s10; + } + + public Integer getS11() { + return this.s11; + } + + public void setS11(Integer s11) { + this.s11 = s11; + } + + public Integer getS12() { + return this.s12; + } + + public void setS12(Integer s12) { + this.s12 = s12; + } + + public String getUmwId() { + return this.umwId; + } + + public void setUmwId(String umwId) { + this.umwId = umwId; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Deskriptoren.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,93 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; + + +/** + * The persistent class for the deskriptoren database table. + * + */ +@Entity +public class Deskriptoren implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String bedeutung; + + private String beschreibung; + + private Integer ebene; + + @Column(name="s_xx") + private Integer sXx; + + private Integer sn; + + private Integer vorgaenger; + + public Deskriptoren() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBedeutung() { + return this.bedeutung; + } + + public void setBedeutung(String bedeutung) { + this.bedeutung = bedeutung; + } + + public String getBeschreibung() { + return this.beschreibung; + } + + public void setBeschreibung(String beschreibung) { + this.beschreibung = beschreibung; + } + + public Integer getEbene() { + return this.ebene; + } + + public void setEbene(Integer ebene) { + this.ebene = ebene; + } + + public Integer getSXx() { + return this.sXx; + } + + public void setSXx(Integer sXx) { + this.sXx = sXx; + } + + public Integer getSn() { + return this.sn; + } + + public void setSn(Integer sn) { + this.sn = sn; + } + + public Integer getVorgaenger() { + return this.vorgaenger; + } + + public void setVorgaenger(Integer vorgaenger) { + this.vorgaenger = vorgaenger; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Favorite.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,54 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; + + +/** + * The persistent class for the favorite database table. + * + */ +@Entity +public class Favorite implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + @Column(name="query_id") + private Integer queryId; + + @Column(name="user_id") + private Integer userId; + + public Favorite() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getQueryId() { + return this.queryId; + } + + public void setQueryId(Integer queryId) { + this.queryId = queryId; + } + + public Integer getUserId() { + return this.userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Filter.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,120 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.JoinTable; +import javax.persistence.ManyToOne; +import javax.persistence.Transient; + +import com.fasterxml.jackson.annotation.JsonIgnore; + + +/** + * The persistent class for the filter database table. + * + */ +@Entity +public class Filter implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + @Column(name="data_index") + private String dataIndex; + + private String label; + + private Boolean multiselect; + + //bi-directional many-to-one association to Query + @ManyToOne + private Query query; + + @ManyToOne + @JoinColumn(name="type", insertable=false, updatable=false) + private FilterType type; + + @Column(name="type") + private Integer typeId; + + @Transient + private String value; + + public Filter() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getDataIndex() { + return this.dataIndex; + } + + public void setDataIndex(String dataIndex) { + this.dataIndex = dataIndex; + } + + public String getLabel() { + return this.label; + } + + public void setLabel(String label) { + this.label = label; + } + + public Boolean getMultiselect() { + return this.multiselect; + } + + public void setMultiselect(Boolean multiselect) { + this.multiselect = multiselect; + } + + @JsonIgnore + public Query getQuery() { + return this.query; + } + + @JsonIgnore + public void setQuery(Query query) { + this.query = query; + } + + public String getType() { + return this.type.getType(); + } + + /** + * @return the typeId + */ + @JsonIgnore + public Integer getTypeId() { + return typeId; + } + + /** + * @param typeId the typeId to set + */ + @JsonIgnore + public void setTypeId(Integer typeId) { + this.typeId = typeId; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/FilterType.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,42 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; +import javax.persistence.*; + + +/** + * The persistent class for the filter_type database table. + * + */ +@Entity +@Table(name="filter_type") +@NamedQuery(name="FilterType.findAll", query="SELECT f FROM FilterType f") +public class FilterType implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy=GenerationType.AUTO) + private Integer id; + + private String type; + + public FilterType() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/FilterValue.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,66 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the filter_value database table. + * + */ +@Entity +@Table(name="filter_value") +public class FilterValue implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + @Column(name="filter_id") + private Integer filterId; + + @Column(name="user_id") + private Integer userId; + + private String value; + + public FilterValue() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getFilterId() { + return this.filterId; + } + + public void setFilterId(Integer filterId) { + this.filterId = filterId; + } + + public Integer getUserId() { + return this.userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/KoordinatenArt.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,54 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the koordinaten_art database table. + * + */ +@Entity +@Table(name="koordinaten_art") +public class KoordinatenArt implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + @Column(name="idf_geo_key") + private String idfGeoKey; + + private String koordinatenart; + + public KoordinatenArt() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getIdfGeoKey() { + return this.idfGeoKey; + } + + public void setIdfGeoKey(String idfGeoKey) { + this.idfGeoKey = idfGeoKey; + } + + public String getKoordinatenart() { + return this.koordinatenart; + } + + public void setKoordinatenart(String koordinatenart) { + this.koordinatenart = koordinatenart; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/LadaUser.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,46 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the lada_user database table. + * + */ +@Entity +@Table(name="lada_user") +public class LadaUser implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + private Integer id; + + private String name; + + public LadaUser() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/MessEinheit.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,75 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the mess_einheit database table. + * + */ +@Entity +@Table(name="mess_einheit") +public class MessEinheit implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String beschreibung; + + private String einheit; + + @Column(name="eudf_messeinheit_id") + private String eudfMesseinheitId; + + @Column(name="umrechnungs_faktor_eudf") + private Long umrechnungsFaktorEudf; + + public MessEinheit() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBeschreibung() { + return this.beschreibung; + } + + public void setBeschreibung(String beschreibung) { + this.beschreibung = beschreibung; + } + + public String getEinheit() { + return this.einheit; + } + + public void setEinheit(String einheit) { + this.einheit = einheit; + } + + public String getEudfMesseinheitId() { + return this.eudfMesseinheitId; + } + + public void setEudfMesseinheitId(String eudfMesseinheitId) { + this.eudfMesseinheitId = eudfMesseinheitId; + } + + public Long getUmrechnungsFaktorEudf() { + return this.umrechnungsFaktorEudf; + } + + public void setUmrechnungsFaktorEudf(Long umrechnungsFaktorEudf) { + this.umrechnungsFaktorEudf = umrechnungsFaktorEudf; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/MessMethode.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,52 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the mess_methode database table. + * + */ +@Entity +@Table(name="mess_methode") +public class MessMethode implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private String id; + + private String beschreibung; + + private String messmethode; + + public MessMethode() { + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getBeschreibung() { + return this.beschreibung; + } + + public void setBeschreibung(String beschreibung) { + this.beschreibung = beschreibung; + } + + public String getMessmethode() { + return this.messmethode; + } + + public void setMessmethode(String messmethode) { + this.messmethode = messmethode; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/MessStelle.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,82 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the mess_stelle database table. + * + */ +@Entity +@Table(name="mess_stelle") +public class MessStelle implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private String id; + + private String amtskennung; + + private String beschreibung; + + @Column(name="mess_stelle") + private String messStelle; + + @Column(name="mst_typ") + private String mstTyp; + + @Column(name="netzbetreiber_id") + private String netzbetreiberId; + + public MessStelle() { + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getAmtskennung() { + return this.amtskennung; + } + + public void setAmtskennung(String amtskennung) { + this.amtskennung = amtskennung; + } + + public String getBeschreibung() { + return this.beschreibung; + } + + public void setBeschreibung(String beschreibung) { + this.beschreibung = beschreibung; + } + + public String getMessStelle() { + return this.messStelle; + } + + public void setMessStelle(String messStelle) { + this.messStelle = messStelle; + } + + public String getMstTyp() { + return this.mstTyp; + } + + public void setMstTyp(String mstTyp) { + this.mstTyp = mstTyp; + } + + public String getNetzbetreiberId() { + return this.netzbetreiberId; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Messgroesse.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,106 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; + + +/** + * The persistent class for the messgroesse database table. + * + */ +@Entity +public class Messgroesse implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String beschreibung; + + @Column(name="default_farbe") + private String defaultFarbe; + + @Column(name="eudf_nuklid_id") + private Long eudfNuklidId; + + @Column(name="idf_nuklid_key") + private String idfNuklidKey; + + @Column(name="ist_leitnuklid") + private Boolean istLeitnuklid; + + @Column(name="kennung_bvl") + private String kennungBvl; + + private String messgroesse; + + public Messgroesse() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBeschreibung() { + return this.beschreibung; + } + + public void setBeschreibung(String beschreibung) { + this.beschreibung = beschreibung; + } + + public String getDefaultFarbe() { + return this.defaultFarbe; + } + + public void setDefaultFarbe(String defaultFarbe) { + this.defaultFarbe = defaultFarbe; + } + + public Long getEudfNuklidId() { + return this.eudfNuklidId; + } + + public void setEudfNuklidId(Long eudfNuklidId) { + this.eudfNuklidId = eudfNuklidId; + } + + public String getIdfNuklidKey() { + return this.idfNuklidKey; + } + + public void setIdfNuklidKey(String idfNuklidKey) { + this.idfNuklidKey = idfNuklidKey; + } + + public Boolean getIstLeitnuklid() { + return this.istLeitnuklid; + } + + public void setIstLeitnuklid(Boolean istLeitnuklid) { + this.istLeitnuklid = istLeitnuklid; + } + + public String getKennungBvl() { + return this.kennungBvl; + } + + public void setKennungBvl(String kennungBvl) { + this.kennungBvl = kennungBvl; + } + + public String getMessgroesse() { + return this.messgroesse; + } + + public void setMessgroesse(String messgroesse) { + this.messgroesse = messgroesse; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/MessgroessenGruppe.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,54 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the messgroessen_gruppe database table. + * + */ +@Entity +@Table(name="messgroessen_gruppe") +public class MessgroessenGruppe implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String bezeichnung; + + @Column(name="ist_leitnuklidgruppe") + private String istLeitnuklidgruppe; + + public MessgroessenGruppe() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBezeichnung() { + return this.bezeichnung; + } + + public void setBezeichnung(String bezeichnung) { + this.bezeichnung = bezeichnung; + } + + public String getIstLeitnuklidgruppe() { + return this.istLeitnuklidgruppe; + } + + public void setIstLeitnuklidgruppe(String istLeitnuklidgruppe) { + this.istLeitnuklidgruppe = istLeitnuklidgruppe; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/MessprogrammKategorie.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,88 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; + + +/** + * The persistent class for the messprogramm_kategorie database table. + * + */ +@Entity +@Table(name="messprogramm_kategorie") +public class MessprogrammKategorie implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String bezeichnung; + + private String code; + + @Column(name="letzte_aenderung") + private Timestamp letzteAenderung; + + @Column(name="netzbetreiber_id") + private String netzbetreiberId; + + @Transient + private boolean readonly; + + public MessprogrammKategorie() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBezeichnung() { + return this.bezeichnung; + } + + public void setBezeichnung(String bezeichnung) { + this.bezeichnung = bezeichnung; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public Timestamp getLetzteAenderung() { + return this.letzteAenderung; + } + + public void setLetzteAenderung(Timestamp letzteAenderung) { + this.letzteAenderung = letzteAenderung; + } + + public String getNetzbetreiberId() { + return this.netzbetreiberId; + } + + public void setNetzbetreiberId(String netzbetreiberId) { + this.netzbetreiberId = netzbetreiberId; + } + + public boolean isReadonly() { + return readonly; + } + + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/MmtMessgroesse.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,56 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.EmbeddedId; +import javax.persistence.Entity; +import javax.persistence.Table; + + +/** + * The persistent class for the mmt_messgroesse database table. + * + */ +@Entity +@Table(name="mmt_messgroesse") +public class MmtMessgroesse implements Serializable { + private static final long serialVersionUID = 1L; + + @EmbeddedId + private MmtMessgroessePK id; + + @Column(name="messgroesse_id", insertable=false, updatable=false) + private Integer messgroesseId; + + @Column(name="mmt_id", insertable=false, updatable=false) + private String mmtId; + + public MmtMessgroesse() { + } + + public MmtMessgroessePK getMmtMessgroessePK() { + return this.id; + } + + public void setMmtMessgroessePK(MmtMessgroessePK id) { + this.id = id; + } + + public Integer getMessgroesseId() { + return this.messgroesseId; + } + + public void setMessgroesseId(Integer messgroesseId) { + this.messgroesseId = messgroesseId; + } + + public String getMmtId() { + return this.mmtId; + } + + public void setMmtId(String mmtId) { + this.mmtId = mmtId; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/MmtMessgroessePK.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,62 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Embeddable; + + +@Embeddable +public class MmtMessgroessePK implements Serializable{ + + private static final long serialVersionUID = 1L; + + @Column(name="messgroesse_id") + private Integer messgroesseId; + + @Column(name="mmt_id") + private String mmtId; + + public MmtMessgroessePK() { + } + public Integer getMessgroessengruppeId() { + return this.messgroesseId; + } + public void setMessgroessengruppeId(Integer messgroesseId) { + this.messgroesseId = messgroesseId; + } + public String getMmtId() { + return this.mmtId; + } + public void setMmtId(String mmtId) { + this.mmtId = mmtId; + } + + public boolean equals(Object other) { + if (this == other) { + return true; + } + if (!(other instanceof MmtMessgroessePK)) { + return false; + } + MmtMessgroessePK castOther = (MmtMessgroessePK)other; + return + this.messgroesseId.equals(castOther.messgroesseId) + && this.mmtId.equals(castOther.mmtId); + } + + public int hashCode() { + final int prime = 31; + int hash = 17; + hash = hash * prime + this.messgroesseId.hashCode(); + hash = hash * prime + this.mmtId.hashCode(); + return hash; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/NetzBetreiber.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,85 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the netz_betreiber database table. + * + */ +@Entity +@Table(name="netz_betreiber") +public class NetzBetreiber implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private String id; + + private Boolean aktiv; + + @Column(name="idf_netzbetreiber") + private String idfNetzbetreiber; + + @Column(name="is_bmn") + private Boolean isBmn; + + private String mailverteiler; + + private String netzbetreiber; + + public NetzBetreiber() { + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public Boolean getAktiv() { + return this.aktiv; + } + + public void setAktiv(Boolean aktiv) { + this.aktiv = aktiv; + } + + public String getIdfNetzbetreiber() { + return this.idfNetzbetreiber; + } + + public void setIdfNetzbetreiber(String idfNetzbetreiber) { + this.idfNetzbetreiber = idfNetzbetreiber; + } + + public Boolean getIsBmn() { + return this.isBmn; + } + + public void setIsBmn(Boolean isBmn) { + this.isBmn = isBmn; + } + + public String getMailverteiler() { + return this.mailverteiler; + } + + public void setMailverteiler(String mailverteiler) { + this.mailverteiler = mailverteiler; + } + + public String getNetzbetreiber() { + return this.netzbetreiber; + } + + public void setNetzbetreiber(String netzbetreiber) { + this.netzbetreiber = netzbetreiber; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Ort.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,301 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.NamedQuery; +import javax.persistence.Transient; + + +/** + * The persistent class for the ort database table. + * + */ +@Entity +@NamedQuery(name="Ort.findAll", query="SELECT o FROM Ort o") +public class Ort implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String aktiv; + + @Column(name="anlage_id") + private Integer anlageId; + + private String berichtstext; + + @Column(name="gem_id") + private String gemId; + + @Column(name="hoehe_land") + private Float hoeheLand; + + @Column(name="koord_x_extern") + private String koordXExtern; + + @Column(name="koord_y_extern") + private String koordYExtern; + + private String kurztext; + + private String langtext; + + private Double latitude; + + @Column(name="letzte_aenderung") + private Timestamp letzteAenderung; + + private Double longitude; + + @Column(name="mp_art") + private String mpArt; + + @Column(name="netzbetreiber_id") + private String netzbetreiberId; + + @Column(name="nuts_code") + private String nutsCode; + + @Column(name="ort_id") + private String ortId; + + @Column(name="ort_typ") + private Integer ortTyp; + + @Column(name="oz_id") + private Integer ozId; + + private String sektor; + + @Column(name="staat_id") + private Integer staatId; + + private String unscharf; + + private String zone; + + private String zustaendigkeit; + + @Column(name="kda_id") + private Integer koordinatenArt; + + @Transient + private boolean readonly; + + public Ort() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getAktiv() { + return this.aktiv; + } + + public void setAktiv(String aktiv) { + this.aktiv = aktiv; + } + + public Integer getAnlageId() { + return this.anlageId; + } + + public void setAnlageId(Integer anlageId) { + this.anlageId = anlageId; + } + + public String getBerichtstext() { + return this.berichtstext; + } + + public void setBerichtstext(String berichtstext) { + this.berichtstext = berichtstext; + } + + public String getGemId() { + return this.gemId; + } + + public void setGemId(String gemId) { + this.gemId = gemId; + } + + public Float getHoeheLand() { + return this.hoeheLand; + } + + public void setHoeheLand(Float hoeheLand) { + this.hoeheLand = hoeheLand; + } + + public String getKoordXExtern() { + return this.koordXExtern; + } + + public void setKoordXExtern(String koordXExtern) { + this.koordXExtern = koordXExtern; + } + + public String getKoordYExtern() { + return this.koordYExtern; + } + + public void setKoordYExtern(String koordYExtern) { + this.koordYExtern = koordYExtern; + } + + public String getKurztext() { + return this.kurztext; + } + + public void setKurztext(String kurztext) { + this.kurztext = kurztext; + } + + public String getLangtext() { + return this.langtext; + } + + public void setLangtext(String langtext) { + this.langtext = langtext; + } + + public Double getLatitude() { + return this.latitude; + } + + public void setLatitude(Double latitude) { + this.latitude = latitude; + } + + public Timestamp getLetzteAenderung() { + return this.letzteAenderung; + } + + public void setLetzteAenderung(Timestamp letzteAenderung) { + this.letzteAenderung = letzteAenderung; + } + + public Double getLongitude() { + return this.longitude; + } + + public void setLongitude(Double longitude) { + this.longitude = longitude; + } + + public String getMpArt() { + return this.mpArt; + } + + public void setMpArt(String mpArt) { + this.mpArt = mpArt; + } + + public String getNetzbetreiberId() { + return this.netzbetreiberId; + } + + public void setNetzbetreiberId(String netzbetreiberId) { + this.netzbetreiberId = netzbetreiberId; + } + + public String getNutsCode() { + return this.nutsCode; + } + + public void setNutsCode(String nutsCode) { + this.nutsCode = nutsCode; + } + + public String getOrtId() { + return this.ortId; + } + + public void setOrtId(String ortId) { + this.ortId = ortId; + } + + public Integer getOrtTyp() { + return this.ortTyp; + } + + public void setOrtTyp(Integer ortTyp) { + this.ortTyp = ortTyp; + } + + public Integer getOzId() { + return this.ozId; + } + + public void setOzId(Integer ozId) { + this.ozId = ozId; + } + + public String getSektor() { + return this.sektor; + } + + public void setSektor(String sektor) { + this.sektor = sektor; + } + + public Integer getStaatId() { + return this.staatId; + } + + public void setStaatId(Integer staatId) { + this.staatId = staatId; + } + + public String getUnscharf() { + return this.unscharf; + } + + public void setUnscharf(String unscharf) { + this.unscharf = unscharf; + } + + public String getZone() { + return this.zone; + } + + public void setZone(String zone) { + this.zone = zone; + } + + public String getZustaendigkeit() { + return this.zustaendigkeit; + } + + public void setZustaendigkeit(String zustaendigkeit) { + this.zustaendigkeit = zustaendigkeit; + } + + public Integer getKoordinatenArtId() { + return this.koordinatenArt; + } + + public void setKoordinatenArtId(Integer koordinatenArt) { + this.koordinatenArt = koordinatenArt; + } + + public boolean isReadonly() { + return readonly; + } + + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/OrtTyp.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,45 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the ort_typ database table. + * + */ +@Entity +@Table(name="ort_typ") +public class OrtTyp implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + @Column(name="ort_typ") + private String ortTyp; + + public OrtTyp() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getOrtTyp() { + return this.ortTyp; + } + + public void setOrtTyp(String ortTyp) { + this.ortTyp = ortTyp; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/OrtszuordnungTyp.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,43 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the ortszuordnung_typ database table. + * + */ +@Entity +@Table(name="ortszuordnung_typ") +public class OrtszuordnungTyp implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private String id; + + private String ortstyp; + + public OrtszuordnungTyp() { + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOrtstyp() { + return this.ortstyp; + } + + public void setOrtstyp(String ortstyp) { + this.ortstyp = ortstyp; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/PflichtMessgroesse.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,78 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the pflicht_messgroesse database table. + * + */ +@Entity +@Table(name="pflicht_messgroesse") +public class PflichtMessgroesse implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + @Column(name="messgroesse_id") + private Integer messgroesseId; + + @Column(name="datenbasis_id") + private Integer datenbasisId; + + @Column(name="mmt_id") + private String messMethodeId; + + @Column(name="umw_id") + private String umwId; + + public PflichtMessgroesse() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getMessgroesseId() { + return this.messgroesseId; + } + + public void setMessgroesseId(Integer messgroesseId) { + this.messgroesseId = messgroesseId; + } + + public Integer getDatenbasisId() { + return this.datenbasisId; + } + + public void setDatenbasisId(Integer datenbasisId) { + this.datenbasisId = datenbasisId; + } + + public String getMessMethodeId() { + return this.messMethodeId; + } + + public void setMessMethodeId(String messMethodeId) { + this.messMethodeId = messMethodeId; + } + + public String getUmwId() { + return this.umwId; + } + + public void setUmwId(String umwId) { + this.umwId = umwId; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/ProbenZusatz.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,76 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the proben_zusatz database table. + * + */ +@Entity +@Table(name="proben_zusatz") +public class ProbenZusatz implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private String id; + + private String beschreibung; + + @Column(name="eudf_keyword") + private String eudfKeyword; + + private String zusatzwert; + + @Column(name="meh_id") + private Integer messEinheitId; + + public ProbenZusatz() { + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getBeschreibung() { + return this.beschreibung; + } + + public void setBeschreibung(String beschreibung) { + this.beschreibung = beschreibung; + } + + public String getEudfKeyword() { + return this.eudfKeyword; + } + + public void setEudfKeyword(String eudfKeyword) { + this.eudfKeyword = eudfKeyword; + } + + public String getZusatzwert() { + return this.zusatzwert; + } + + public void setZusatzwert(String zusatzwert) { + this.zusatzwert = zusatzwert; + } + + public Integer getMessEinheitId() { + return this.messEinheitId; + } + + public void setMessEinheitId(Integer messEinheitId) { + this.messEinheitId = messEinheitId; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Probenart.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,63 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; + + +/** + * The persistent class for the probenart database table. + * + */ +@Entity +public class Probenart implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String beschreibung; + + private String probenart; + + @Column(name="probenart_eudf_id") + private String probenartEudfId; + + public Probenart() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBeschreibung() { + return this.beschreibung; + } + + public void setBeschreibung(String beschreibung) { + this.beschreibung = beschreibung; + } + + public String getProbenart() { + return this.probenart; + } + + public void setProbenart(String probenart) { + this.probenart = probenart; + } + + public String getProbenartEudfId() { + return this.probenartEudfId; + } + + public void setProbenartEudfId(String probenartEudfId) { + this.probenartEudfId = probenartEudfId; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Probenehmer.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,195 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Transient; + + +/** + * The persistent class for the probenehmer database table. + * + */ +@Entity +public class Probenehmer implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String bearbeiter; + + private String bemerkung; + + private String betrieb; + + private String bezeichnung; + + @Column(name="kurz_bezeichnung") + private String kurzBezeichnung; + + @Column(name="letzte_aenderung") + private Timestamp letzteAenderung; + + @Column(name="netzbetreiber_id") + private String netzbetreiberId; + + private String ort; + + private String plz; + + @Column(name="prn_id") + private String prnId; + + private String strasse; + + private String telefon; + + private String tp; + + private String typ; + + @Transient + private boolean readonly; + + public Probenehmer() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBearbeiter() { + return this.bearbeiter; + } + + public void setBearbeiter(String bearbeiter) { + this.bearbeiter = bearbeiter; + } + + public String getBemerkung() { + return this.bemerkung; + } + + public void setBemerkung(String bemerkung) { + this.bemerkung = bemerkung; + } + + public String getBetrieb() { + return this.betrieb; + } + + public void setBetrieb(String betrieb) { + this.betrieb = betrieb; + } + + public String getBezeichnung() { + return this.bezeichnung; + } + + public void setBezeichnung(String bezeichnung) { + this.bezeichnung = bezeichnung; + } + + public String getKurzBezeichnung() { + return this.kurzBezeichnung; + } + + public void setKurzBezeichnung(String kurzBezeichnung) { + this.kurzBezeichnung = kurzBezeichnung; + } + + public Timestamp getLetzteAenderung() { + return this.letzteAenderung; + } + + public void setLetzteAenderung(Timestamp letzteAenderung) { + this.letzteAenderung = letzteAenderung; + } + + public String getNetzbetreiberId() { + return this.netzbetreiberId; + } + + public void setNetzbetreiberId(String netzbetreiberId) { + this.netzbetreiberId = netzbetreiberId; + } + + public String getOrt() { + return this.ort; + } + + public void setOrt(String ort) { + this.ort = ort; + } + + public String getPlz() { + return this.plz; + } + + public void setPlz(String plz) { + this.plz = plz; + } + + public String getPrnId() { + return this.prnId; + } + + public void setPrnId(String prnId) { + this.prnId = prnId; + } + + public String getStrasse() { + return this.strasse; + } + + public void setStrasse(String strasse) { + this.strasse = strasse; + } + + public String getTelefon() { + return this.telefon; + } + + public void setTelefon(String telefon) { + this.telefon = telefon; + } + + public String getTp() { + return this.tp; + } + + public void setTp(String tp) { + this.tp = tp; + } + + public String getTyp() { + return this.typ; + } + + public void setTyp(String typ) { + this.typ = typ; + } + + /** + * @return the readonly + */ + public boolean isReadonly() { + return readonly; + } + + /** + * @param readonly the readonly to set + */ + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Query.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,167 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; +import java.util.List; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.OrderBy; +import javax.persistence.Transient; + +import com.fasterxml.jackson.annotation.JsonIgnore; + + +/** + * The persistent class for the query database table. + * + */ +@Entity +public class Query implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String description; + + private String name; + + private String sql; + + @ManyToOne + @JoinColumn(name="type", insertable=false, updatable=false) + private QueryType type; + + @Column(name="type") + private Integer typeId; + + @Transient + private Boolean favorite; + + //bi-directional many-to-one association to Filter + @OneToMany(fetch=FetchType.EAGER, mappedBy="query") + private List<Filter> filters; + + //bi-directional many-to-one association to Result + @OneToMany(fetch=FetchType.EAGER, mappedBy="query") + @OrderBy("index") + private List<Result> results; + + public Query() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSql() { + return this.sql; + } + + public void setSql(String sql) { + this.sql = sql; + } + + public String getType() { + return this.type.getType(); + } + + /** + * @return the typeId + */ + @JsonIgnore + public Integer getTypeId() { + return typeId; + } + + /** + * @param typeId the typeId to set + */ + @JsonIgnore + public void setTypeId(Integer typeId) { + this.typeId = typeId; + } + + /** + * @return the favorite + */ + public Boolean getFavorite() { + return favorite; + } + + /** + * @param favorite the favorite to set + */ + public void setFavorite(Boolean favorite) { + this.favorite = favorite; + } + + public List<Filter> getFilters() { + return this.filters; + } + + public void setFilters(List<Filter> filters) { + this.filters = filters; + } + + public Filter addFilter(Filter filter) { + getFilters().add(filter); + filter.setQuery(this); + + return filter; + } + + public Filter removeFilter(Filter filter) { + getFilters().remove(filter); + filter.setQuery(null); + + return filter; + } + + public List<Result> getResults() { + return this.results; + } + + public void setResults(List<Result> results) { + this.results = results; + } + + public Result addResult(Result result) { + getResults().add(result); + result.setQuery(this); + + return result; + } + + public Result removeResult(Result result) { + getResults().remove(result); + result.setQuery(null); + + return result; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/QueryType.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,43 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the query_type database table. + * + */ +@Entity +@Table(name="query_type") +public class QueryType implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String type; + + public QueryType() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Result.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,100 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.ManyToOne; + +import com.fasterxml.jackson.annotation.JsonIgnore; + + +/** + * The persistent class for the result database table. + * + */ +@Entity +public class Result implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + @Column(name="data_index") + private String dataIndex; + + private Boolean flex; + + private String header; + + private Integer index; + + //bi-directional many-to-one association to Query + @ManyToOne + private Query query; + + private Integer width; + + public Result() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getDataIndex() { + return this.dataIndex; + } + + public void setDataIndex(String dataIndex) { + this.dataIndex = dataIndex; + } + + public Boolean getFlex() { + return this.flex; + } + + public void setFlex(Boolean flex) { + this.flex = flex; + } + + public String getHeader() { + return this.header; + } + + public void setHeader(String header) { + this.header = header; + } + + public Integer getIndex() { + return this.index; + } + + public void setIndex(Integer index) { + this.index = index; + } + + @JsonIgnore + public Query getQuery() { + return this.query; + } + + @JsonIgnore + public void setQuery(Query query) { + this.query = query; + } + + public Integer getWidth() { + return this.width; + } + + public void setWidth(Integer width) { + this.width = width; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Staat.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,118 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; + + +/** + * The persistent class for the staat database table. + * + */ +@Entity +public class Staat implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String eu; + + @Column(name="hkl_id") + private Integer hklId; + + @Column(name="kda_id") + private Integer kdaId; + + @Column(name="koord_x_extern") + private String koordXExtern; + + @Column(name="koord_y_extern") + private String koordYExtern; + + private String staat; + + @Column(name="staat_iso") + private String staatIso; + + @Column(name="staat_kurz") + private String staatKurz; + + public Staat() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getEu() { + return this.eu; + } + + public void setEu(String eu) { + this.eu = eu; + } + + public Integer getHklId() { + return this.hklId; + } + + public void setHklId(Integer hklId) { + this.hklId = hklId; + } + + public Integer getKdaId() { + return this.kdaId; + } + + public void setKdaId(Integer kdaId) { + this.kdaId = kdaId; + } + + public String getKoordXExtern() { + return this.koordXExtern; + } + + public void setKoordXExtern(String koordXExtern) { + this.koordXExtern = koordXExtern; + } + + public String getKoordYExtern() { + return this.koordYExtern; + } + + public void setKoordYExtern(String koordYExtern) { + this.koordYExtern = koordYExtern; + } + + public String getStaat() { + return this.staat; + } + + public void setStaat(String staat) { + this.staat = staat; + } + + public String getStaatIso() { + return this.staatIso; + } + + public void setStaatIso(String staatIso) { + this.staatIso = staatIso; + } + + public String getStaatKurz() { + return this.staatKurz; + } + + public void setStaatKurz(String staatKurz) { + this.staatKurz = staatKurz; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/StatusErreichbar.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,84 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the status_erreichbar database table. + * + */ +@Entity +@Table(name="status_erreichbar") +public class StatusErreichbar implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + @Column(name="cur_stufe") + private Integer curStufe; + + @Column(name="cur_wert") + private Integer curWert; + + @Column(name="stufe_id") + private Integer stufeId; + + @Column(name="wert_id") + private Integer wertId; + + public StatusErreichbar() { + } + + /** + * @return the id + */ + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + public Integer getCurStufe() { + return this.curStufe; + } + + public void setCurStufe(Integer curStufe) { + this.curStufe = curStufe; + } + + public Integer getCurWert() { + return this.curWert; + } + + public void setCurWert(Integer curWert) { + this.curWert = curWert; + } + + public Integer getStufeId() { + return this.stufeId; + } + + public void setStufeId(Integer stufeId) { + this.stufeId = stufeId; + } + + public Integer getWertId() { + return this.wertId; + } + + public void setWertId(Integer wertId) { + this.wertId = wertId; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/StatusKombi.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,56 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; +import javax.persistence.*; + + +/** + * The persistent class for the status_kombi database table. + * + */ +@Entity +@Table(name="status_kombi") +public class StatusKombi implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + //bi-directional many-to-one association to StatusStufe + @ManyToOne(fetch=FetchType.EAGER) + @JoinColumn(name="stufe_id") + private StatusStufe statusStufe; + + //bi-directional many-to-one association to StatusWert + @ManyToOne(fetch=FetchType.EAGER) + @JoinColumn(name="wert_id") + private StatusWert statusWert; + + public StatusKombi() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public StatusStufe getStatusStufe() { + return this.statusStufe; + } + + public void setStatusStufe(StatusStufe statusStufe) { + this.statusStufe = statusStufe; + } + + public StatusWert getStatusWert() { + return this.statusWert; + } + + public void setStatusWert(StatusWert statusWert) { + this.statusWert = statusWert; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/StatusReihenfolge.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,56 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the status_reihenfolge database table. + * + */ +@Entity +@Table(name="status_reihenfolge") +public class StatusReihenfolge implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + @Column(name="von_id") + private Integer vonId; + + @Column(name="zu_id") + private Integer zuId; + + public StatusReihenfolge() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getVonId() { + return this.vonId; + } + + public void setVonId(Integer vonId) { + this.vonId = vonId; + } + + public Integer getZuId() { + return this.zuId; + } + + public void setZuId(Integer zuId) { + this.zuId = zuId; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/StatusStufe.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,42 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the status_stufe database table. + * + */ +@Entity +@Table(name="status_stufe") +public class StatusStufe implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String stufe; + + public StatusStufe() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getStufe() { + return this.stufe; + } + + public void setStufe(String stufe) { + this.stufe = stufe; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/StatusWert.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,42 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + + +/** + * The persistent class for the status_wert database table. + * + */ +@Entity +@Table(name="status_wert") +public class StatusWert implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private Integer id; + + private String wert; + + public StatusWert() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getWert() { + return this.wert; + } + + public void setWert(String wert) { + this.wert = wert; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Umwelt.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,63 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; + + +/** + * The persistent class for the umwelt database table. + * + */ +@Entity +public class Umwelt implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private String id; + + private String beschreibung; + + @Column(name="meh_id") + private Integer mehId; + + @Column(name="umwelt_bereich") + private String umweltBereich; + + public Umwelt() { + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getBeschreibung() { + return this.beschreibung; + } + + public void setBeschreibung(String beschreibung) { + this.beschreibung = beschreibung; + } + + public Integer getMehId() { + return this.mehId; + } + + public void setMehId(Integer mehId) { + this.mehId = mehId; + } + + public String getUmweltBereich() { + return this.umweltBereich; + } + + public void setUmweltBereich(String umweltBereich) { + this.umweltBereich = umweltBereich; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/stammdaten/Verwaltungseinheit.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,189 @@ +package de.intevation.lada.model.stammdaten; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; + + +/** + * The persistent class for the verwaltungseinheit database table. + * + */ +@Entity +public class Verwaltungseinheit implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + private String id; + + private String bezeichnung; + + private String bundesland; + + @Column(name="is_bundesland") + private String isBundesland; + + @Column(name="is_gemeinde") + private String isGemeinde; + + @Column(name="is_landkreis") + private String isLandkreis; + + @Column(name="is_regbezirk") + private String isRegbezirk; + + @Column(name="kda_id") + private Integer kdaId; + + @Column(name="koord_x_extern") + private String koordXExtern; + + @Column(name="koord_y_extern") + private String koordYExtern; + + private String kreis; + + private double latitude; + + private double longitude; + + private String nuts; + + private String plz; + + private String regbezirk; + + public Verwaltungseinheit() { + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getBezeichnung() { + return this.bezeichnung; + } + + public void setBezeichnung(String bezeichnung) { + this.bezeichnung = bezeichnung; + } + + public String getBundesland() { + return this.bundesland; + } + + public void setBundesland(String bundesland) { + this.bundesland = bundesland; + } + + public String getIsBundesland() { + return this.isBundesland; + } + + public void setIsBundesland(String isBundesland) { + this.isBundesland = isBundesland; + } + + public String getIsGemeinde() { + return this.isGemeinde; + } + + public void setIsGemeinde(String isGemeinde) { + this.isGemeinde = isGemeinde; + } + + public String getIsLandkreis() { + return this.isLandkreis; + } + + public void setIsLandkreis(String isLandkreis) { + this.isLandkreis = isLandkreis; + } + + public String getIsRegbezirk() { + return this.isRegbezirk; + } + + public void setIsRegbezirk(String isRegbezirk) { + this.isRegbezirk = isRegbezirk; + } + + public Integer getKdaId() { + return this.kdaId; + } + + public void setKdaId(Integer kdaId) { + this.kdaId = kdaId; + } + + public String getKoordXExtern() { + return this.koordXExtern; + } + + public void setKoordXExtern(String koordXExtern) { + this.koordXExtern = koordXExtern; + } + + public String getKoordYExtern() { + return this.koordYExtern; + } + + public void setKoordYExtern(String koordYExtern) { + this.koordYExtern = koordYExtern; + } + + public String getKreis() { + return this.kreis; + } + + public void setKreis(String kreis) { + this.kreis = kreis; + } + + public double getLatitude() { + return this.latitude; + } + + public void setLatitude(double latitude) { + this.latitude = latitude; + } + + public double getLongitude() { + return this.longitude; + } + + public void setLongitude(double longitude) { + this.longitude = longitude; + } + + public String getNuts() { + return this.nuts; + } + + public void setNuts(String nuts) { + this.nuts = nuts; + } + + public String getPlz() { + return this.plz; + } + + public void setPlz(String plz) { + this.plz = plz; + } + + public String getRegbezirk() { + return this.regbezirk; + } + + public void setRegbezirk(String regbezirk) { + this.regbezirk = regbezirk; + } + +}
--- a/src/main/java/de/intevation/lada/query/QueryTools.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/query/QueryTools.java Fri Jul 08 15:32:36 2016 +0200 @@ -26,14 +26,13 @@ import org.apache.log4j.Logger; -import de.intevation.lada.model.stamm.Filter; -import de.intevation.lada.model.stamm.Query; -import de.intevation.lada.model.stamm.Result; +import de.intevation.lada.model.stammdaten.Filter; +import de.intevation.lada.model.stammdaten.Query; +import de.intevation.lada.model.stammdaten.Result; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType; -import de.intevation.lada.util.rest.Response; /**
--- a/src/main/java/de/intevation/lada/rest/KommentarMService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/KommentarMService.java Fri Jul 08 15:32:36 2016 +0200 @@ -23,8 +23,8 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.land.LKommentarM; -import de.intevation.lada.model.land.LMessung; +import de.intevation.lada.model.land.KommentarM; +import de.intevation.lada.model.land.Messung; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization; @@ -116,23 +116,23 @@ catch(NumberFormatException nfe) { return new Response(false, 699, null); } - LMessung messung = defaultRepo.getByIdPlain( - LMessung.class, + Messung messung = defaultRepo.getByIdPlain( + Messung.class, id, "land"); - if (!authorization.isAuthorized(request, messung, RequestMethod.GET, LMessung.class)) { + if (!authorization.isAuthorized(request, messung, RequestMethod.GET, Messung.class)) { return new Response(false, 699, null); } - QueryBuilder<LKommentarM> builder = - new QueryBuilder<LKommentarM>( + QueryBuilder<KommentarM> builder = + new QueryBuilder<KommentarM>( defaultRepo.entityManager("land"), - LKommentarM.class); + KommentarM.class); builder.and("messungsId", messungId); return authorization.filter( request, defaultRepo.filter(builder.getQuery(), "land"), - LKommentarM.class); + KommentarM.class); } /** @@ -153,20 +153,20 @@ @PathParam("id") String id ) { Response response = - defaultRepo.getById(LKommentarM.class, Integer.valueOf(id), "land"); - LKommentarM kommentar = (LKommentarM)response.getData(); - LMessung messung = defaultRepo.getByIdPlain( - LMessung.class, + defaultRepo.getById(KommentarM.class, Integer.valueOf(id), "land"); + KommentarM kommentar = (KommentarM)response.getData(); + Messung messung = defaultRepo.getByIdPlain( + Messung.class, kommentar.getMessungsId(), "land"); - if (!authorization.isAuthorized(request, messung, RequestMethod.GET, LMessung.class)) { + if (!authorization.isAuthorized(request, messung, RequestMethod.GET, Messung.class)) { return new Response(false, 699, null); } return authorization.filter( request, response, - LKommentarM.class); + KommentarM.class); } /** @@ -193,13 +193,13 @@ public Response create( @Context HttpHeaders headers, @Context HttpServletRequest request, - LKommentarM kommentar + KommentarM kommentar ) { if (!authorization.isAuthorized( request, kommentar, RequestMethod.POST, - LKommentarM.class) + KommentarM.class) ) { return new Response(false, 699, null); } @@ -207,7 +207,7 @@ return authorization.filter( request, defaultRepo.create(kommentar, "land"), - LKommentarM.class); + KommentarM.class); } /** @@ -235,20 +235,20 @@ public Response update( @Context HttpHeaders headers, @Context HttpServletRequest request, - LKommentarM kommentar + KommentarM kommentar ) { if (!authorization.isAuthorized( request, kommentar, RequestMethod.PUT, - LKommentarM.class) + KommentarM.class) ) { return new Response(false, 699, null); } return authorization.filter( request, defaultRepo.update(kommentar, "land"), - LKommentarM.class); + KommentarM.class); } /** @@ -270,13 +270,13 @@ ) { /* Get the object by id*/ Response kommentar = - defaultRepo.getById(LKommentarM.class, Integer.valueOf(id), "land"); - LKommentarM kommentarObj = (LKommentarM)kommentar.getData(); + defaultRepo.getById(KommentarM.class, Integer.valueOf(id), "land"); + KommentarM kommentarObj = (KommentarM)kommentar.getData(); if (!authorization.isAuthorized( request, kommentarObj, RequestMethod.DELETE, - LKommentarM.class) + KommentarM.class) ) { return new Response(false, 699, null); }
--- a/src/main/java/de/intevation/lada/rest/KommentarPService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/KommentarPService.java Fri Jul 08 15:32:36 2016 +0200 @@ -25,7 +25,7 @@ import org.apache.log4j.Logger; -import de.intevation.lada.model.land.LKommentarP; +import de.intevation.lada.model.land.KommentarP; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization; @@ -111,18 +111,18 @@ ) { MultivaluedMap<String, String> params = info.getQueryParameters(); if (params.isEmpty() || !params.containsKey("probeId")) { - return defaultRepo.getAll(LKommentarP.class, "land"); + return defaultRepo.getAll(KommentarP.class, "land"); } String probeId = params.getFirst("probeId"); - QueryBuilder<LKommentarP> builder = - new QueryBuilder<LKommentarP>( + QueryBuilder<KommentarP> builder = + new QueryBuilder<KommentarP>( defaultRepo.entityManager("land"), - LKommentarP.class); + KommentarP.class); builder.and("probeId", probeId); return authorization.filter( request, defaultRepo.filter(builder.getQuery(), "land"), - LKommentarP.class); + KommentarP.class); } /** @@ -144,8 +144,8 @@ ) { return authorization.filter( request, - defaultRepo.getById(LKommentarP.class,Integer.valueOf(id), "land"), - LKommentarP.class); + defaultRepo.getById(KommentarP.class,Integer.valueOf(id), "land"), + KommentarP.class); } /** @@ -173,13 +173,13 @@ public Response create( @Context HttpHeaders headers, @Context HttpServletRequest request, - LKommentarP kommentar + KommentarP kommentar ) { if (!authorization.isAuthorized( request, kommentar, RequestMethod.POST, - LKommentarP.class) + KommentarP.class) ) { return new Response(false, 699, null); } @@ -187,7 +187,7 @@ return authorization.filter( request, defaultRepo.create(kommentar, "land"), - LKommentarP.class); + KommentarP.class); } /** @@ -215,13 +215,13 @@ public Response update( @Context HttpHeaders headers, @Context HttpServletRequest request, - LKommentarP kommentar + KommentarP kommentar ) { if (!authorization.isAuthorized( request, kommentar, RequestMethod.PUT, - LKommentarP.class) + KommentarP.class) ) { logger.debug("User is not authorized!"); return new Response(false, 699, null); @@ -229,7 +229,7 @@ return authorization.filter( request, defaultRepo.update(kommentar, "land"), - LKommentarP.class); + KommentarP.class); } /** @@ -251,13 +251,13 @@ ) { /* Get the object by id*/ Response kommentar = - defaultRepo.getById(LKommentarP.class, Integer.valueOf(id), "land"); - LKommentarP kommentarObj = (LKommentarP)kommentar.getData(); + defaultRepo.getById(KommentarP.class, Integer.valueOf(id), "land"); + KommentarP kommentarObj = (KommentarP)kommentar.getData(); if (!authorization.isAuthorized( request, kommentarObj, RequestMethod.DELETE, - LKommentarP.class) + KommentarP.class) ) { logger.debug("User is not authorized!"); return new Response(false, 699, null);
--- a/src/main/java/de/intevation/lada/rest/MessungService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/MessungService.java Fri Jul 08 15:32:36 2016 +0200 @@ -31,10 +31,9 @@ import de.intevation.lada.lock.LockConfig; import de.intevation.lada.lock.LockType; import de.intevation.lada.lock.ObjectLocker; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.LStatusProtokoll; -import de.intevation.lada.model.land.MessungTranslation; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.land.StatusProtokoll; import de.intevation.lada.query.QueryTools; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; @@ -140,19 +139,19 @@ MultivaluedMap<String, String> params = info.getQueryParameters(); if (params.isEmpty() || (!params.containsKey("probeId") && !params.containsKey("qid"))) { - return repository.getAll(LMessung.class, "land"); + return repository.getAll(Messung.class, "land"); } if (params.containsKey("probeId")) { String probeId = params.getFirst("probeId"); - QueryBuilder<LMessung> builder = - new QueryBuilder<LMessung>( + QueryBuilder<Messung> builder = + new QueryBuilder<Messung>( repository.entityManager("land"), - LMessung.class); + Messung.class); builder.and("probeId", probeId); return authorization.filter( request, repository.filter(builder.getQuery(), "land"), - LMessung.class); + Messung.class); } else if (params.containsKey("qid")) { Integer id = null; @@ -176,14 +175,14 @@ result = result.subList(start, end); } - QueryBuilder<LMessung> pBuilder = new QueryBuilder<LMessung>( - repository.entityManager("land"), LMessung.class); + QueryBuilder<Messung> pBuilder = new QueryBuilder<Messung>( + repository.entityManager("land"), Messung.class); for (Map<String, Object> entry: result) { pBuilder.or("id", (Integer)entry.get("id")); } Response r = repository.filter(pBuilder.getQuery(), "land"); - r = authorization.filter(request, r, LMessung.class); - List<LMessung> messungen= (List<LMessung>)r.getData(); + r = authorization.filter(request, r, Messung.class); + List<Messung> messungen= (List<Messung>)r.getData(); for (Map<String, Object> entry: result) { Integer pId = Integer.valueOf(entry.get("id").toString()); setAuthData(messungen, entry, pId); @@ -194,7 +193,7 @@ } private void setAuthData( - List<LMessung> messungen, + List<Messung> messungen, Map<String, Object> entry, Integer id ) { @@ -227,8 +226,8 @@ @PathParam("id") String id ) { Response response = - repository.getById(LMessung.class, Integer.valueOf(id), "land"); - LMessung messung = (LMessung)response.getData(); + repository.getById(Messung.class, Integer.valueOf(id), "land"); + Messung messung = (Messung)response.getData(); Violation violation = validator.validate(messung); if (violation.hasErrors() || violation.hasWarnings()) { response.setErrors(violation.getErrors()); @@ -237,7 +236,7 @@ return authorization.filter( request, response, - LMessung.class); + Messung.class); } /** @@ -272,13 +271,13 @@ public Response create( @Context HttpHeaders headers, @Context HttpServletRequest request, - LMessung messung + Messung messung ) { if (!authorization.isAuthorized( request, messung, RequestMethod.POST, - LMessung.class) + Messung.class) ) { return new Response(false, 699, null); } @@ -293,36 +292,28 @@ /* Persist the new messung object*/ Response response = repository.create(messung, "land"); - LMessung ret = (LMessung)response.getData(); - /* Create and persist a new probe translation object*/ - MessungTranslation trans = new MessungTranslation(); - trans.setMessungsId(ret); - repository.create(trans, "land"); - /* Get and return the new probe object*/ - Response created = - repository.getById(LMessung.class, ret.getId(), "land"); + Messung ret = (Messung)response.getData(); if(violation.hasWarnings()) { - created.setWarnings(violation.getWarnings()); + response.setWarnings(violation.getWarnings()); } - LStatusProtokoll status = new LStatusProtokoll(); + StatusProtokoll status = new StatusProtokoll(); status.setDatum(new Timestamp(new Date().getTime())); - status.setMessungsId(((LMessung)created.getData()).getId()); - LProbe probe = - repository.getByIdPlain(LProbe.class, ret.getProbeId(), "land"); - status.setErzeuger(probe.getMstId()); - status.setStatusStufe(1); - status.setStatusWert(0); + status.setMessungsId((ret.getId())); + Probe probe = + repository.getByIdPlain(Probe.class, ret.getProbeId(), "land"); + status.setMstId(probe.getMstId()); + status.setStatusKombi(1); repository.create(status, "land"); ret.setStatus(status.getId()); repository.update(ret, "land"); Response updated= - repository.getById(LMessung.class, ret.getId(), "land"); + repository.getById(Messung.class, ret.getId(), "land"); return authorization.filter( request, updated, - LMessung.class); + Messung.class); } /** @@ -357,13 +348,13 @@ public Response update( @Context HttpHeaders headers, @Context HttpServletRequest request, - LMessung messung + Messung messung ) { if (!authorization.isAuthorized( request, messung, RequestMethod.PUT, - LMessung.class) + Messung.class) ) { return new Response(false, 699, null); } @@ -382,15 +373,15 @@ return response; } Response updated = repository.getById( - LMessung.class, - ((LMessung)response.getData()).getId(), "land"); + Messung.class, + ((Messung)response.getData()).getId(), "land"); if(violation.hasWarnings()) { updated.setWarnings(violation.getWarnings()); } return authorization.filter( request, updated, - LMessung.class); + Messung.class); } /** @@ -412,13 +403,13 @@ ) { /* Get the messung object by id*/ Response messung = - repository.getById(LMessung.class, Integer.valueOf(id), "land"); - LMessung messungObj = (LMessung)messung.getData(); + repository.getById(Messung.class, Integer.valueOf(id), "land"); + Messung messungObj = (Messung)messung.getData(); if (!authorization.isAuthorized( request, messungObj, RequestMethod.DELETE, - LMessung.class) + Messung.class) ) { return new Response(false, 699, null); }
--- a/src/main/java/de/intevation/lada/rest/MesswertService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/MesswertService.java Fri Jul 08 15:32:36 2016 +0200 @@ -31,8 +31,8 @@ import de.intevation.lada.lock.LockConfig; import de.intevation.lada.lock.LockType; import de.intevation.lada.lock.ObjectLocker; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LMesswert; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Messwert; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization; @@ -151,27 +151,27 @@ catch(NumberFormatException nfe) { return new Response(false, 698, null); } - LMessung messung = defaultRepo.getByIdPlain( - LMessung.class, + Messung messung = defaultRepo.getByIdPlain( + Messung.class, id, "land"); if (!authorization.isAuthorized( request, messung, RequestMethod.GET, - LMessung.class) + Messung.class) ) { return new Response(false, 697, null); } - QueryBuilder<LMesswert> builder = - new QueryBuilder<LMesswert>( + QueryBuilder<Messwert> builder = + new QueryBuilder<Messwert>( defaultRepo.entityManager("land"), - LMesswert.class); + Messwert.class); builder.and("messungsId", messungId); return authorization.filter( request, defaultRepo.filter(builder.getQuery(), "land"), - LMesswert.class); + Messwert.class); } /** @@ -192,17 +192,17 @@ @PathParam("id") String id ) { Response response = - defaultRepo.getById(LMesswert.class, Integer.valueOf(id), "land"); - LMesswert messwert = (LMesswert)response.getData(); - LMessung messung = defaultRepo.getByIdPlain( - LMessung.class, + defaultRepo.getById(Messwert.class, Integer.valueOf(id), "land"); + Messwert messwert = (Messwert)response.getData(); + Messung messung = defaultRepo.getByIdPlain( + Messung.class, messwert.getMessungsId(), "land"); if (!authorization.isAuthorized( request, messung, RequestMethod.GET, - LMessung.class) + Messung.class) ) { return new Response(false, 699, null); } @@ -214,7 +214,7 @@ return authorization.filter( request, response, - LMesswert.class); + Messwert.class); } /** @@ -249,13 +249,13 @@ public Response create( @Context HttpHeaders headers, @Context HttpServletRequest request, - LMesswert messwert + Messwert messwert ) { if (!authorization.isAuthorized( request, messwert, RequestMethod.POST, - LMesswert.class) + Messwert.class) ) { return new Response(false, 699, null); } @@ -275,7 +275,7 @@ return authorization.filter( request, response, - LMesswert.class); + Messwert.class); } /** @@ -310,13 +310,13 @@ public Response update( @Context HttpHeaders headers, @Context HttpServletRequest request, - LMesswert messwert + Messwert messwert ) { if (!authorization.isAuthorized( request, messwert, RequestMethod.PUT, - LMesswert.class) + Messwert.class) ) { return new Response(false, 699, null); } @@ -336,8 +336,8 @@ return response; } Response updated = defaultRepo.getById( - LMesswert.class, - ((LMesswert)response.getData()).getId(), "land"); + Messwert.class, + ((Messwert)response.getData()).getId(), "land"); if(violation.hasWarnings()) { updated.setWarnings(violation.getWarnings()); } @@ -345,7 +345,7 @@ return authorization.filter( request, updated, - LMesswert.class); + Messwert.class); } /** @@ -367,13 +367,13 @@ ) { /* Get the messwert object by id*/ Response messwert = - defaultRepo.getById(LMesswert.class, Integer.valueOf(id), "land"); - LMesswert messwertObj = (LMesswert)messwert.getData(); + defaultRepo.getById(Messwert.class, Integer.valueOf(id), "land"); + Messwert messwertObj = (Messwert)messwert.getData(); if (!authorization.isAuthorized( request, messwertObj, RequestMethod.DELETE, - LMesswert.class) + Messwert.class) ) { return new Response(false, 699, null); }
--- a/src/main/java/de/intevation/lada/rest/OrtService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/OrtService.java Fri Jul 08 15:32:36 2016 +0200 @@ -31,7 +31,7 @@ import de.intevation.lada.lock.LockConfig; import de.intevation.lada.lock.LockType; import de.intevation.lada.lock.ObjectLocker; -import de.intevation.lada.model.land.LOrtszuordnung; +import de.intevation.lada.model.land.Ortszuordnung; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization; @@ -136,18 +136,18 @@ MultivaluedMap<String, String> params = info.getQueryParameters(); if (params.isEmpty() || !params.containsKey("probeId")) { logger.debug("get all"); - return defaultRepo.getAll(LOrtszuordnung.class, "land"); + return defaultRepo.getAll(Ortszuordnung.class, "land"); } String probeId = params.getFirst("probeId"); - QueryBuilder<LOrtszuordnung> builder = - new QueryBuilder<LOrtszuordnung>( + QueryBuilder<Ortszuordnung> builder = + new QueryBuilder<Ortszuordnung>( defaultRepo.entityManager("land"), - LOrtszuordnung.class); + Ortszuordnung.class); builder.and("probeId", probeId); return authorization.filter( request, defaultRepo.filter(builder.getQuery(), "land"), - LOrtszuordnung.class); + Ortszuordnung.class); } /** @@ -168,8 +168,8 @@ @PathParam("id") String id ) { Response response = - defaultRepo.getById(LOrtszuordnung.class, Integer.valueOf(id), "land"); - LOrtszuordnung ort = (LOrtszuordnung)response.getData(); + defaultRepo.getById(Ortszuordnung.class, Integer.valueOf(id), "land"); + Ortszuordnung ort = (Ortszuordnung)response.getData(); Violation violation = validator.validate(ort); if (violation.hasErrors() || violation.hasWarnings()) { response.setErrors(violation.getErrors()); @@ -178,7 +178,7 @@ return authorization.filter( request, response, - LOrtszuordnung.class); + Ortszuordnung.class); } /** @@ -209,13 +209,13 @@ public Response create( @Context HttpHeaders headers, @Context HttpServletRequest request, - LOrtszuordnung ort + Ortszuordnung ort ) { if (!authorization.isAuthorized( request, ort, RequestMethod.POST, - LOrtszuordnung.class)) { + Ortszuordnung.class)) { return new Response(false, 699, null); } Violation violation = validator.validate(ort); @@ -235,7 +235,7 @@ return authorization.filter( request, response, - LOrtszuordnung.class); + Ortszuordnung.class); } /** @@ -266,13 +266,13 @@ public Response update( @Context HttpHeaders headers, @Context HttpServletRequest request, - LOrtszuordnung ort + Ortszuordnung ort ) { if (!authorization.isAuthorized( request, ort, RequestMethod.PUT, - LOrtszuordnung.class)) { + Ortszuordnung.class)) { return new Response(false, 699, null); } if (lock.isLocked(ort)) { @@ -291,8 +291,8 @@ return response; } Response updated = defaultRepo.getById( - LOrtszuordnung.class, - ((LOrtszuordnung)response.getData()).getId(), "land"); + Ortszuordnung.class, + ((Ortszuordnung)response.getData()).getId(), "land"); if(violation.hasWarnings()) { updated.setWarnings(violation.getWarnings()); } @@ -300,7 +300,7 @@ return authorization.filter( request, updated, - LOrtszuordnung.class); + Ortszuordnung.class); } /** @@ -321,13 +321,13 @@ @PathParam("id") String id ) { Response object = - defaultRepo.getById(LOrtszuordnung.class, Integer.valueOf(id), "land"); - LOrtszuordnung ortObj = (LOrtszuordnung)object.getData(); + defaultRepo.getById(Ortszuordnung.class, Integer.valueOf(id), "land"); + Ortszuordnung ortObj = (Ortszuordnung)object.getData(); if (!authorization.isAuthorized( request, ortObj, RequestMethod.PUT, - LOrtszuordnung.class)) { + Ortszuordnung.class)) { return new Response(false, 699, null); } if (lock.isLocked(ortObj)) {
--- a/src/main/java/de/intevation/lada/rest/ProbeService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/ProbeService.java Fri Jul 08 15:32:36 2016 +0200 @@ -37,8 +37,7 @@ import de.intevation.lada.lock.LockConfig; import de.intevation.lada.lock.LockType; import de.intevation.lada.lock.ObjectLocker; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.ProbeTranslation; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.query.QueryTools; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; @@ -181,7 +180,7 @@ ) { MultivaluedMap<String, String> params = info.getQueryParameters(); if (params.isEmpty() || !params.containsKey("qid")) { - return repository.getAll(LProbe.class, "land"); + return repository.getAll(Probe.class, "land"); } Integer id = null; try { @@ -204,14 +203,14 @@ result = result.subList(start, end); } - QueryBuilder<LProbe> pBuilder = new QueryBuilder<LProbe>( - repository.entityManager("land"), LProbe.class); + QueryBuilder<Probe> pBuilder = new QueryBuilder<Probe>( + repository.entityManager("land"), Probe.class); for (Map<String, Object> entry: result) { pBuilder.or("id", (Integer)entry.get("id")); } Response r = repository.filter(pBuilder.getQuery(), "land"); - r = authorization.filter(request, r, LProbe.class); - List<LProbe> proben = (List<LProbe>)r.getData(); + r = authorization.filter(request, r, Probe.class); + List<Probe> proben = (List<Probe>)r.getData(); for (Map<String, Object> entry: result) { Integer pId = Integer.valueOf(entry.get("id").toString()); setAuthData(proben, entry, pId); @@ -220,14 +219,14 @@ } private void setAuthData( - List<LProbe> proben, + List<Probe> proben, Map<String, Object> entry, Integer id ) { for (int i = 0; i < proben.size(); i++) { if (id.equals(proben.get(i).getId())) { - entry.put("readonly", proben.get(i).getReadonly()); - entry.put("owner", proben.get(i).getOwner()); + entry.put("readonly", proben.get(i).isReadonly()); + entry.put("owner", proben.get(i).isOwner()); return; } } @@ -251,12 +250,12 @@ @Context HttpServletRequest request ) { Response response = - repository.getById(LProbe.class, Integer.valueOf(id), "land"); + repository.getById(Probe.class, Integer.valueOf(id), "land"); Violation violation = validator.validate(response.getData()); if (violation.hasWarnings()) { response.setWarnings(violation.getWarnings()); } - return this.authorization.filter(request, response, LProbe.class); + return this.authorization.filter(request, response, Probe.class); } /** @@ -302,13 +301,13 @@ public Response create( @Context HttpHeaders headers, @Context HttpServletRequest request, - LProbe probe + Probe probe ) { if (!authorization.isAuthorized( request, probe, RequestMethod.POST, - LProbe.class) + Probe.class) ) { return new Response(false, 699, null); } @@ -325,21 +324,15 @@ probe = factory.findMediaDesk(probe); /* Persist the new probe object*/ Response newProbe = repository.create(probe, "land"); - LProbe ret = (LProbe)newProbe.getData(); + Probe ret = (Probe)newProbe.getData(); /* Create and persist a new probe translation object*/ - ProbeTranslation trans = new ProbeTranslation(); - trans.setProbeId(ret); - repository.create(trans, "land"); - /* Get and return the new probe object*/ - Response response = - repository.getById(LProbe.class, ret.getId(), "land"); if(violation.hasWarnings()) { - response.setWarnings(violation.getWarnings()); + newProbe.setWarnings(violation.getWarnings()); } return authorization.filter( request, - response, - LProbe.class); + newProbe, + Probe.class); } /** @@ -369,7 +362,7 @@ String id = object.get("id").toString(); long start = object.getJsonNumber("start").longValue(); long end = object.getJsonNumber("end").longValue(); - List<LProbe> proben = factory.create( + List<Probe> proben = factory.create( id, start, end); @@ -419,13 +412,13 @@ public Response update( @Context HttpHeaders headers, @Context HttpServletRequest request, - LProbe probe + Probe probe ) { if (!authorization.isAuthorized( request, probe, RequestMethod.PUT, - LProbe.class) + Probe.class) ) { return new Response(false, 699, null); } @@ -450,15 +443,15 @@ return response; } Response updated = repository.getById( - LProbe.class, - ((LProbe)response.getData()).getId(), "land"); + Probe.class, + ((Probe)response.getData()).getId(), "land"); if (violation.hasWarnings()) { updated.setWarnings(violation.getWarnings()); } return authorization.filter( request, updated, - LProbe.class); + Probe.class); } /** @@ -480,13 +473,13 @@ ) { /* Get the probe object by id*/ Response probe = - repository.getById(LProbe.class, Integer.valueOf(id), "land"); - LProbe probeObj = (LProbe)probe.getData(); + repository.getById(Probe.class, Integer.valueOf(id), "land"); + Probe probeObj = (Probe)probe.getData(); if (!authorization.isAuthorized( request, probeObj, RequestMethod.DELETE, - LProbe.class) + Probe.class) ) { return new Response(false, 699, null); }
--- a/src/main/java/de/intevation/lada/rest/StatusService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/StatusService.java Fri Jul 08 15:32:36 2016 +0200 @@ -32,10 +32,12 @@ import de.intevation.lada.lock.LockConfig; import de.intevation.lada.lock.LockType; import de.intevation.lada.lock.ObjectLocker; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.LStatusProtokoll; -import de.intevation.lada.model.stamm.MessStelle; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.land.StatusProtokoll; +import de.intevation.lada.model.stammdaten.MessStelle; +import de.intevation.lada.model.stammdaten.StatusKombi; +import de.intevation.lada.model.stammdaten.StatusReihenfolge; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization; @@ -149,15 +151,15 @@ return new Response(false, 698, null); } - QueryBuilder<LStatusProtokoll> builder = - new QueryBuilder<LStatusProtokoll>( + QueryBuilder<StatusProtokoll> builder = + new QueryBuilder<StatusProtokoll>( defaultRepo.entityManager("land"), - LStatusProtokoll.class); + StatusProtokoll.class); builder.and("messungsId", id); return authorization.filter( request, defaultRepo.filter(builder.getQuery(), "land"), - LStatusProtokoll.class); + StatusProtokoll.class); } /** @@ -178,10 +180,10 @@ @PathParam("id") String id ) { Response response = defaultRepo.getById( - LStatusProtokoll.class, + StatusProtokoll.class, Integer.valueOf(id), "land"); - LStatusProtokoll status = (LStatusProtokoll)response.getData(); + StatusProtokoll status = (StatusProtokoll)response.getData(); Violation violation = validator.validate(status); if (violation.hasErrors() || violation.hasWarnings()) { response.setErrors(violation.getErrors()); @@ -191,7 +193,7 @@ return authorization.filter( request, response, - LStatusProtokoll.class); + StatusProtokoll.class); } /** @@ -222,18 +224,17 @@ public Response create( @Context HttpHeaders headers, @Context HttpServletRequest request, - LStatusProtokoll status + StatusProtokoll status ) { if (status.getMessungsId() == null - || status.getErzeuger() == null - || status.getStatusWert() == null + || status.getMstId() == null ) { return new Response(false, 631, null); } UserInfo userInfo = authorization.getInfo(request); - LMessung messung = defaultRepo.getByIdPlain( - LMessung.class, status.getMessungsId(), "land"); + Messung messung = defaultRepo.getByIdPlain( + Messung.class, status.getMessungsId(), "land"); if (lock.isLocked(messung)) { return new Response(false, 697, null); } @@ -242,40 +243,42 @@ Response r = authorization.filter( request, new Response(true, 200, messung), - LMessung.class); - LMessung filteredMessung = (LMessung)r.getData(); + Messung.class); + Messung filteredMessung = (Messung)r.getData(); if (filteredMessung.getStatusEdit() == false) { return new Response(false, 699, null); } if (messung.getStatus() == null) { - status.setStatusStufe(1); + // set the first status as default + status.setStatusKombi(1); } else { - LStatusProtokoll currentStatus = defaultRepo.getByIdPlain( - LStatusProtokoll.class, messung.getStatus(), "land"); + StatusProtokoll currentStatus = defaultRepo.getByIdPlain( + StatusProtokoll.class, messung.getStatus(), "land"); String probeMstId = defaultRepo.getByIdPlain( - LProbe.class, + Probe.class, messung.getProbeId(), "land").getMstId(); - if (currentStatus.getStatusWert() == 4) { - if (status.getStatusWert() == 4 - && userInfo.getMessstellen().contains( - currentStatus.getErzeuger()) - && status.getErzeuger().equals( - currentStatus.getErzeuger()) + StatusKombi kombiCurrent = defaultRepo.getByIdPlain(StatusKombi.class, currentStatus.getStatusKombi(), "stamm"); + StatusKombi kombiStatus = defaultRepo.getByIdPlain(StatusKombi.class, status.getStatusKombi(), "stamm"); + if (kombiCurrent.getStatusWert().getId() == 4) { + if (userInfo.getMessstellen().contains( + currentStatus.getMstId()) + && status.getMstId().equals( + currentStatus.getMstId()) ) { // 'edit' currentStatus - status.setStatusStufe(currentStatus.getStatusStufe()); + status.setStatusKombi(kombiCurrent.getId()); } else if ( userInfo.getFunktionenForMst(probeMstId) .contains(1) - && probeMstId.equals(status.getErzeuger()) + && probeMstId.equals(status.getMstId()) ) { - status.setStatusStufe(1); + status.setStatusKombi(1); } else { return new Response(false, 699, null); @@ -296,29 +299,29 @@ // XXX: It's assumed here, that an 'Erzeuger' is an instance // of 'Messstelle', but the model does not enforce it! for (Integer function : - userInfo.getFunktionenForMst(status.getErzeuger()) + userInfo.getFunktionenForMst(status.getMstId()) ) { - if (function.equals(currentStatus.getStatusStufe() + 1) - && currentStatus.getStatusWert() != 0) { + if (function.equals(kombiCurrent.getStatusStufe().getId() + 1) + && kombiCurrent.getStatusWert().getId() != 0) { next = true; } - else if (function == currentStatus.getStatusStufe()) { - if (currentStatus.getStatusStufe() == 1 - && !status.getErzeuger().equals(probeMstId)) { + else if (function == kombiCurrent.getStatusStufe().getId()) { + if (kombiCurrent.getStatusStufe().getId() == 1 + && !status.getMstId().equals(probeMstId)) { logger.debug( "Messstelle does not match for change"); return new Response(false, 699, null); } String pNetzbetreiber = defaultRepo.getByIdPlain( - LProbe.class, - messung.getProbeId(), + MessStelle.class, + probeMstId, "land").getNetzbetreiberId(); String sNetzbetreiber = defaultRepo.getByIdPlain( MessStelle.class, - status.getErzeuger(), + status.getMstId(), "stamm").getNetzbetreiberId(); - if (currentStatus.getStatusStufe() == 2 + if (kombiCurrent.getStatusStufe().getId() == 2 && !pNetzbetreiber.equals(sNetzbetreiber)){ logger.debug( "Netzbetreiber does not match for change"); @@ -328,26 +331,35 @@ } } + QueryBuilder<StatusKombi> builder = + new QueryBuilder<StatusKombi>(defaultRepo.entityManager("stamm"), StatusKombi.class); if (change && - status.getStatusWert() == 4 && - status.getStatusStufe() > 1 + kombiStatus.getStatusWert().getId() == 4 && + kombiStatus.getStatusStufe().getId() > 1 ) { - status.setStatusStufe(currentStatus.getStatusStufe()); + builder.and("StatusStufe", kombiCurrent.getStatusStufe()) + .and("statusWert", 4); + status.setStatusKombi(defaultRepo.filterPlain(builder.getQuery(),"stamm").get(0).getId()); + // status.setStatusStufe(currentStatus.getStatusStufe()); } - else if (change && status.getStatusWert() == 8) { + else if (change && kombiStatus.getStatusWert().getId() == 8) { return authorization.filter( request, resetStatus(status, currentStatus, messung), - LStatusProtokoll.class); + StatusProtokoll.class); } - else if (change && status.getStatusWert() != 0) { - status.setStatusStufe(currentStatus.getStatusStufe()); + else if (change && kombiStatus.getStatusWert().getId() != 0) { + builder.and("StatusStufe", kombiCurrent.getStatusStufe()) + .and("statusWert", kombiStatus.getStatusStufe()); + status.setStatusKombi(defaultRepo.filterPlain(builder.getQuery(),"stamm").get(0).getId()); } else if (next && - (status.getStatusWert() > 0 && - status.getStatusWert() <= 4 || - status.getStatusWert() == 7)) { - status.setStatusStufe(currentStatus.getStatusStufe() + 1); + (kombiStatus.getStatusWert().getId() > 0 && + kombiStatus.getStatusWert().getId() <= 4 || + kombiStatus.getStatusWert().getId() == 7)) { + builder.and("StatusStufe", kombiCurrent.getStatusStufe().getId() + 1) + .and("statusWert", kombiStatus.getStatusStufe()); + status.setStatusKombi(defaultRepo.filterPlain(builder.getQuery(),"stamm").get(0).getId()); } else { return new Response(false, 699, null); @@ -355,10 +367,10 @@ } // auto-set 'fertig'-flag - if (status.getStatusStufe() == 1) { + if (kombiStatus.getStatusStufe().getId() == 1) { messung.setFertig(true); } - else if (status.getStatusWert() == 4) { + else if (kombiStatus.getStatusWert().getId() == 4) { messung.setFertig(false); } } @@ -370,14 +382,14 @@ return response; } Response response = defaultRepo.create(status, "land"); - LStatusProtokoll created = (LStatusProtokoll)response.getData(); + StatusProtokoll created = (StatusProtokoll)response.getData(); messung.setStatus(created.getId()); defaultRepo.update(messung, "land"); /* Persist the new object*/ return authorization.filter( request, response, - LStatusProtokoll.class); + StatusProtokoll.class); } /** @@ -408,7 +420,7 @@ public Response update( @Context HttpHeaders headers, @Context HttpServletRequest request, - LStatusProtokoll status + StatusProtokoll status ) { return new Response(false, 699, null); } @@ -432,13 +444,13 @@ ) { /* Get the object by id*/ Response object = - defaultRepo.getById(LStatusProtokoll.class, Integer.valueOf(id), "land"); - LStatusProtokoll obj = (LStatusProtokoll)object.getData(); + defaultRepo.getById(StatusProtokoll.class, Integer.valueOf(id), "land"); + StatusProtokoll obj = (StatusProtokoll)object.getData(); if (!authorization.isAuthorized( request, obj, RequestMethod.DELETE, - LStatusProtokoll.class) + StatusProtokoll.class) ) { return new Response(false, 699, null); } @@ -450,53 +462,55 @@ } private Response resetStatus( - LStatusProtokoll status, - LStatusProtokoll currentStatus, - LMessung messung + StatusProtokoll status, + StatusProtokoll currentStatus, + Messung messung ) { // Create a new Status with value = 8. - LStatusProtokoll statusNew = new LStatusProtokoll(); + StatusProtokoll statusNew = new StatusProtokoll(); statusNew.setDatum(new Timestamp(new Date().getTime())); - statusNew.setErzeuger(status.getErzeuger()); + statusNew.setMstId(status.getMstId()); statusNew.setMessungsId(status.getMessungsId()); - statusNew.setStatusStufe(currentStatus.getStatusStufe()); - statusNew.setStatusWert(8); - statusNew.setText("Reset"); +// statusNew.setStatusKombi(currentStatus.getStatusStufe()); +// statusNew.setStatusWert(8); +// statusNew.setText("Reset"); defaultRepo.create(statusNew, "land"); Response retValue; - if (currentStatus.getStatusStufe() == 1) { - LStatusProtokoll nV = new LStatusProtokoll(); + StatusKombi kombi = defaultRepo.getByIdPlain( + StatusKombi.class, + currentStatus.getStatusKombi(), + "stamm"); + if (kombi.getStatusStufe().getId() == 1) { + StatusProtokoll nV = new StatusProtokoll(); nV.setDatum(new Timestamp(new Date().getTime())); - nV.setErzeuger(status.getErzeuger()); + nV.setMstId(status.getMstId()); nV.setMessungsId(status.getMessungsId()); - nV.setStatusStufe(1); - nV.setStatusWert(0); + nV.setStatusKombi(1); nV.setText(""); retValue = defaultRepo.create(nV, "land"); - messung.setStatus(((LStatusProtokoll)retValue.getData()).getId()); + messung.setStatus(((StatusProtokoll)retValue.getData()).getId()); } else { - QueryBuilder<LStatusProtokoll> lastFilter = - new QueryBuilder<LStatusProtokoll>( + QueryBuilder<StatusProtokoll> lastFilter = + new QueryBuilder<StatusProtokoll>( defaultRepo.entityManager("land"), - LStatusProtokoll.class); + StatusProtokoll.class); lastFilter.and("messungsId", status.getMessungsId()); - lastFilter.and("statusStufe", currentStatus.getStatusStufe() - 1); +// CHECK THIS! lastFilter.and("statusKombi", currentStatus.getStatusKombi() - 1); lastFilter.orderBy("datum", true); - List<LStatusProtokoll> proto = + List<StatusProtokoll> proto = defaultRepo.filterPlain(lastFilter.getQuery(), "land"); - LStatusProtokoll copy = new LStatusProtokoll(); - LStatusProtokoll orig = proto.get(proto.size() - 1); + StatusProtokoll copy = new StatusProtokoll(); + StatusProtokoll orig = proto.get(proto.size() - 1); copy.setDatum(new Timestamp(new Date().getTime())); - copy.setErzeuger(orig.getErzeuger()); + copy.setMstId(orig.getMstId()); copy.setMessungsId(orig.getMessungsId()); - copy.setStatusStufe(orig.getStatusStufe()); - copy.setStatusWert(orig.getStatusWert()); + copy.setStatusKombi(orig.getStatusKombi()); copy.setText(""); retValue = defaultRepo.create(copy, "land"); - LStatusProtokoll createdCopy = (LStatusProtokoll)retValue.getData(); + StatusProtokoll createdCopy = (StatusProtokoll)retValue.getData(); messung.setStatus(createdCopy.getId()); } defaultRepo.update(messung, "land");
--- a/src/main/java/de/intevation/lada/rest/ZusatzwertService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/ZusatzwertService.java Fri Jul 08 15:32:36 2016 +0200 @@ -7,9 +7,6 @@ */ package de.intevation.lada.rest; -import java.sql.Timestamp; -import java.util.Date; - import javax.enterprise.context.RequestScoped; import javax.inject.Inject; import javax.servlet.http.HttpServletRequest; @@ -29,7 +26,7 @@ import de.intevation.lada.lock.LockConfig; import de.intevation.lada.lock.LockType; import de.intevation.lada.lock.ObjectLocker; -import de.intevation.lada.model.land.LZusatzWert; +import de.intevation.lada.model.land.ZusatzWert; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization; @@ -121,18 +118,18 @@ ) { MultivaluedMap<String, String> params = info.getQueryParameters(); if (params.isEmpty() || !params.containsKey("probeId")) { - return defaultRepo.getAll(LZusatzWert.class, "land"); + return defaultRepo.getAll(ZusatzWert.class, "land"); } String probeId = params.getFirst("probeId"); - QueryBuilder<LZusatzWert> builder = - new QueryBuilder<LZusatzWert>( + QueryBuilder<ZusatzWert> builder = + new QueryBuilder<ZusatzWert>( defaultRepo.entityManager("land"), - LZusatzWert.class); + ZusatzWert.class); builder.and("probeId", probeId); return authorization.filter( request, defaultRepo.filter(builder.getQuery(), "land"), - LZusatzWert.class); + ZusatzWert.class); } /** @@ -154,8 +151,8 @@ ) { return authorization.filter( request, - defaultRepo.getById(LZusatzWert.class, Integer.valueOf(id), "land"), - LZusatzWert.class); + defaultRepo.getById(ZusatzWert.class, Integer.valueOf(id), "land"), + ZusatzWert.class); } /** @@ -187,13 +184,13 @@ public Response create( @Context HttpHeaders headers, @Context HttpServletRequest request, - LZusatzWert zusatzwert + ZusatzWert zusatzwert ) { if (!authorization.isAuthorized( request, zusatzwert, RequestMethod.POST, - LZusatzWert.class) + ZusatzWert.class) ) { return new Response(false, 699, null); } @@ -201,7 +198,7 @@ return authorization.filter( request, defaultRepo.create(zusatzwert, "land"), - LZusatzWert.class); + ZusatzWert.class); } /** @@ -233,13 +230,13 @@ public Response update( @Context HttpHeaders headers, @Context HttpServletRequest request, - LZusatzWert zusatzwert + ZusatzWert zusatzwert ) { if (!authorization.isAuthorized( request, zusatzwert, RequestMethod.PUT, - LZusatzWert.class) + ZusatzWert.class) ) { return new Response(false, 699, null); } @@ -251,12 +248,12 @@ return response; } Response updated = defaultRepo.getById( - LZusatzWert.class, - ((LZusatzWert)response.getData()).getId(), "land"); + ZusatzWert.class, + ((ZusatzWert)response.getData()).getId(), "land"); return authorization.filter( request, updated, - LZusatzWert.class); + ZusatzWert.class); } /** @@ -278,13 +275,13 @@ ) { /* Get the object by id*/ Response object = - defaultRepo.getById(LZusatzWert.class, Integer.valueOf(id), "land"); - LZusatzWert obj = (LZusatzWert)object.getData(); + defaultRepo.getById(ZusatzWert.class, Integer.valueOf(id), "land"); + ZusatzWert obj = (ZusatzWert)object.getData(); if (!authorization.isAuthorized( request, obj, RequestMethod.DELETE, - LZusatzWert.class) + ZusatzWert.class) ) { return new Response(false, 699, null); }
--- a/src/main/java/de/intevation/lada/rest/stamm/DatenbasisService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/DatenbasisService.java Fri Jul 08 15:32:36 2016 +0200 @@ -18,7 +18,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.Datenbasis; +import de.intevation.lada.model.stammdaten.Datenbasis; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType;
--- a/src/main/java/de/intevation/lada/rest/stamm/DatensatzErzeugerService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/DatensatzErzeugerService.java Fri Jul 08 15:32:36 2016 +0200 @@ -25,9 +25,8 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.DatensatzErzeuger; -import de.intevation.lada.model.stamm.Filter; -import de.intevation.lada.model.stamm.MessprogrammKategorie; +import de.intevation.lada.model.stammdaten.DatensatzErzeuger; +import de.intevation.lada.model.stammdaten.Filter; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization; @@ -203,7 +202,7 @@ repository.entityManager("stamm"), DatensatzErzeuger.class ); - builder.and("daErzeugerId", datensatzerzeuger.getDaErzeugerId()); + builder.and("datensatzErzeugerId", datensatzerzeuger.getDatensatzErzeugerId()); builder.and("netzbetreiberId", datensatzerzeuger.getNetzbetreiberId()); List<DatensatzErzeuger> erzeuger =
--- a/src/main/java/de/intevation/lada/rest/stamm/DeskriptorService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/DeskriptorService.java Fri Jul 08 15:32:36 2016 +0200 @@ -24,7 +24,7 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.Deskriptoren; +import de.intevation.lada.model.stammdaten.Deskriptoren; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository;
--- a/src/main/java/de/intevation/lada/rest/stamm/FavoriteService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/FavoriteService.java Fri Jul 08 15:32:36 2016 +0200 @@ -24,7 +24,7 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.Favorite; +import de.intevation.lada.model.stammdaten.Favorite; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization;
--- a/src/main/java/de/intevation/lada/rest/stamm/FilterService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/FilterService.java Fri Jul 08 15:32:36 2016 +0200 @@ -20,8 +20,8 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; -import de.intevation.lada.model.stamm.Filter; -import de.intevation.lada.model.stamm.FilterValue; +import de.intevation.lada.model.stammdaten.Filter; +import de.intevation.lada.model.stammdaten.FilterValue; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization;
--- a/src/main/java/de/intevation/lada/rest/stamm/KoordinatenartService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/KoordinatenartService.java Fri Jul 08 15:32:36 2016 +0200 @@ -18,7 +18,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.KoordinatenArt; +import de.intevation.lada.model.stammdaten.KoordinatenArt; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType;
--- a/src/main/java/de/intevation/lada/rest/stamm/MesseinheitService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/MesseinheitService.java Fri Jul 08 15:32:36 2016 +0200 @@ -18,7 +18,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.MessEinheit; +import de.intevation.lada.model.stammdaten.MessEinheit; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType;
--- a/src/main/java/de/intevation/lada/rest/stamm/MessgroesseService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/MessgroesseService.java Fri Jul 08 15:32:36 2016 +0200 @@ -7,7 +7,6 @@ */ package de.intevation.lada.rest.stamm; -import java.util.ArrayList; import java.util.List; import javax.enterprise.context.RequestScoped; @@ -25,8 +24,7 @@ import org.apache.log4j.Logger; -import de.intevation.lada.model.stamm.Messgroesse; -import de.intevation.lada.model.stamm.MmtMessgroesse; +import de.intevation.lada.model.stammdaten.Messgroesse; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository;
--- a/src/main/java/de/intevation/lada/rest/stamm/MessmethodeService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/MessmethodeService.java Fri Jul 08 15:32:36 2016 +0200 @@ -18,7 +18,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.MessMethode; +import de.intevation.lada.model.stammdaten.MessMethode; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType;
--- a/src/main/java/de/intevation/lada/rest/stamm/MessprogrammKategorieService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/MessprogrammKategorieService.java Fri Jul 08 15:32:36 2016 +0200 @@ -25,8 +25,8 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.Filter; -import de.intevation.lada.model.stamm.MessprogrammKategorie; +import de.intevation.lada.model.stammdaten.Filter; +import de.intevation.lada.model.stammdaten.MessprogrammKategorie; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization; @@ -201,7 +201,7 @@ repository.entityManager("stamm"), MessprogrammKategorie.class ); - builder.and("mplId", kategorie.getMplId()); + builder.and("code", kategorie.getCode()); builder.and("netzbetreiberId", kategorie.getNetzbetreiberId()); List<MessprogrammKategorie> kategorien =
--- a/src/main/java/de/intevation/lada/rest/stamm/MessstelleService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/MessstelleService.java Fri Jul 08 15:32:36 2016 +0200 @@ -19,7 +19,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.MessStelle; +import de.intevation.lada.model.stammdaten.MessStelle; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization;
--- a/src/main/java/de/intevation/lada/rest/stamm/NetzbetreiberService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/NetzbetreiberService.java Fri Jul 08 15:32:36 2016 +0200 @@ -21,13 +21,12 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.NetzBetreiber; +import de.intevation.lada.model.stammdaten.NetzBetreiber; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization; import de.intevation.lada.util.auth.AuthorizationType; import de.intevation.lada.util.auth.UserInfo; -import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType; import de.intevation.lada.util.rest.Response;
--- a/src/main/java/de/intevation/lada/rest/stamm/OrtService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/OrtService.java Fri Jul 08 15:32:36 2016 +0200 @@ -25,8 +25,8 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.Filter; -import de.intevation.lada.model.stamm.Ort; +import de.intevation.lada.model.stammdaten.Filter; +import de.intevation.lada.model.stammdaten.Ort; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization;
--- a/src/main/java/de/intevation/lada/rest/stamm/PflichtmessgroesseService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/PflichtmessgroesseService.java Fri Jul 08 15:32:36 2016 +0200 @@ -18,8 +18,9 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.PflichtMessgroesse; +import de.intevation.lada.model.stammdaten.PflichtMessgroesse; import de.intevation.lada.util.annotation.RepositoryConfig; +import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType; import de.intevation.lada.util.rest.Response; @@ -95,9 +96,12 @@ @Context HttpHeaders headers, @PathParam("id") String id ) { - return defaultRepo.getById( - PflichtMessgroesse.class, - Integer.valueOf(id), - "stamm"); + QueryBuilder<PflichtMessgroesse> builder = + new QueryBuilder<PflichtMessgroesse>( + defaultRepo.entityManager("stamm"), + PflichtMessgroesse.class + ); + builder.and("mmtId", id); + return defaultRepo.filter(builder.getQuery(), "stamm"); } }
--- a/src/main/java/de/intevation/lada/rest/stamm/ProbenartService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/ProbenartService.java Fri Jul 08 15:32:36 2016 +0200 @@ -18,7 +18,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.Probenart; +import de.intevation.lada.model.stammdaten.Probenart; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType;
--- a/src/main/java/de/intevation/lada/rest/stamm/ProbenehmerService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/ProbenehmerService.java Fri Jul 08 15:32:36 2016 +0200 @@ -25,9 +25,8 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.DatensatzErzeuger; -import de.intevation.lada.model.stamm.Filter; -import de.intevation.lada.model.stamm.Probenehmer; +import de.intevation.lada.model.stammdaten.Filter; +import de.intevation.lada.model.stammdaten.Probenehmer; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization;
--- a/src/main/java/de/intevation/lada/rest/stamm/ProbenzusatzService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/ProbenzusatzService.java Fri Jul 08 15:32:36 2016 +0200 @@ -18,7 +18,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.ProbenZusatz; +import de.intevation.lada.model.stammdaten.ProbenZusatz; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType;
--- a/src/main/java/de/intevation/lada/rest/stamm/QueryService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/QueryService.java Fri Jul 08 15:32:36 2016 +0200 @@ -17,10 +17,10 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.Context; -import de.intevation.lada.model.stamm.Favorite; -import de.intevation.lada.model.stamm.Filter; -import de.intevation.lada.model.stamm.FilterValue; -import de.intevation.lada.model.stamm.Query; +import de.intevation.lada.model.stammdaten.Favorite; +import de.intevation.lada.model.stammdaten.Filter; +import de.intevation.lada.model.stammdaten.FilterValue; +import de.intevation.lada.model.stammdaten.Query; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization; @@ -88,7 +88,7 @@ repository.entityManager("stamm"), Query.class ); - builder.and("type", "probe"); + builder.and("typeId", 0); List<Query> queries = repository.filterPlain(builder.getQuery(), "stamm"); markFavorites(queries, userInfo); @@ -113,7 +113,7 @@ repository.entityManager("stamm"), Query.class ); - builder.and("type", "messung"); + builder.and("typeId", 1); List<Query> queries = repository.filterPlain(builder.getQuery(), "stamm"); markFavorites(queries, userInfo); @@ -138,7 +138,7 @@ repository.entityManager("stamm"), Query.class ); - builder.and("type", "messprogramm"); + builder.and("typeId", 2); List<Query> queries = repository.filterPlain(builder.getQuery(), "stamm"); markFavorites(queries, userInfo); @@ -160,10 +160,10 @@ repository.entityManager("stamm"), Query.class ); - builder.or("type", "ort"); - builder.or("type", "probenehmer"); - builder.or("type", "datensatzerzeuger"); - builder.or("type", "messprogrammkategorie"); + builder.or("typeId", 3); + builder.or("typeId", 4); + builder.or("typeId", 5); + builder.or("typeId", 6); List<Query> queries = repository.filterPlain(builder.getQuery(), "stamm"); markFavorites(queries, userInfo);
--- a/src/main/java/de/intevation/lada/rest/stamm/StaatService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/StaatService.java Fri Jul 08 15:32:36 2016 +0200 @@ -18,7 +18,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.Staat; +import de.intevation.lada.model.stammdaten.Staat; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType;
--- a/src/main/java/de/intevation/lada/rest/stamm/StatusStufeService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/StatusStufeService.java Fri Jul 08 15:32:36 2016 +0200 @@ -18,7 +18,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.StatusStufe; +import de.intevation.lada.model.stammdaten.StatusStufe; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType;
--- a/src/main/java/de/intevation/lada/rest/stamm/StatusWertService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/StatusWertService.java Fri Jul 08 15:32:36 2016 +0200 @@ -25,12 +25,11 @@ import org.apache.log4j.Logger; -import de.intevation.lada.model.bund.StatusProtokoll; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.stamm.StatusErreichbar; -import de.intevation.lada.model.stamm.StatusKombi; -import de.intevation.lada.model.stamm.StatusReihenfolge; -import de.intevation.lada.model.stamm.StatusWert; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.StatusProtokoll; +import de.intevation.lada.model.stammdaten.StatusErreichbar; +import de.intevation.lada.model.stammdaten.StatusKombi; +import de.intevation.lada.model.stammdaten.StatusWert; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.auth.Authorization; @@ -132,8 +131,8 @@ private List<StatusWert> getReachable(int messungsId, UserInfo user) { List<StatusWert> list = new ArrayList<StatusWert>(); - LMessung messung = - defaultRepo.getByIdPlain(LMessung.class, messungsId, "land"); + Messung messung = + defaultRepo.getByIdPlain(Messung.class, messungsId, "land"); if (messung.getStatus() == null) { return defaultRepo.getAllPlain(StatusWert.class, "stamm"); } @@ -146,9 +145,10 @@ new QueryBuilder<StatusErreichbar>( defaultRepo.entityManager("stamm"), StatusErreichbar.class); + StatusKombi kombi = defaultRepo.getByIdPlain(StatusKombi.class, status.getStatusKombi(), "stamm"); errFilter.andIn("stufeId", user.getFunktionen()); - errFilter.and("curStufe", status.getStatusStufe()); - errFilter.and("curWert", status.getStatusWert()); + errFilter.and("curStufe", kombi.getStatusStufe().getId()); + errFilter.and("curWert", kombi.getStatusWert().getId()); List<StatusErreichbar> erreichbare = defaultRepo.filterPlain( errFilter.getQuery(), "stamm"); QueryBuilder<StatusWert> werteFilter =
--- a/src/main/java/de/intevation/lada/rest/stamm/UmweltService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/UmweltService.java Fri Jul 08 15:32:36 2016 +0200 @@ -18,7 +18,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.Umwelt; +import de.intevation.lada.model.stammdaten.Umwelt; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType;
--- a/src/main/java/de/intevation/lada/rest/stamm/VerwaltungseinheitService.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/VerwaltungseinheitService.java Fri Jul 08 15:32:36 2016 +0200 @@ -19,7 +19,7 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.model.stamm.Verwaltungseinheit; +import de.intevation.lada.model.stammdaten.Verwaltungseinheit; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository;
--- a/src/main/java/de/intevation/lada/util/auth/BaseAuthorizer.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/BaseAuthorizer.java Fri Jul 08 15:32:36 2016 +0200 @@ -12,9 +12,10 @@ import javax.inject.Inject; import javax.persistence.EntityManager; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.LStatusProtokoll; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.land.StatusProtokoll; +import de.intevation.lada.model.stammdaten.StatusKombi; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -36,7 +37,7 @@ * @param userInfo The user information. * @param probe The probe to authorize. */ - protected boolean getAuthorization(UserInfo userInfo, LProbe probe) { + protected boolean getAuthorization(UserInfo userInfo, Probe probe) { if (userInfo.getMessstellen().contains(probe.getMstId())) { return true; } @@ -53,21 +54,24 @@ */ public boolean isProbeReadOnly(Integer probeId) { EntityManager manager = repository.entityManager("land"); - QueryBuilder<LMessung> builder = - new QueryBuilder<LMessung>( + QueryBuilder<Messung> builder = + new QueryBuilder<Messung>( manager, - LMessung.class); + Messung.class); builder.and("probeId", probeId); Response response = repository.filter(builder.getQuery(), "land"); @SuppressWarnings("unchecked") - List<LMessung> messungen = (List<LMessung>) response.getData(); + List<Messung> messungen = (List<Messung>) response.getData(); for (int i = 0; i < messungen.size(); i++) { if (messungen.get(i).getStatus() == null) { continue; } - LStatusProtokoll status = repository.getByIdPlain( - LStatusProtokoll.class, messungen.get(i).getStatus(), "land"); - if (status.getStatusWert() != 0 && status.getStatusWert() != 4) { + StatusProtokoll status = repository.getByIdPlain( + StatusProtokoll.class, messungen.get(i).getStatus(), "land"); + StatusKombi kombi = repository.getByIdPlain( + StatusKombi.class, status.getStatusKombi(), "stamm"); + if (kombi.getStatusWert().getId() != 0 && + kombi.getStatusWert().getId() != 4) { return true; } } @@ -75,16 +79,19 @@ } public boolean isMessungReadOnly(Integer messungsId) { - LMessung messung = - repository.getByIdPlain(LMessung.class, messungsId, "land"); + Messung messung = + repository.getByIdPlain(Messung.class, messungsId, "land"); if (messung.getStatus() == null) { return false; } - LStatusProtokoll status = repository.getByIdPlain( - LStatusProtokoll.class, + StatusProtokoll status = repository.getByIdPlain( + StatusProtokoll.class, messung.getStatus(), "land"); - return (status.getStatusWert() != 0 && status.getStatusWert() != 4); + StatusKombi kombi = repository.getByIdPlain( + StatusKombi.class, status.getStatusKombi(), "stamm"); + return (kombi.getStatusWert().getId() != 0 && + kombi.getStatusWert().getId() != 4); } }
--- a/src/main/java/de/intevation/lada/util/auth/HeaderAuthorization.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/HeaderAuthorization.java Fri Jul 08 15:32:36 2016 +0200 @@ -19,20 +19,21 @@ import org.apache.log4j.Logger; -import de.intevation.lada.model.land.LKommentarM; -import de.intevation.lada.model.land.LKommentarP; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LMesswert; -import de.intevation.lada.model.land.LOrtszuordnung; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.LStatusProtokoll; -import de.intevation.lada.model.land.LZusatzWert; -import de.intevation.lada.model.stamm.Auth; -import de.intevation.lada.model.stamm.DatensatzErzeuger; -import de.intevation.lada.model.stamm.LadaUser; -import de.intevation.lada.model.stamm.MessprogrammKategorie; -import de.intevation.lada.model.stamm.Ort; -import de.intevation.lada.model.stamm.Probenehmer; +import de.intevation.lada.model.land.KommentarM; +import de.intevation.lada.model.land.KommentarP; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Messwert; +import de.intevation.lada.model.land.Ortszuordnung; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.land.StatusProtokoll; +import de.intevation.lada.model.land.ZusatzWert; +import de.intevation.lada.model.stammdaten.Auth; +import de.intevation.lada.model.stammdaten.DatensatzErzeuger; +import de.intevation.lada.model.stammdaten.LadaUser; +import de.intevation.lada.model.stammdaten.MessprogrammKategorie; +import de.intevation.lada.model.stammdaten.Ort; +import de.intevation.lada.model.stammdaten.Probenehmer; +import de.intevation.lada.model.stammdaten.StatusKombi; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; @@ -71,14 +72,14 @@ @PostConstruct public void init() { authorizers = new HashMap<Class, Authorizer>(); - authorizers.put(LProbe.class, probeAuthorizer); - authorizers.put(LMessung.class, messungAuthorizer); - authorizers.put(LOrtszuordnung.class, pIdAuthorizer); - authorizers.put(LKommentarP.class, pIdAuthorizer); - authorizers.put(LZusatzWert.class, pIdAuthorizer); - authorizers.put(LKommentarM.class, mIdAuthorizer); - authorizers.put(LMesswert.class, mIdAuthorizer); - authorizers.put(LStatusProtokoll.class, mIdAuthorizer); + authorizers.put(Probe.class, probeAuthorizer); + authorizers.put(Messung.class, messungAuthorizer); + authorizers.put(Ortszuordnung.class, pIdAuthorizer); + authorizers.put(KommentarP.class, pIdAuthorizer); + authorizers.put(ZusatzWert.class, pIdAuthorizer); + authorizers.put(KommentarM.class, mIdAuthorizer); + authorizers.put(Messwert.class, mIdAuthorizer); + authorizers.put(StatusProtokoll.class, mIdAuthorizer); authorizers.put(Probenehmer.class, netzAuthorizer); authorizers.put(DatensatzErzeuger.class, netzAuthorizer); authorizers.put(MessprogrammKategorie.class, netzAuthorizer); @@ -200,21 +201,24 @@ @Override public boolean isReadOnly(Integer probeId) { EntityManager manager = repository.entityManager("land"); - QueryBuilder<LMessung> builder = - new QueryBuilder<LMessung>( + QueryBuilder<Messung> builder = + new QueryBuilder<Messung>( manager, - LMessung.class); + Messung.class); builder.and("probeId", probeId); Response response = repository.filter(builder.getQuery(), "land"); @SuppressWarnings("unchecked") - List<LMessung> messungen = (List<LMessung>) response.getData(); + List<Messung> messungen = (List<Messung>) response.getData(); for (int i = 0; i < messungen.size(); i++) { if (messungen.get(i).getStatus() == null) { continue; } - LStatusProtokoll status = repository.getByIdPlain( - LStatusProtokoll.class, messungen.get(i).getStatus(), "land"); - if (status.getStatusWert() != 0 && status.getStatusWert() != 4) { + StatusProtokoll status = repository.getByIdPlain( + StatusProtokoll.class, messungen.get(i).getStatus(), "land"); + StatusKombi kombi = repository.getByIdPlain( + StatusKombi.class, status.getStatusKombi(), "stamm"); + if (kombi.getStatusWert().getId() != 0 && + kombi.getStatusWert().getId() != 4) { return true; } }
--- a/src/main/java/de/intevation/lada/util/auth/MessungAuthorizer.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/MessungAuthorizer.java Fri Jul 08 15:32:36 2016 +0200 @@ -10,10 +10,12 @@ import java.util.ArrayList; import java.util.List; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.LStatusProtokoll; -import de.intevation.lada.model.stamm.AuthLstUmw; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.land.StatusProtokoll; +import de.intevation.lada.model.stammdaten.AuthLstUmw; +import de.intevation.lada.model.stammdaten.MessStelle; +import de.intevation.lada.model.stammdaten.StatusKombi; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.rest.RequestMethod; import de.intevation.lada.util.rest.Response; @@ -27,10 +29,10 @@ UserInfo userInfo, Class<T> clazz ) { - LMessung messung = (LMessung)data; + Messung messung = (Messung)data; Response response = - repository.getById(LProbe.class, messung.getProbeId(), "land"); - LProbe probe = (LProbe)response.getData(); + repository.getById(Probe.class, messung.getProbeId(), "land"); + Probe probe = (Probe)response.getData(); if (method == RequestMethod.PUT || method == RequestMethod.DELETE) { return !this.isMessungReadOnly(messung.getId()) && @@ -39,11 +41,16 @@ if (method == RequestMethod.POST) { return getAuthorization(userInfo, probe); } - LStatusProtokoll status = repository.getByIdPlain( - LStatusProtokoll.class, + StatusProtokoll status = repository.getByIdPlain( + StatusProtokoll.class, messung.getStatus(), "land"); - return status.getStatusWert() > 0 || getAuthorization(userInfo, probe); + StatusKombi kombi = repository.getByIdPlain( + StatusKombi.class, + status.getStatusKombi(), + "stamm"); + return kombi.getStatusWert().getId() > 0 || + getAuthorization(userInfo, probe); } @SuppressWarnings("unchecked") @@ -54,14 +61,14 @@ Class<T> clazz ) { if (data.getData() instanceof List<?>) { - List<LMessung> messungen = new ArrayList<LMessung>(); - for (LMessung messung :(List<LMessung>)data.getData()) { + List<Messung> messungen = new ArrayList<Messung>(); + for (Messung messung :(List<Messung>)data.getData()) { messungen.add(setAuthData(userInfo, messung)); } data.setData(messungen); } - else if (data.getData() instanceof LMessung) { - LMessung messung = (LMessung)data.getData(); + else if (data.getData() instanceof Messung) { + Messung messung = (Messung)data.getData(); data.setData(setAuthData(userInfo, messung)); } return data; @@ -74,14 +81,15 @@ * @param messung The messung object. * @return The messung. */ - private LMessung setAuthData( + private Messung setAuthData( UserInfo userInfo, - LMessung messung + Messung messung ) { - LProbe probe = - (LProbe)repository.getById( - LProbe.class, messung.getProbeId(), "land").getData(); - if (!userInfo.getNetzbetreiber().contains(probe.getNetzbetreiberId()) && + Probe probe = + (Probe)repository.getById( + Probe.class, messung.getProbeId(), "land").getData(); + MessStelle mst = repository.getByIdPlain(MessStelle.class, probe.getMstId(), "stamm"); + if (!userInfo.getNetzbetreiber().contains(mst.getNetzbetreiberId()) && !userInfo.getFunktionen().contains(3)) { messung.setOwner(false); messung.setReadonly(true); @@ -101,12 +109,14 @@ messung.setStatusEdit(false); } else { - LStatusProtokoll status = repository.getByIdPlain( - LStatusProtokoll.class, + StatusProtokoll status = repository.getByIdPlain( + StatusProtokoll.class, messung.getStatus(), "land"); - int stufe = status.getStatusStufe(); - int wert = status.getStatusWert(); + StatusKombi kombi = repository.getByIdPlain( + StatusKombi.class, status.getStatusKombi(), "stamm"); + int stufe = kombi.getStatusStufe().getId(); + int wert = kombi.getStatusWert().getId(); messung.setReadonly(wert != 0 && wert != 4); @@ -118,7 +128,7 @@ QueryBuilder<AuthLstUmw> lstFilter = new QueryBuilder<AuthLstUmw>( repository.entityManager("stamm"), AuthLstUmw.class); - lstFilter.or("lstId", userInfo.getMessstellen()); + lstFilter.or("mstId", userInfo.getMessstellen()); List<AuthLstUmw> lsts = repository.filterPlain(lstFilter.getQuery(), "stamm"); for (int i = 0; i < lsts.size(); i++) { @@ -132,7 +142,7 @@ // Has the user the right to edit status for the 'Netzbetreiber'? if (userInfo.getFunktionenForNetzbetreiber( - probe.getNetzbetreiberId()).contains(2) + mst.getNetzbetreiberId()).contains(2) && (stufe == 1 || stufe == 2) && wert >= 1 ) {
--- a/src/main/java/de/intevation/lada/util/auth/MessungIdAuthorizer.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/MessungIdAuthorizer.java Fri Jul 08 15:32:36 2016 +0200 @@ -12,9 +12,11 @@ import java.util.ArrayList; import java.util.List; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.LStatusProtokoll; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.land.StatusProtokoll; +import de.intevation.lada.model.stammdaten.MessStelle; +import de.intevation.lada.model.stammdaten.StatusKombi; import de.intevation.lada.util.rest.RequestMethod; import de.intevation.lada.util.rest.Response; @@ -42,22 +44,26 @@ ) { return false; } - LMessung messung = repository.getByIdPlain(LMessung.class, id, "land"); - LProbe probe = repository.getByIdPlain( - LProbe.class, + Messung messung = repository.getByIdPlain(Messung.class, id, "land"); + Probe probe = repository.getByIdPlain( + Probe.class, messung.getProbeId(), "land"); if (messung.getStatus() == null) { return false; } - LStatusProtokoll status = repository.getByIdPlain( - LStatusProtokoll.class, + StatusProtokoll status = repository.getByIdPlain( + StatusProtokoll.class, messung.getStatus(), "land"); + StatusKombi kombi = repository.getByIdPlain( + StatusKombi.class, + status.getStatusKombi(), + "stamm"); return (method == RequestMethod.POST || method == RequestMethod.PUT || method == RequestMethod.DELETE || - status.getStatusWert() != 0) && + kombi.getStatusWert().getId() != 0) && getAuthorization(userInfo, probe); } @@ -98,19 +104,20 @@ try { Method getMessungsId = clazz.getMethod("getMessungsId"); Integer id = (Integer)getMessungsId.invoke(data); - LMessung messung = repository.getByIdPlain( - LMessung.class, + Messung messung = repository.getByIdPlain( + Messung.class, id, "land"); - LProbe probe = repository.getByIdPlain( - LProbe.class, + Probe probe = repository.getByIdPlain( + Probe.class, messung.getProbeId(), "land"); boolean readOnly = true; boolean owner = false; + MessStelle mst = repository.getByIdPlain(MessStelle.class, probe.getMstId(), "stamm"); if (!userInfo.getNetzbetreiber().contains( - probe.getNetzbetreiberId())) { + mst.getNetzbetreiberId())) { owner = false; readOnly = true; }
--- a/src/main/java/de/intevation/lada/util/auth/ProbeAuthorizer.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/ProbeAuthorizer.java Fri Jul 08 15:32:36 2016 +0200 @@ -10,7 +10,8 @@ import java.util.ArrayList; import java.util.List; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.stammdaten.MessStelle; import de.intevation.lada.util.rest.RequestMethod; import de.intevation.lada.util.rest.Response; @@ -23,7 +24,7 @@ UserInfo userInfo, Class<T> clazz ) { - LProbe probe = (LProbe)data; + Probe probe = (Probe)data; if (method == RequestMethod.PUT || method == RequestMethod.DELETE) { return !isProbeReadOnly(probe.getId()); @@ -39,14 +40,14 @@ Class<T> clazz ) { if (data.getData() instanceof List<?>) { - List<LProbe> proben = new ArrayList<LProbe>(); - for (LProbe probe :(List<LProbe>)data.getData()) { + List<Probe> proben = new ArrayList<Probe>(); + for (Probe probe :(List<Probe>)data.getData()) { proben.add(setAuthData(userInfo, probe)); } data.setData(proben); } - else if (data.getData() instanceof LProbe) { - LProbe probe = (LProbe)data.getData(); + else if (data.getData() instanceof Probe) { + Probe probe = (Probe)data.getData(); data.setData(setAuthData(userInfo, probe)); } return data; @@ -59,8 +60,9 @@ * @param probe The probe object. * @return The probe. */ - private LProbe setAuthData(UserInfo userInfo, LProbe probe) { - if (!userInfo.getNetzbetreiber().contains(probe.getNetzbetreiberId())) { + private Probe setAuthData(UserInfo userInfo, Probe probe) { + MessStelle mst = repository.getByIdPlain(MessStelle.class, probe.getMstId(), "stamm"); + if (!userInfo.getNetzbetreiber().contains(mst.getNetzbetreiberId())) { probe.setOwner(false); probe.setReadonly(true); return probe;
--- a/src/main/java/de/intevation/lada/util/auth/ProbeIdAuthorizer.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/ProbeIdAuthorizer.java Fri Jul 08 15:32:36 2016 +0200 @@ -12,7 +12,8 @@ import java.util.ArrayList; import java.util.List; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.stammdaten.MessStelle; import de.intevation.lada.util.rest.RequestMethod; import de.intevation.lada.util.rest.Response; @@ -40,8 +41,8 @@ ) { return false; } - LProbe probe = - repository.getByIdPlain(LProbe.class, id, "land"); + Probe probe = + repository.getByIdPlain(Probe.class, id, "land"); return !isProbeReadOnly(id) && getAuthorization(userInfo, probe); } @@ -87,13 +88,14 @@ else { return null; } - LProbe probe = - (LProbe)repository.getById(LProbe.class, id, "land").getData(); + Probe probe = + (Probe)repository.getById(Probe.class, id, "land").getData(); boolean readOnly = true; boolean owner = false; + MessStelle mst = repository.getByIdPlain(MessStelle.class, probe.getMstId(), "stamm"); if (!userInfo.getNetzbetreiber().contains( - probe.getNetzbetreiberId())) { + mst.getNetzbetreiberId())) { owner = false; readOnly = true; }
--- a/src/main/java/de/intevation/lada/util/auth/TestAuthorization.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/TestAuthorization.java Fri Jul 08 15:32:36 2016 +0200 @@ -10,7 +10,7 @@ import java.util.ArrayList; import java.util.List; -import de.intevation.lada.model.stamm.Auth; +import de.intevation.lada.model.stammdaten.Auth; import de.intevation.lada.util.annotation.AuthorizationConfig; import de.intevation.lada.util.rest.RequestMethod; import de.intevation.lada.util.rest.Response;
--- a/src/main/java/de/intevation/lada/util/auth/UserInfo.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/UserInfo.java Fri Jul 08 15:32:36 2016 +0200 @@ -10,11 +10,7 @@ import java.util.ArrayList; import java.util.List; -import javax.inject.Inject; - -import org.apache.log4j.Logger; - -import de.intevation.lada.model.stamm.Auth; +import de.intevation.lada.model.stammdaten.Auth; /** * Container for user specific information. @@ -22,12 +18,8 @@ * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> */ public class UserInfo { - private Logger logger = Logger.getLogger(UserInfo.class); - private String name; private Integer userId; - private List<String> messstellen; - private List<String> netzbetreiber; private List<Integer> funktionen; private List<Auth> auth; @@ -64,11 +56,6 @@ } } - public UserInfo() { - messstellen = new ArrayList<String>(); - netzbetreiber = new ArrayList<String>(); - } - /** * @return the name */
--- a/src/main/java/de/intevation/lada/validation/MessungValidator.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/MessungValidator.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,7 +11,7 @@ import javax.enterprise.inject.Instance; import javax.inject.Inject; -import de.intevation.lada.model.land.LMessung; +import de.intevation.lada.model.land.Messung; import de.intevation.lada.validation.annotation.ValidationConfig; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -35,7 +35,7 @@ @Override public Violation validate(Object object) { Violation violations = new Violation(); - if (!(object instanceof LMessung)) { + if (!(object instanceof Messung)) { violations.addError("messung", 602); return violations; }
--- a/src/main/java/de/intevation/lada/validation/MesswertValidator.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/MesswertValidator.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,7 +11,7 @@ import javax.enterprise.inject.Instance; import javax.inject.Inject; -import de.intevation.lada.model.land.LMesswert; +import de.intevation.lada.model.land.Messwert; import de.intevation.lada.validation.annotation.ValidationConfig; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -35,7 +35,7 @@ @Override public Violation validate(Object object) { Violation violations = new Violation(); - if (!(object instanceof LMesswert)) { + if (!(object instanceof Messwert)) { violations.addError("messwert", 602); return violations; }
--- a/src/main/java/de/intevation/lada/validation/OrtValidator.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/OrtValidator.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,7 +11,7 @@ import javax.enterprise.inject.Instance; import javax.inject.Inject; -import de.intevation.lada.model.land.LOrtszuordnung; +import de.intevation.lada.model.land.Ortszuordnung; import de.intevation.lada.validation.annotation.ValidationConfig; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -35,7 +35,7 @@ @Override public Violation validate(Object object) { Violation violations = new Violation(); - if (!(object instanceof LOrtszuordnung)) { + if (!(object instanceof Ortszuordnung)) { violations.addError("ort", 602); return violations; }
--- a/src/main/java/de/intevation/lada/validation/ProbeValidator.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/ProbeValidator.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,7 +11,7 @@ import javax.enterprise.inject.Instance; import javax.inject.Inject; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.validation.annotation.ValidationConfig; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -35,7 +35,7 @@ @Override public Violation validate(Object object) { Violation violations = new Violation(); - if (!(object instanceof LProbe)) { + if (!(object instanceof Probe)) { violations.addError("probe", 602); return violations; }
--- a/src/main/java/de/intevation/lada/validation/StatusValidator.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/StatusValidator.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,7 +11,7 @@ import javax.enterprise.inject.Instance; import javax.inject.Inject; -import de.intevation.lada.model.land.LStatusProtokoll; +import de.intevation.lada.model.land.StatusProtokoll; import de.intevation.lada.validation.annotation.ValidationConfig; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -35,7 +35,7 @@ @Override public Violation validate(Object object) { Violation violations = new Violation(); - if (!(object instanceof LStatusProtokoll)) { + if (!(object instanceof StatusProtokoll)) { violations.addError("status", 602); return violations; }
--- a/src/main/java/de/intevation/lada/validation/rules/messprogramm/HasAllMandatory.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messprogramm/HasAllMandatory.java Fri Jul 08 15:32:36 2016 +0200 @@ -24,10 +24,6 @@ Messprogramm messprogramm = (Messprogramm)object; Violation violation = new Violation(); - if (messprogramm.getNetzbetreiberId() == null - | "".equals(messprogramm.getNetzbetreiberId())) { - violation.addError("netzbetreiberId", 631); - } if (messprogramm.getMstId() == null | "".equals(messprogramm.getMstId())) { violation.addError("mstlabor", 631);
--- a/src/main/java/de/intevation/lada/validation/rules/messung/Date.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messung/Date.java Fri Jul 08 15:32:36 2016 +0200 @@ -12,8 +12,8 @@ import javax.inject.Inject; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.Repository; import de.intevation.lada.util.data.RepositoryType; @@ -38,10 +38,10 @@ @Override public Violation execute(Object object) { - LMessung messung = (LMessung)object; + Messung messung = (Messung)object; Integer probeId = messung.getProbeId(); - Response response = repository.getById(LProbe.class, probeId, "land"); - LProbe probe = (LProbe) response.getData(); + Response response = repository.getById(Probe.class, probeId, "land"); + Probe probe = (Probe) response.getData(); if (probe == null) { Map<String, Integer> errors = new HashMap<String, Integer>(); errors.put("lprobe", 604);
--- a/src/main/java/de/intevation/lada/validation/rules/messung/HasMesswert.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messung/HasMesswert.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,8 +11,8 @@ import javax.inject.Inject; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LMesswert; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Messwert; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -37,14 +37,14 @@ @Override public Violation execute(Object object) { - LMessung messung = (LMessung)object; - QueryBuilder<LMesswert> builder = - new QueryBuilder<LMesswert>( - repo.entityManager("land"), LMesswert.class); + Messung messung = (Messung)object; + QueryBuilder<Messwert> builder = + new QueryBuilder<Messwert>( + repo.entityManager("land"), Messwert.class); builder.and("messungsId", messung.getId()); Response response = repo.filter(builder.getQuery(), "land"); @SuppressWarnings("unchecked") - List<LMesswert> messwerte = (List<LMesswert>)response.getData(); + List<Messwert> messwerte = (List<Messwert>)response.getData(); if (messwerte == null || messwerte.isEmpty()) { Violation violation = new Violation(); violation.addWarning("messwert", 631);
--- a/src/main/java/de/intevation/lada/validation/rules/messung/HasNebenprobenNr.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messung/HasNebenprobenNr.java Fri Jul 08 15:32:36 2016 +0200 @@ -7,7 +7,7 @@ */ package de.intevation.lada.validation.rules.messung; -import de.intevation.lada.model.land.LMessung; +import de.intevation.lada.model.land.Messung; import de.intevation.lada.validation.Violation; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -23,7 +23,7 @@ @Override public Violation execute(Object object) { - LMessung messung = (LMessung)object; + Messung messung = (Messung)object; if (messung.getNebenprobenNr() == null || messung.getNebenprobenNr().equals("")) { Violation violation = new Violation();
--- a/src/main/java/de/intevation/lada/validation/rules/messung/HasPflichtmessgroessen.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messung/HasPflichtmessgroessen.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,9 +11,9 @@ import javax.inject.Inject; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LMesswert; -import de.intevation.lada.model.stamm.PflichtMessgroesse; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Messwert; +import de.intevation.lada.model.stammdaten.PflichtMessgroesse; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -38,29 +38,29 @@ @Override public Violation execute(Object object) { - LMessung messung = (LMessung)object; + Messung messung = (Messung)object; QueryBuilder<PflichtMessgroesse> builder = new QueryBuilder<PflichtMessgroesse>( repository.entityManager("stamm"), PflichtMessgroesse.class); - builder.and("mmtId", messung.getMmtId()); + builder.and("messMethodeId", messung.getMmtId()); Response response = repository.filter(builder.getQuery(), "stamm"); @SuppressWarnings("unchecked") List<PflichtMessgroesse> pflicht = (List<PflichtMessgroesse>)response.getData(); - QueryBuilder<LMesswert> wertBuilder = - new QueryBuilder<LMesswert>( - repository.entityManager("land"), LMesswert.class); + QueryBuilder<Messwert> wertBuilder = + new QueryBuilder<Messwert>( + repository.entityManager("land"), Messwert.class); wertBuilder.and("messungsId", messung.getId()); Response wertResponse = repository.filter(wertBuilder.getQuery(), "land"); @SuppressWarnings("unchecked") - List<LMesswert> messwerte = (List<LMesswert>)wertResponse.getData(); + List<Messwert> messwerte = (List<Messwert>)wertResponse.getData(); Violation violation = new Violation(); boolean missing = false; for (PflichtMessgroesse p : pflicht) { - for (LMesswert wert : messwerte) { + for (Messwert wert : messwerte) { if (!p.getMessgroesseId().equals(wert.getMessgroesseId())) { missing = true; }
--- a/src/main/java/de/intevation/lada/validation/rules/messung/MessgroesseToMessmethode.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messung/MessgroesseToMessmethode.java Fri Jul 08 15:32:36 2016 +0200 @@ -14,9 +14,9 @@ import org.apache.log4j.Logger; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LMesswert; -import de.intevation.lada.model.stamm.MmtMessgroesse; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Messwert; +import de.intevation.lada.model.stammdaten.MmtMessgroesse; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -44,15 +44,15 @@ @Override public Violation execute(Object object) { - LMessung messung = (LMessung)object; + Messung messung = (Messung)object; String mmt = messung.getMmtId(); - QueryBuilder<LMesswert> builder = - new QueryBuilder<LMesswert>( - repository.entityManager("land"), LMesswert.class); + QueryBuilder<Messwert> builder = + new QueryBuilder<Messwert>( + repository.entityManager("land"), Messwert.class); builder.and("messungsId", messung.getId()); Response response = repository.filter(builder.getQuery(), "land"); @SuppressWarnings("unchecked") - List<LMesswert> messwerte = (List<LMesswert>)response.getData(); + List<Messwert> messwerte = (List<Messwert>)response.getData(); QueryBuilder<MmtMessgroesse> mmtBuilder = new QueryBuilder<MmtMessgroesse>( @@ -65,20 +65,18 @@ (List<MmtMessgroesse>)results.getData(); List<MmtMessgroesse> found = new ArrayList<MmtMessgroesse>(); for (MmtMessgroesse mg: messgroessen) { - if (mg.getMmtMessgroessePK() != null && - mg.getMmtMessgroessePK().getMmtId().equals(mmt)) { + if (mg.getMmtId().equals(mmt)) { found.add(mg); } } Violation violation = new Violation(); - for(LMesswert messwert: messwerte) { + for(Messwert messwert: messwerte) { boolean hit = false; for (MmtMessgroesse messgroesse: found) { logger.trace("###### mmt: " + messwert.getMessgroesseId() - + " mmtmg: " + messgroesse.getMmtMessgroessePK() - .getMessgroessengruppeId()); + + " mmtmg: " + messgroesse.getMmtId()); if (messwert.getMessgroesseId().equals( - messgroesse.getMmtMessgroessePK().getMessgroessengruppeId())) { + messgroesse.getMmtId())) { hit = true; } }
--- a/src/main/java/de/intevation/lada/validation/rules/messung/UniqueNebenprobenNr.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messung/UniqueNebenprobenNr.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,7 +11,7 @@ import javax.inject.Inject; -import de.intevation.lada.model.land.LMessung; +import de.intevation.lada.model.land.Messung; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -37,15 +37,15 @@ @SuppressWarnings("unchecked") @Override public Violation execute(Object object) { - LMessung messung= (LMessung)object; - QueryBuilder<LMessung> builder = new QueryBuilder<LMessung>( + Messung messung= (Messung)object; + QueryBuilder<Messung> builder = new QueryBuilder<Messung>( repo.entityManager("land"), - LMessung.class); + Messung.class); builder.and("nebenprobenNr", messung.getNebenprobenNr()); builder.and("probeId", messung.getProbeId()); Response response = repo.filter(builder.getQuery(), "land"); - if (!((List<LMessung>)response.getData()).isEmpty()) { - LMessung found = ((List<LMessung>)response.getData()).get(0); + if (!((List<Messung>)response.getData()).isEmpty()) { + Messung found = ((List<Messung>)response.getData()).get(0); // The messung found in the db equals the new messung. (Update) if (messung.getId() != null && messung.getId().equals(found.getId())) {
--- a/src/main/java/de/intevation/lada/validation/rules/messwert/HasMessunsicherheit.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messwert/HasMessunsicherheit.java Fri Jul 08 15:32:36 2016 +0200 @@ -7,7 +7,7 @@ */ package de.intevation.lada.validation.rules.messwert; -import de.intevation.lada.model.land.LMesswert; +import de.intevation.lada.model.land.Messwert; import de.intevation.lada.validation.Violation; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -23,7 +23,7 @@ @Override public Violation execute(Object object) { - LMesswert messwert = (LMesswert)object; + Messwert messwert = (Messwert)object; Float unsicherheit = messwert.getMessfehler(); Double nachweisgrenze = messwert.getNwgZuMesswert(); Double wert = messwert.getMesswert();
--- a/src/main/java/de/intevation/lada/validation/rules/ort/CoordinatesInVE.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/ort/CoordinatesInVE.java Fri Jul 08 15:32:36 2016 +0200 @@ -16,10 +16,10 @@ import com.vividsolutions.jts.geom.Point; import com.vividsolutions.jts.geom.PrecisionModel; -import de.intevation.lada.model.land.LOrtszuordnung; -import de.intevation.lada.model.stamm.DeVg; -import de.intevation.lada.model.stamm.Ort; -import de.intevation.lada.model.stamm.Verwaltungseinheit; +import de.intevation.lada.model.land.Ortszuordnung; +import de.intevation.lada.model.stammdaten.DeVg; +import de.intevation.lada.model.stammdaten.Ort; +import de.intevation.lada.model.stammdaten.Verwaltungseinheit; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -45,7 +45,7 @@ @SuppressWarnings("unchecked") @Override public Violation execute(Object object) { - LOrtszuordnung ort = (LOrtszuordnung)object; + Ortszuordnung ort = (Ortszuordnung)object; if (!"E".equals(ort.getOrtszuordnungTyp())) { return null; }
--- a/src/main/java/de/intevation/lada/validation/rules/probe/Deskriptor.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/Deskriptor.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,8 +11,8 @@ import javax.inject.Inject; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.stamm.Deskriptoren; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.stammdaten.Deskriptoren; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -37,7 +37,7 @@ @Override public Violation execute(Object object) { - LProbe probe = (LProbe)object; + Probe probe = (Probe)object; if (probe.getMediaDesk() == null || probe.getMediaDesk().equals("")) { return null; }
--- a/src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java Fri Jul 08 15:32:36 2016 +0200 @@ -12,9 +12,9 @@ import javax.inject.Inject; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.stamm.DeskriptorUmwelt; -import de.intevation.lada.model.stamm.Deskriptoren; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.stammdaten.DeskriptorUmwelt; +import de.intevation.lada.model.stammdaten.Deskriptoren; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -39,7 +39,7 @@ @Override public Violation execute(Object object) { - LProbe probe = (LProbe)object; + Probe probe = (Probe)object; if (probe.getMediaDesk() == null || probe.getMediaDesk().equals("")) { return null; }
--- a/src/main/java/de/intevation/lada/validation/rules/probe/HasEntnahmeOrt.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/HasEntnahmeOrt.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,8 +11,8 @@ import javax.inject.Inject; -import de.intevation.lada.model.land.LOrtszuordnung; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Ortszuordnung; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -37,21 +37,21 @@ @Override public Violation execute(Object object) { - LProbe probe = (LProbe)object; + Probe probe = (Probe)object; Integer id = probe.getId(); if (id == null) { Violation violation = new Violation(); violation.addWarning("entnahmeOrt", 631); return violation; } - QueryBuilder<LOrtszuordnung> builder = - new QueryBuilder<LOrtszuordnung>( - repo.entityManager("land"), LOrtszuordnung.class); + QueryBuilder<Ortszuordnung> builder = + new QueryBuilder<Ortszuordnung>( + repo.entityManager("land"), Ortszuordnung.class); builder.and("probeId", id); Response response = repo.filter(builder.getQuery(), "land"); @SuppressWarnings("unchecked") - List<LOrtszuordnung> orte = (List<LOrtszuordnung>)response.getData(); - for (LOrtszuordnung ort: orte) { + List<Ortszuordnung> orte = (List<Ortszuordnung>)response.getData(); + for (Ortszuordnung ort: orte) { if ("E".equals(ort.getOrtszuordnungTyp())) { return null; }
--- a/src/main/java/de/intevation/lada/validation/rules/probe/HasHauptprobenNr.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/HasHauptprobenNr.java Fri Jul 08 15:32:36 2016 +0200 @@ -7,7 +7,7 @@ */ package de.intevation.lada.validation.rules.probe; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.validation.Violation; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -23,7 +23,7 @@ @Override public Violation execute(Object object) { - LProbe probe = (LProbe)object; + Probe probe = (Probe)object; if (probe.getHauptprobenNr() == null || probe.getHauptprobenNr().equals("")) { Violation violation = new Violation();
--- a/src/main/java/de/intevation/lada/validation/rules/probe/HasProbeart.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/HasProbeart.java Fri Jul 08 15:32:36 2016 +0200 @@ -7,7 +7,7 @@ */ package de.intevation.lada.validation.rules.probe; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.validation.Violation; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -23,7 +23,7 @@ @Override public Violation execute(Object object) { - LProbe probe = (LProbe)object; + Probe probe = (Probe)object; if (probe.getProbenartId() == null || probe.getProbenartId().equals("")) { Violation violation = new Violation();
--- a/src/main/java/de/intevation/lada/validation/rules/probe/HasProbenahmeBegin.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/HasProbenahmeBegin.java Fri Jul 08 15:32:36 2016 +0200 @@ -9,7 +9,7 @@ import java.sql.Timestamp; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.validation.Violation; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -25,7 +25,7 @@ @Override public Violation execute(Object object) { - LProbe probe = (LProbe)object; + Probe probe = (Probe)object; Timestamp begin = probe.getProbeentnahmeBeginn(); if (begin == null) { Violation violation = new Violation();
--- a/src/main/java/de/intevation/lada/validation/rules/probe/HasTestdatensatz.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/HasTestdatensatz.java Fri Jul 08 15:32:36 2016 +0200 @@ -7,7 +7,7 @@ */ package de.intevation.lada.validation.rules.probe; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.validation.Violation; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -23,7 +23,7 @@ @Override public Violation execute(Object object) { - LProbe probe = (LProbe)object; + Probe probe = (Probe)object; if (probe.getTest() == null || probe.getTest().equals("")) { Violation violation = new Violation();
--- a/src/main/java/de/intevation/lada/validation/rules/probe/HasUmwelt.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/HasUmwelt.java Fri Jul 08 15:32:36 2016 +0200 @@ -7,7 +7,7 @@ */ package de.intevation.lada.validation.rules.probe; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.validation.Violation; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -23,7 +23,7 @@ @Override public Violation execute(Object object) { - LProbe probe = (LProbe)object; + Probe probe = (Probe)object; if (probe.getUmwId() == null || probe.getUmwId().equals("")) { Violation violation = new Violation();
--- a/src/main/java/de/intevation/lada/validation/rules/probe/TimeProbeentnahmeBegin.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/TimeProbeentnahmeBegin.java Fri Jul 08 15:32:36 2016 +0200 @@ -10,7 +10,7 @@ import java.sql.Timestamp; import java.util.Date; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.validation.Violation; import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; @@ -27,7 +27,7 @@ @Override public Violation execute(Object object) { - LProbe probe = (LProbe)object; + Probe probe = (Probe)object; Timestamp begin = probe.getProbeentnahmeBeginn(); Timestamp end = probe.getProbeentnahmeEnde(); if (begin == null && end == null) {
--- a/src/main/java/de/intevation/lada/validation/rules/probe/UniqueHauptprobenNr.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/UniqueHauptprobenNr.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,7 +11,7 @@ import javax.inject.Inject; -import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.Probe; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -37,14 +37,14 @@ @SuppressWarnings("unchecked") @Override public Violation execute(Object object) { - LProbe probe = (LProbe)object; - QueryBuilder<LProbe> builder = new QueryBuilder<LProbe>( + Probe probe = (Probe)object; + QueryBuilder<Probe> builder = new QueryBuilder<Probe>( repo.entityManager("land"), - LProbe.class); + Probe.class); builder.and("hauptprobenNr", probe.getHauptprobenNr()); Response response = repo.filter(builder.getQuery(), "land"); - if (!((List<LProbe>)response.getData()).isEmpty()) { - LProbe found = ((List<LProbe>)response.getData()).get(0); + if (!((List<Probe>)response.getData()).isEmpty()) { + Probe found = ((List<Probe>)response.getData()).get(0); // The probe found in the db equals the new probe. (Update) if (probe.getId() != null && probe.getId().equals(found.getId())) { return null;
--- a/src/main/java/de/intevation/lada/validation/rules/status/StatusFolge.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/status/StatusFolge.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,9 +11,9 @@ import javax.inject.Inject; -import de.intevation.lada.model.land.LStatusProtokoll; -import de.intevation.lada.model.stamm.StatusKombi; -import de.intevation.lada.model.stamm.StatusReihenfolge; +import de.intevation.lada.model.land.StatusProtokoll; +import de.intevation.lada.model.stammdaten.StatusKombi; +import de.intevation.lada.model.stammdaten.StatusReihenfolge; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -36,7 +36,8 @@ @Override public Violation execute(Object object) { - LStatusProtokoll status = (LStatusProtokoll)object; + /* + StatusProtokoll status = (StatusProtokoll)object; QueryBuilder<StatusKombi> kombi = new QueryBuilder<StatusKombi>( repository.entityManager("stamm"), StatusKombi.class); @@ -88,6 +89,10 @@ return violation; } - return null; + return null;*/ + + Violation violation = new Violation(); + violation.addError("status", 000); + return violation; } }
--- a/src/main/java/de/intevation/lada/validation/rules/status/StatusKombination.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/status/StatusKombination.java Fri Jul 08 15:32:36 2016 +0200 @@ -11,8 +11,8 @@ import javax.inject.Inject; -import de.intevation.lada.model.land.LStatusProtokoll; -import de.intevation.lada.model.stamm.StatusKombi; +import de.intevation.lada.model.land.StatusProtokoll; +import de.intevation.lada.model.stammdaten.StatusKombi; import de.intevation.lada.util.annotation.RepositoryConfig; import de.intevation.lada.util.data.QueryBuilder; import de.intevation.lada.util.data.Repository; @@ -35,7 +35,8 @@ @Override public Violation execute(Object object) { - LStatusProtokoll status = (LStatusProtokoll)object; + /* + StatusProtokoll status = (StatusProtokoll)object; QueryBuilder<StatusKombi> kombi = new QueryBuilder<StatusKombi>( repository.entityManager("stamm"), StatusKombi.class); @@ -49,5 +50,9 @@ return violation; } return null; + */ + Violation violation = new Violation(); + violation.addError("status", 000); + return violation; } }
--- a/src/main/resources/META-INF/persistence.xml Mon Jul 04 14:31:18 2016 +0200 +++ b/src/main/resources/META-INF/persistence.xml Fri Jul 08 15:32:36 2016 +0200 @@ -2,23 +2,12 @@ <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> - <!-- PU for bund datasource. Maps to the schema 'bund' in the Lada database. --> - <persistence-unit name="bund"> - <!-- The JTA datasource configured in the Wildfly AS --> - <jta-data-source>java:jboss/lada-bund</jta-data-source> - <properties> - <!-- The JNDI name for lookups in the application --> - <property name="jboss.entity.manager.jndi.name" value="java:app/entitymanager/bund"/> - <!-- Properties for Hibernate --> - <property name="hibernate.hbm2ddl.auto" value="none"/> - <property name="hibernate.show_sql" value="false" /> - <!-- Use a special PostGIS dialect implmented for Lada. This dialect implements an additional integer array type --> - <property name="hibernate.dialect" value="de.intevation.lada.util.data.LadaPostgisDialect"/> - </properties> - </persistence-unit> <persistence-unit name="land"> <!-- The JTA datasource configured in the Wildfly AS --> <jta-data-source>java:jboss/lada-land</jta-data-source> + <class>de.intevation.lada.model.stammdaten.FilterType</class> + <class>de.intevation.lada.model.stammdaten.QueryType</class> + <class>de.intevation.lada.model.land.KommentarP</class> <exclude-unlisted-classes>false</exclude-unlisted-classes> <properties> <!-- The JNDI name for lookups in the application -->
--- a/src/test/java/de/intevation/lada/LandTest.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/test/java/de/intevation/lada/LandTest.java Fri Jul 08 15:32:36 2016 +0200 @@ -30,13 +30,13 @@ import org.junit.Ignore; import org.junit.runner.RunWith; -import de.intevation.lada.model.land.LKommentarM; -import de.intevation.lada.model.land.LKommentarP; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.model.land.LMesswert; -import de.intevation.lada.model.land.LOrtszuordnung; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.model.land.LZusatzWert; +import de.intevation.lada.model.land.KommentarM; +import de.intevation.lada.model.land.KommentarP; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.model.land.Messwert; +import de.intevation.lada.model.land.Ortszuordnung; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.model.land.ZusatzWert; import de.intevation.lada.model.land.Messprogramm; import de.intevation.lada.test.land.KommentarMTest; import de.intevation.lada.test.land.KommentarPTest; @@ -224,7 +224,7 @@ protocol.setType("insert probe"); protocol.addInfo("database", "Insert Probe into database"); testProtocol.add(protocol); - LProbe probe = em.find(LProbe.class, 1000); + Probe probe = em.find(Probe.class, 1000); Assert.assertNotNull(probe); protocol.setPassed(true); } @@ -243,7 +243,7 @@ protocol.setType("insert kommentar_p"); protocol.addInfo("database", "Insert KommentarP into database"); testProtocol.add(protocol); - LKommentarP kommentar = em.find(LKommentarP.class, 1000); + KommentarP kommentar = em.find(KommentarP.class, 1000); Assert.assertNotNull(kommentar); protocol.setPassed(true); } @@ -262,7 +262,7 @@ protocol.setType("insert ortszuordnung"); protocol.addInfo("database", "Insert Ortszuordnung into database"); testProtocol.add(protocol); - LOrtszuordnung ortszuordnung = em.find(LOrtszuordnung.class, 1000); + Ortszuordnung ortszuordnung = em.find(Ortszuordnung.class, 1000); Assert.assertNotNull(ortszuordnung); protocol.setPassed(true); } @@ -281,7 +281,7 @@ protocol.setType("insert zusatzwert"); protocol.addInfo("database", "Insert Zusatzwert into database"); testProtocol.add(protocol); - LZusatzWert zusatzwert = em.find(LZusatzWert.class, 1000); + ZusatzWert zusatzwert = em.find(ZusatzWert.class, 1000); Assert.assertNotNull(zusatzwert); protocol.setPassed(true); } @@ -300,7 +300,7 @@ protocol.setType("insert messung"); protocol.addInfo("database", "Insert Messung into database"); testProtocol.add(protocol); - LMessung messung = em.find(LMessung.class, 1200); + Messung messung = em.find(Messung.class, 1200); messung.setStatus(1000); em.merge(messung); Assert.assertNotNull(messung); @@ -321,7 +321,7 @@ protocol.setType("insert kommentar_m"); protocol.addInfo("database", "Insert KommentarM into database"); testProtocol.add(protocol); - LKommentarM kommentar = em.find(LKommentarM.class, 1000); + KommentarM kommentar = em.find(KommentarM.class, 1000); Assert.assertNotNull(kommentar); protocol.setPassed(true); } @@ -340,7 +340,7 @@ protocol.setType("insert messwert"); protocol.addInfo("database", "Insert Messwert into database"); testProtocol.add(protocol); - LMesswert messwert = em.find(LMesswert.class, 10000); + Messwert messwert = em.find(Messwert.class, 10000); Assert.assertNotNull(messwert); protocol.setPassed(true); }
--- a/src/test/java/de/intevation/lada/StammdatenTest.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/test/java/de/intevation/lada/StammdatenTest.java Fri Jul 08 15:32:36 2016 +0200 @@ -30,10 +30,10 @@ import org.junit.runner.RunWith; import org.junit.runners.MethodSorters; -import de.intevation.lada.model.stamm.DatensatzErzeuger; -import de.intevation.lada.model.stamm.MessprogrammKategorie; -import de.intevation.lada.model.stamm.Ort; -import de.intevation.lada.model.stamm.Probenehmer; +import de.intevation.lada.model.stammdaten.DatensatzErzeuger; +import de.intevation.lada.model.stammdaten.MessprogrammKategorie; +import de.intevation.lada.model.stammdaten.Ort; +import de.intevation.lada.model.stammdaten.Probenehmer; import de.intevation.lada.test.stamm.DatensatzErzeugerTest; import de.intevation.lada.test.stamm.MessprogrammKategorieTest; import de.intevation.lada.test.stamm.OrtTest;
--- a/src/test/java/de/intevation/lada/ValidatorTest.java Mon Jul 04 14:31:18 2016 +0200 +++ b/src/test/java/de/intevation/lada/ValidatorTest.java Fri Jul 08 15:32:36 2016 +0200 @@ -23,13 +23,13 @@ import org.junit.After; import org.junit.AfterClass; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; -import org.junit.Ignore; import org.junit.runner.RunWith; -import de.intevation.lada.test.validator.Messung; -import de.intevation.lada.test.validator.Probe; -import de.intevation.lada.test.validator.Status; +import de.intevation.lada.test.validator.MessungTest; +import de.intevation.lada.test.validator.ProbeTest; +import de.intevation.lada.test.validator.StatusTest; import de.intevation.lada.validation.Validator; import de.intevation.lada.validation.annotation.ValidationConfig; @@ -47,23 +47,23 @@ @Inject @ValidationConfig(type="Probe") private Validator probeValidator; - private Probe probeTest; + private ProbeTest probeTest; @Inject @ValidationConfig(type="Messung") private Validator messungValidator; - private Messung messungTest; + private MessungTest messungTest; @Inject @ValidationConfig(type="Status") private Validator statusValidator; - private Status statusTest; + private StatusTest statusTest; public ValidatorTest() { - probeTest = new Probe(); - messungTest = new Messung(); - statusTest = new Status(); + probeTest = new ProbeTest(); + messungTest = new MessungTest(); + statusTest = new StatusTest(); testProtocol = new ArrayList<Protocol>(); }
--- a/src/test/java/de/intevation/lada/test/validator/Messung.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.test.validator; - -import java.util.List; - -import org.junit.Assert; - -import de.intevation.lada.Protocol; -import de.intevation.lada.model.land.LMessung; -import de.intevation.lada.validation.Validator; -import de.intevation.lada.validation.Violation; - -public class Messung { - - private Validator validator; - - public void setValidator(Validator validator) { - this.validator = validator; - } - - public final void hasNebenprobenNr(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("MessungValidator"); - prot.setType("has nebenprobenNr"); - prot.setPassed(false); - protocol.add(prot); - LMessung messung = new LMessung(); - messung.setNebenprobenNr("10R1"); - messung.setProbeId(4); - Violation violation = validator.validate(messung); - if (violation.hasWarnings()) { - Assert.assertFalse(violation.getWarnings().containsKey("nebenprobenNr")); - } - prot.setPassed(true); - } - - public final void hasNoNebenprobenNr(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("MessungValidator"); - prot.setType("has no nebenprobenNr"); - prot.setPassed(false); - protocol.add(prot); - LMessung messung = new LMessung(); - messung.setProbeId(4); - Violation violation = validator.validate(messung); - Assert.assertTrue(violation.hasWarnings()); - Assert.assertTrue(violation.getWarnings().containsKey("nebenprobenNr")); - Assert.assertTrue(violation.getWarnings().get("nebenprobenNr").contains(631)); - prot.setPassed(true); - } - - public final void hasEmptyNebenprobenNr(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("MessungValidator"); - prot.setType("has empty nebenprobenNr"); - prot.setPassed(false); - protocol.add(prot); - LMessung messung = new LMessung(); - messung.setNebenprobenNr(""); - messung.setProbeId(4); - Violation violation = validator.validate(messung); - Assert.assertTrue(violation.hasWarnings()); - Assert.assertTrue(violation.getWarnings().containsKey("nebenprobenNr")); - Assert.assertTrue(violation.getWarnings().get("nebenprobenNr").contains(631)); - prot.setPassed(true); - } - - public final void existingNebenprobenNrNew(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("MessungValidator"); - prot.setType("existing nebenprobenNr (new)"); - prot.setPassed(false); - protocol.add(prot); - LMessung messung = new LMessung(); - messung.setNebenprobenNr("00G1"); - messung.setProbeId(4); - Violation violation = validator.validate(messung); - Assert.assertTrue(violation.hasErrors()); - Assert.assertTrue(violation.getErrors().containsKey("nebenprobenNr")); - Assert.assertTrue(violation.getErrors().get("nebenprobenNr").contains(611)); - prot.setPassed(true); - } - - public final void uniqueNebenprobenNrNew(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("MessungValidator"); - prot.setType("unique nebenprobenNr (new)"); - prot.setPassed(false); - protocol.add(prot); - LMessung messung = new LMessung(); - messung.setNebenprobenNr("00G2"); - messung.setProbeId(4); - Violation violation = validator.validate(messung); - if (violation.hasErrors()) { - Assert.assertFalse(violation.getErrors().containsKey("nebenprobenNr")); - } - prot.setPassed(true); - } - - public final void uniqueNebenprobenNrUpdate(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("MessungValidator"); - prot.setType("unique nebenprobenNr (update)"); - prot.setPassed(false); - protocol.add(prot); - LMessung messung = new LMessung(); - messung.setId(45); - messung.setProbeId(4); - messung.setNebenprobenNr("00G2"); - Violation violation = validator.validate(messung); - if (violation.hasErrors()) { - Assert.assertFalse(violation.getErrors().containsKey("hauptprobenNr")); - return; - } - prot.setPassed(true); - } - - public final void existingHauptprobenNrUpdate(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("MessungValidator"); - prot.setType("existing nebenprobenNr (update)"); - prot.setPassed(false); - protocol.add(prot); - LMessung messung = new LMessung(); - messung.setId(776); - messung.setProbeId(1); - messung.setNebenprobenNr("0003"); - Violation violation = validator.validate(messung); - Assert.assertTrue(violation.hasErrors()); - Assert.assertTrue(violation.getErrors().containsKey("nebenprobenNr")); - Assert.assertTrue(violation.getErrors().get("nebenprobenNr").contains(611)); - prot.setPassed(true); - } - - public final void hasMesswert(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("MessungValidator"); - prot.setType("has messwert"); - prot.setPassed(false); - protocol.add(prot); - LMessung messung = new LMessung(); - messung.setId(1); - messung.setProbeId(4); - Violation violation = validator.validate(messung); - if (violation.hasWarnings()) { - Assert.assertFalse(violation.getWarnings().containsKey("messwert")); - } - prot.setPassed(true); - } - - public final void hasNoMesswert(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("MessungValidator"); - prot.setType("has no messwert"); - prot.setPassed(false); - protocol.add(prot); - LMessung messung = new LMessung(); - messung.setId(990); - messung.setProbeId(4); - Violation violation = validator.validate(messung); - Assert.assertTrue(violation.hasWarnings()); - Assert.assertTrue(violation.getWarnings().containsKey("messwert")); - Assert.assertTrue(violation.getWarnings().get("messwert").contains(631)); - prot.setPassed(true); - } -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/de/intevation/lada/test/validator/MessungTest.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,172 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ +package de.intevation.lada.test.validator; + +import java.util.List; + +import org.junit.Assert; + +import de.intevation.lada.Protocol; +import de.intevation.lada.model.land.Messung; +import de.intevation.lada.validation.Validator; +import de.intevation.lada.validation.Violation; + +public class MessungTest { + + private Validator validator; + + public void setValidator(Validator validator) { + this.validator = validator; + } + + public final void hasNebenprobenNr(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("MessungValidator"); + prot.setType("has nebenprobenNr"); + prot.setPassed(false); + protocol.add(prot); + Messung messung = new Messung(); + messung.setNebenprobenNr("10R1"); + messung.setProbeId(4); + Violation violation = validator.validate(messung); + if (violation.hasWarnings()) { + Assert.assertFalse(violation.getWarnings().containsKey("nebenprobenNr")); + } + prot.setPassed(true); + } + + public final void hasNoNebenprobenNr(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("MessungValidator"); + prot.setType("has no nebenprobenNr"); + prot.setPassed(false); + protocol.add(prot); + Messung messung = new Messung(); + messung.setProbeId(4); + Violation violation = validator.validate(messung); + Assert.assertTrue(violation.hasWarnings()); + Assert.assertTrue(violation.getWarnings().containsKey("nebenprobenNr")); + Assert.assertTrue(violation.getWarnings().get("nebenprobenNr").contains(631)); + prot.setPassed(true); + } + + public final void hasEmptyNebenprobenNr(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("MessungValidator"); + prot.setType("has empty nebenprobenNr"); + prot.setPassed(false); + protocol.add(prot); + Messung messung = new Messung(); + messung.setNebenprobenNr(""); + messung.setProbeId(4); + Violation violation = validator.validate(messung); + Assert.assertTrue(violation.hasWarnings()); + Assert.assertTrue(violation.getWarnings().containsKey("nebenprobenNr")); + Assert.assertTrue(violation.getWarnings().get("nebenprobenNr").contains(631)); + prot.setPassed(true); + } + + public final void existingNebenprobenNrNew(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("MessungValidator"); + prot.setType("existing nebenprobenNr (new)"); + prot.setPassed(false); + protocol.add(prot); + Messung messung = new Messung(); + messung.setNebenprobenNr("00G1"); + messung.setProbeId(4); + Violation violation = validator.validate(messung); + Assert.assertTrue(violation.hasErrors()); + Assert.assertTrue(violation.getErrors().containsKey("nebenprobenNr")); + Assert.assertTrue(violation.getErrors().get("nebenprobenNr").contains(611)); + prot.setPassed(true); + } + + public final void uniqueNebenprobenNrNew(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("MessungValidator"); + prot.setType("unique nebenprobenNr (new)"); + prot.setPassed(false); + protocol.add(prot); + Messung messung = new Messung(); + messung.setNebenprobenNr("00G2"); + messung.setProbeId(4); + Violation violation = validator.validate(messung); + if (violation.hasErrors()) { + Assert.assertFalse(violation.getErrors().containsKey("nebenprobenNr")); + } + prot.setPassed(true); + } + + public final void uniqueNebenprobenNrUpdate(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("MessungValidator"); + prot.setType("unique nebenprobenNr (update)"); + prot.setPassed(false); + protocol.add(prot); + Messung messung = new Messung(); + messung.setId(45); + messung.setProbeId(4); + messung.setNebenprobenNr("00G2"); + Violation violation = validator.validate(messung); + if (violation.hasErrors()) { + Assert.assertFalse(violation.getErrors().containsKey("hauptprobenNr")); + return; + } + prot.setPassed(true); + } + + public final void existingHauptprobenNrUpdate(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("MessungValidator"); + prot.setType("existing nebenprobenNr (update)"); + prot.setPassed(false); + protocol.add(prot); + Messung messung = new Messung(); + messung.setId(776); + messung.setProbeId(1); + messung.setNebenprobenNr("0003"); + Violation violation = validator.validate(messung); + Assert.assertTrue(violation.hasErrors()); + Assert.assertTrue(violation.getErrors().containsKey("nebenprobenNr")); + Assert.assertTrue(violation.getErrors().get("nebenprobenNr").contains(611)); + prot.setPassed(true); + } + + public final void hasMesswert(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("MessungValidator"); + prot.setType("has messwert"); + prot.setPassed(false); + protocol.add(prot); + Messung messung = new Messung(); + messung.setId(1); + messung.setProbeId(4); + Violation violation = validator.validate(messung); + if (violation.hasWarnings()) { + Assert.assertFalse(violation.getWarnings().containsKey("messwert")); + } + prot.setPassed(true); + } + + public final void hasNoMesswert(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("MessungValidator"); + prot.setType("has no messwert"); + prot.setPassed(false); + protocol.add(prot); + Messung messung = new Messung(); + messung.setId(990); + messung.setProbeId(4); + Violation violation = validator.validate(messung); + Assert.assertTrue(violation.hasWarnings()); + Assert.assertTrue(violation.getWarnings().containsKey("messwert")); + Assert.assertTrue(violation.getWarnings().get("messwert").contains(631)); + prot.setPassed(true); + } +}
--- a/src/test/java/de/intevation/lada/test/validator/Probe.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,282 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.test.validator; - -import java.sql.Timestamp; -import java.util.List; - -import org.junit.Assert; - -import de.intevation.lada.Protocol; -import de.intevation.lada.model.land.LProbe; -import de.intevation.lada.validation.Validator; -import de.intevation.lada.validation.Violation; - -public class Probe { - - private Validator validator; - - public void setValidator(Validator validator) { - this.validator = validator; - } - - public final void hasHauptprobenNr(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("has hauptprobenNr"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setHauptprobenNr("4554567890"); - Violation violation = validator.validate(probe); - if (violation.hasErrors()) { - Assert.assertFalse(violation.getErrors().containsKey("hauptprobenNr")); - } - prot.setPassed(true); - } - - public final void hasNoHauptprobenNr(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("has no hauptprobenNr"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - Violation violation = validator.validate(probe); - Assert.assertTrue(violation.hasErrors()); - Assert.assertTrue(violation.getErrors().containsKey("hauptprobenNr")); - Assert.assertTrue(violation.getErrors().get("hauptprobenNr").contains(631)); - prot.setPassed(true); - } - - public final void existingHauptprobenNrNew(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("existing hauptprobenNr (new)"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setHauptprobenNr("120510002"); - prot.addInfo("hauptprobenNr", "120510002"); - Violation violation = validator.validate(probe); - Assert.assertTrue(violation.hasErrors()); - Assert.assertTrue(violation.getErrors().containsKey("hauptprobenNr")); - Assert.assertTrue(violation.getErrors().get("hauptprobenNr").contains(611)); - prot.setPassed(true); - } - - public final void uniqueHauptprobenNrNew(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("unique hauptprobenNr (new)"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setHauptprobenNr("4564567890"); - prot.addInfo("hauptprobenNr", "4564567890"); - Violation violation = validator.validate(probe); - if (violation.hasErrors()) { - Assert.assertFalse(violation.getErrors().containsKey("hauptprobenNr")); - } - prot.setPassed(true); - } - - public final void uniqueHauptprobenNrUpdate(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("unique hauptprobenNr (update)"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setId(1); - probe.setHauptprobenNr("4564567890"); - prot.addInfo("hauptprobenNr", "4564567890"); - Violation violation = validator.validate(probe); - if (violation.hasErrors()) { - Assert.assertFalse(violation.getErrors().containsKey("hauptprobenNr")); - } - prot.setPassed(true); - } - - public final void existingHauptprobenNrUpdate(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("existing hauptprobenNr (update)"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setId(1); - probe.setHauptprobenNr("120224003"); - prot.addInfo("hauptprobenNr", "120224003"); - Violation violation = validator.validate(probe); - Assert.assertTrue(violation.hasErrors()); - Assert.assertTrue(violation.getErrors().containsKey("hauptprobenNr")); - Assert.assertTrue(violation.getErrors().get("hauptprobenNr").contains(611)); - prot.setPassed(true); - } - - public final void hasEntnahmeOrt(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("has entnahmeOrt"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setId(1); - Violation violation = validator.validate(probe); - if (violation.hasWarnings()) { - Assert.assertFalse(violation.getWarnings().containsKey("entnahmeOrt")); - } - prot.setPassed(true); - } - - public final void hasNoEntnahmeOrt(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("has no entnahmeOrt"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setId(710); - Violation violation = validator.validate(probe); - Assert.assertTrue(violation.hasWarnings()); - Assert.assertTrue(violation.getWarnings().containsKey("entnahmeOrt")); - Assert.assertTrue(violation.getWarnings().get("entnahmeOrt").contains(631)); - prot.setPassed(true); - } - - public final void hasProbeentnahmeBegin(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("has probeentnahmeBegin"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setProbeentnahmeBeginn(new Timestamp(1376287046510l)); - probe.setProbeentnahmeEnde(new Timestamp(1376287046511l)); - Violation violation = validator.validate(probe); - if (violation.hasWarnings()) { - Assert.assertFalse(violation.getWarnings().containsKey("probeentnahmeBeginn")); - } - prot.setPassed(true); - } - - public final void hasNoProbeentnahmeBegin(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("has no probeentnahmeBegin"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - Violation violation = validator.validate(probe); - Assert.assertTrue(violation.hasWarnings()); - Assert.assertTrue(violation.getWarnings().containsKey("probeentnahmeBeginn")); - Assert.assertTrue(violation.getWarnings().get("probeentnahmeBeginn").contains(631)); - prot.setPassed(true); - } - - public final void timeNoEndProbeentnahmeBegin(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("time no end probeentnahmeBegin"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setProbeentnahmeBeginn(new Timestamp(1376287046510l)); - Violation violation = validator.validate(probe); - if (violation.hasWarnings()) { - Assert.assertFalse(violation.getWarnings().containsKey("probeentnahmeBeginn")); - } - prot.setPassed(true); - } - - public final void timeNoBeginProbeentnahmeBegin(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("time no begin probeentnahmeBegin"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setProbeentnahmeEnde(new Timestamp(1376287046510l)); - Violation violation = validator.validate(probe); - Assert.assertTrue(violation.getWarnings().get("probeentnahmeBeginn").contains(631)); - Assert.assertTrue(violation.getWarnings().get("probeentnahmeBeginn").contains(662)); - prot.setPassed(true); - } - - public final void timeBeginAfterEndProbeentnahmeBegin(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("time begin after end probeentnahmeBegin"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setProbeentnahmeBeginn(new Timestamp(1376287046511l)); - probe.setProbeentnahmeEnde(new Timestamp(1376287046510l)); - Violation violation = validator.validate(probe); - Assert.assertTrue(violation.getWarnings().get("probeentnahmeBeginn").contains(662)); - prot.setPassed(true); - } - - public final void timeBeginFutureProbeentnahmeBegin(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("time begin in future probeentnahmeBegin"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setProbeentnahmeBeginn(new Timestamp(2376287046511l)); - Violation violation = validator.validate(probe); - Assert.assertTrue(violation.getWarnings().get("probeentnahmeBeginn").contains(661)); - prot.setPassed(true); - } - - public final void hasUmwelt(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("has Umwelt"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setUmwId("A4"); - Violation violation = validator.validate(probe); - if (violation.hasWarnings()) { - Assert.assertFalse(violation.getWarnings().containsKey("umwId")); - } - prot.setPassed(true); - } - - public final void hasNoUmwelt(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("has no Umwelt"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - Violation violation = validator.validate(probe); - Assert.assertTrue(violation.hasWarnings()); - Assert.assertTrue(violation.getWarnings().containsKey("umwId")); - Assert.assertTrue(violation.getWarnings().get("umwId").contains(631)); - prot.setPassed(true); - } - - public final void hasEmptyUmwelt(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("ProbeValidator"); - prot.setType("has empty Umwelt"); - prot.setPassed(false); - protocol.add(prot); - LProbe probe = new LProbe(); - probe.setUmwId(""); - Violation violation = validator.validate(probe); - Assert.assertTrue(violation.hasWarnings()); - Assert.assertTrue(violation.getWarnings().containsKey("umwId")); - Assert.assertTrue(violation.getWarnings().get("umwId").contains(631)); - prot.setPassed(true); - } -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/de/intevation/lada/test/validator/ProbeTest.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,282 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ +package de.intevation.lada.test.validator; + +import java.sql.Timestamp; +import java.util.List; + +import org.junit.Assert; + +import de.intevation.lada.Protocol; +import de.intevation.lada.model.land.Probe; +import de.intevation.lada.validation.Validator; +import de.intevation.lada.validation.Violation; + +public class ProbeTest { + + private Validator validator; + + public void setValidator(Validator validator) { + this.validator = validator; + } + + public final void hasHauptprobenNr(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("has hauptprobenNr"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setHauptprobenNr("4554567890"); + Violation violation = validator.validate(probe); + if (violation.hasErrors()) { + Assert.assertFalse(violation.getErrors().containsKey("hauptprobenNr")); + } + prot.setPassed(true); + } + + public final void hasNoHauptprobenNr(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("has no hauptprobenNr"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + Violation violation = validator.validate(probe); + Assert.assertTrue(violation.hasErrors()); + Assert.assertTrue(violation.getErrors().containsKey("hauptprobenNr")); + Assert.assertTrue(violation.getErrors().get("hauptprobenNr").contains(631)); + prot.setPassed(true); + } + + public final void existingHauptprobenNrNew(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("existing hauptprobenNr (new)"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setHauptprobenNr("120510002"); + prot.addInfo("hauptprobenNr", "120510002"); + Violation violation = validator.validate(probe); + Assert.assertTrue(violation.hasErrors()); + Assert.assertTrue(violation.getErrors().containsKey("hauptprobenNr")); + Assert.assertTrue(violation.getErrors().get("hauptprobenNr").contains(611)); + prot.setPassed(true); + } + + public final void uniqueHauptprobenNrNew(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("unique hauptprobenNr (new)"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setHauptprobenNr("4564567890"); + prot.addInfo("hauptprobenNr", "4564567890"); + Violation violation = validator.validate(probe); + if (violation.hasErrors()) { + Assert.assertFalse(violation.getErrors().containsKey("hauptprobenNr")); + } + prot.setPassed(true); + } + + public final void uniqueHauptprobenNrUpdate(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("unique hauptprobenNr (update)"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setId(1); + probe.setHauptprobenNr("4564567890"); + prot.addInfo("hauptprobenNr", "4564567890"); + Violation violation = validator.validate(probe); + if (violation.hasErrors()) { + Assert.assertFalse(violation.getErrors().containsKey("hauptprobenNr")); + } + prot.setPassed(true); + } + + public final void existingHauptprobenNrUpdate(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("existing hauptprobenNr (update)"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setId(1); + probe.setHauptprobenNr("120224003"); + prot.addInfo("hauptprobenNr", "120224003"); + Violation violation = validator.validate(probe); + Assert.assertTrue(violation.hasErrors()); + Assert.assertTrue(violation.getErrors().containsKey("hauptprobenNr")); + Assert.assertTrue(violation.getErrors().get("hauptprobenNr").contains(611)); + prot.setPassed(true); + } + + public final void hasEntnahmeOrt(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("has entnahmeOrt"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setId(1); + Violation violation = validator.validate(probe); + if (violation.hasWarnings()) { + Assert.assertFalse(violation.getWarnings().containsKey("entnahmeOrt")); + } + prot.setPassed(true); + } + + public final void hasNoEntnahmeOrt(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("has no entnahmeOrt"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setId(710); + Violation violation = validator.validate(probe); + Assert.assertTrue(violation.hasWarnings()); + Assert.assertTrue(violation.getWarnings().containsKey("entnahmeOrt")); + Assert.assertTrue(violation.getWarnings().get("entnahmeOrt").contains(631)); + prot.setPassed(true); + } + + public final void hasProbeentnahmeBegin(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("has probeentnahmeBegin"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setProbeentnahmeBeginn(new Timestamp(1376287046510l)); + probe.setProbeentnahmeEnde(new Timestamp(1376287046511l)); + Violation violation = validator.validate(probe); + if (violation.hasWarnings()) { + Assert.assertFalse(violation.getWarnings().containsKey("probeentnahmeBeginn")); + } + prot.setPassed(true); + } + + public final void hasNoProbeentnahmeBegin(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("has no probeentnahmeBegin"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + Violation violation = validator.validate(probe); + Assert.assertTrue(violation.hasWarnings()); + Assert.assertTrue(violation.getWarnings().containsKey("probeentnahmeBeginn")); + Assert.assertTrue(violation.getWarnings().get("probeentnahmeBeginn").contains(631)); + prot.setPassed(true); + } + + public final void timeNoEndProbeentnahmeBegin(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("time no end probeentnahmeBegin"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setProbeentnahmeBeginn(new Timestamp(1376287046510l)); + Violation violation = validator.validate(probe); + if (violation.hasWarnings()) { + Assert.assertFalse(violation.getWarnings().containsKey("probeentnahmeBeginn")); + } + prot.setPassed(true); + } + + public final void timeNoBeginProbeentnahmeBegin(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("time no begin probeentnahmeBegin"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setProbeentnahmeEnde(new Timestamp(1376287046510l)); + Violation violation = validator.validate(probe); + Assert.assertTrue(violation.getWarnings().get("probeentnahmeBeginn").contains(631)); + Assert.assertTrue(violation.getWarnings().get("probeentnahmeBeginn").contains(662)); + prot.setPassed(true); + } + + public final void timeBeginAfterEndProbeentnahmeBegin(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("time begin after end probeentnahmeBegin"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setProbeentnahmeBeginn(new Timestamp(1376287046511l)); + probe.setProbeentnahmeEnde(new Timestamp(1376287046510l)); + Violation violation = validator.validate(probe); + Assert.assertTrue(violation.getWarnings().get("probeentnahmeBeginn").contains(662)); + prot.setPassed(true); + } + + public final void timeBeginFutureProbeentnahmeBegin(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("time begin in future probeentnahmeBegin"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setProbeentnahmeBeginn(new Timestamp(2376287046511l)); + Violation violation = validator.validate(probe); + Assert.assertTrue(violation.getWarnings().get("probeentnahmeBeginn").contains(661)); + prot.setPassed(true); + } + + public final void hasUmwelt(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("has Umwelt"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setUmwId("A4"); + Violation violation = validator.validate(probe); + if (violation.hasWarnings()) { + Assert.assertFalse(violation.getWarnings().containsKey("umwId")); + } + prot.setPassed(true); + } + + public final void hasNoUmwelt(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("has no Umwelt"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + Violation violation = validator.validate(probe); + Assert.assertTrue(violation.hasWarnings()); + Assert.assertTrue(violation.getWarnings().containsKey("umwId")); + Assert.assertTrue(violation.getWarnings().get("umwId").contains(631)); + prot.setPassed(true); + } + + public final void hasEmptyUmwelt(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("ProbeValidator"); + prot.setType("has empty Umwelt"); + prot.setPassed(false); + protocol.add(prot); + Probe probe = new Probe(); + probe.setUmwId(""); + Violation violation = validator.validate(probe); + Assert.assertTrue(violation.hasWarnings()); + Assert.assertTrue(violation.getWarnings().containsKey("umwId")); + Assert.assertTrue(violation.getWarnings().get("umwId").contains(631)); + prot.setPassed(true); + } +}
--- a/src/test/java/de/intevation/lada/test/validator/Status.java Mon Jul 04 14:31:18 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU GPL (v>=3) - * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. - */ -package de.intevation.lada.test.validator; - -import java.util.List; - -import org.junit.Assert; - -import de.intevation.lada.Protocol; -import de.intevation.lada.model.land.LStatusProtokoll; -import de.intevation.lada.validation.Validator; -import de.intevation.lada.validation.Violation; - -public class Status { - - private Validator validator; - - public void setValidator(Validator validator) { - this.validator = validator; - } - - public final void checkKombiNegative(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("StatusValidator"); - prot.setType("check status kombi"); - prot.setPassed(false); - protocol.add(prot); - LStatusProtokoll status = new LStatusProtokoll(); - status.setStatusStufe(2); - status.setStatusWert(7); - Violation violation = validator.validate(status); - Assert.assertTrue(violation.hasErrors()); - Assert.assertTrue(violation.getErrors().containsKey("kombi")); - Assert.assertTrue(violation.getErrors().get("kombi").contains(632)); - prot.setPassed(true); - } - - public final void checkKombiPositive(List<Protocol> protocol) { - Protocol prot = new Protocol(); - prot.setName("StatusValidator"); - prot.setType("check status kombi"); - prot.setPassed(false); - protocol.add(prot); - LStatusProtokoll status = new LStatusProtokoll(); - status.setStatusStufe(1); - status.setStatusWert(1); - Violation violation = validator.validate(status); - if (violation.hasErrors()) { - Assert.assertFalse(violation.getErrors().containsKey("kombi")); - } - prot.setPassed(true); - } -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/de/intevation/lada/test/validator/StatusTest.java Fri Jul 08 15:32:36 2016 +0200 @@ -0,0 +1,58 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ +package de.intevation.lada.test.validator; + +import java.util.List; + +import org.junit.Assert; + +import de.intevation.lada.Protocol; +import de.intevation.lada.model.land.StatusProtokoll; +import de.intevation.lada.validation.Validator; +import de.intevation.lada.validation.Violation; + +public class StatusTest { + + private Validator validator; + + public void setValidator(Validator validator) { + this.validator = validator; + } + + public final void checkKombiNegative(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("StatusValidator"); + prot.setType("check status kombi"); + prot.setPassed(false); + protocol.add(prot); + StatusProtokoll status = new StatusProtokoll(); + status.setStatusStufe(2); + status.setStatusWert(7); + Violation violation = validator.validate(status); + Assert.assertTrue(violation.hasErrors()); + Assert.assertTrue(violation.getErrors().containsKey("kombi")); + Assert.assertTrue(violation.getErrors().get("kombi").contains(632)); + prot.setPassed(true); + } + + public final void checkKombiPositive(List<Protocol> protocol) { + Protocol prot = new Protocol(); + prot.setName("StatusValidator"); + prot.setType("check status kombi"); + prot.setPassed(false); + protocol.add(prot); + StatusProtokoll status = new StatusProtokoll(); + status.setStatusStufe(1); + status.setStatusWert(1); + Violation violation = validator.validate(status); + if (violation.hasErrors()) { + Assert.assertFalse(violation.getErrors().containsKey("kombi")); + } + prot.setPassed(true); + } +}