annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java @ 983:4ea5f5a2284e

Ajusted datacage to use the SQL infrastructure from the artifact database. flys-artifacts/trunk@2413 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 28 Jul 2011 13:32:27 +0000
parents 66b3f2f064de
children 2b05c4a0c6fd
rev   line source
982
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts.datacage;
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
3 import de.intevation.artifacts.GlobalContext;
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
4
983
4ea5f5a2284e Ajusted datacage to use the SQL infrastructure from the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 982
diff changeset
5 import de.intevation.artifactdatabase.db.SQL;
4ea5f5a2284e Ajusted datacage to use the SQL infrastructure from the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 982
diff changeset
6 import de.intevation.artifactdatabase.db.SQLExecutor;
4ea5f5a2284e Ajusted datacage to use the SQL infrastructure from the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 982
diff changeset
7
982
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
8 import de.intevation.artifactdatabase.LifetimeListener;
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10 import org.apache.log4j.Logger;
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
11
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
12 import org.w3c.dom.Document;
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
13
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14 public class Datacage
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
15 implements LifetimeListener
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
16 {
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
17 private static Logger log = Logger.getLogger(Datacage.class);
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18
983
4ea5f5a2284e Ajusted datacage to use the SQL infrastructure from the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 982
diff changeset
19 protected SQLExecutor sqlExecutor;
4ea5f5a2284e Ajusted datacage to use the SQL infrastructure from the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 982
diff changeset
20
982
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
21 public Datacage() {
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
22 }
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
23
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
24 @Override
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
25 public void setup(Document document) {
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
26 log.debug("setup");
983
4ea5f5a2284e Ajusted datacage to use the SQL infrastructure from the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 982
diff changeset
27 DBConfig config = DBConfig.getInstance();
4ea5f5a2284e Ajusted datacage to use the SQL infrastructure from the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 982
diff changeset
28 setupSQL(config.getSQL());
4ea5f5a2284e Ajusted datacage to use the SQL infrastructure from the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 982
diff changeset
29 sqlExecutor = new SQLExecutor(config.getDBConnection());
4ea5f5a2284e Ajusted datacage to use the SQL infrastructure from the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 982
diff changeset
30 }
4ea5f5a2284e Ajusted datacage to use the SQL infrastructure from the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 982
diff changeset
31
4ea5f5a2284e Ajusted datacage to use the SQL infrastructure from the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 982
diff changeset
32 protected void setupSQL(SQL sql) {
4ea5f5a2284e Ajusted datacage to use the SQL infrastructure from the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 982
diff changeset
33 log.debug("implement me!");
982
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
34 }
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
35
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
36 @Override
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
37 public void systemUp(GlobalContext context) {
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
38 log.debug("systemUp");
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
39 }
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
40
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
41 @Override
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
42 public void systemDown(GlobalContext context) {
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
43 log.debug("systemDown");
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
44 }
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
45 }
66b3f2f064de Added the datacage as lifetime listener to the artifact database to create the initial index.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
46 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org