comparison src/main/java/de/intevation/lada/validation/rules/status/StatusKombination.java @ 1028:1c41c7b8f7c2 schema-update

Updated server application to new database model. THIS IS STILL WIP!!!
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 08 Jul 2016 15:32:36 +0200
parents 385fab3be7f4
children 4d95cc7f0a43
comparison
equal deleted inserted replaced
1027:9971471d562c 1028:1c41c7b8f7c2
9 9
10 import java.util.List; 10 import java.util.List;
11 11
12 import javax.inject.Inject; 12 import javax.inject.Inject;
13 13
14 import de.intevation.lada.model.land.LStatusProtokoll; 14 import de.intevation.lada.model.land.StatusProtokoll;
15 import de.intevation.lada.model.stamm.StatusKombi; 15 import de.intevation.lada.model.stammdaten.StatusKombi;
16 import de.intevation.lada.util.annotation.RepositoryConfig; 16 import de.intevation.lada.util.annotation.RepositoryConfig;
17 import de.intevation.lada.util.data.QueryBuilder; 17 import de.intevation.lada.util.data.QueryBuilder;
18 import de.intevation.lada.util.data.Repository; 18 import de.intevation.lada.util.data.Repository;
19 import de.intevation.lada.util.data.RepositoryType; 19 import de.intevation.lada.util.data.RepositoryType;
20 import de.intevation.lada.validation.Violation; 20 import de.intevation.lada.validation.Violation;
33 @RepositoryConfig(type=RepositoryType.RO) 33 @RepositoryConfig(type=RepositoryType.RO)
34 private Repository repository; 34 private Repository repository;
35 35
36 @Override 36 @Override
37 public Violation execute(Object object) { 37 public Violation execute(Object object) {
38 LStatusProtokoll status = (LStatusProtokoll)object; 38 /*
39 StatusProtokoll status = (StatusProtokoll)object;
39 QueryBuilder<StatusKombi> kombi = new QueryBuilder<StatusKombi>( 40 QueryBuilder<StatusKombi> kombi = new QueryBuilder<StatusKombi>(
40 repository.entityManager("stamm"), 41 repository.entityManager("stamm"),
41 StatusKombi.class); 42 StatusKombi.class);
42 kombi.and("stufeId", status.getStatusStufe()); 43 kombi.and("stufeId", status.getStatusStufe());
43 kombi.and("wertId", status.getStatusWert()); 44 kombi.and("wertId", status.getStatusWert());
47 Violation violation = new Violation(); 48 Violation violation = new Violation();
48 violation.addError("kombi", 632); 49 violation.addError("kombi", 632);
49 return violation; 50 return violation;
50 } 51 }
51 return null; 52 return null;
53 */
54 Violation violation = new Violation();
55 violation.addError("status", 000);
56 return violation;
52 } 57 }
53 } 58 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)