/[projects]/dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Constants.java
ViewVC logotype

Contents of /dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Constants.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2223 - (show annotations) (download)
Sat Sep 20 11:15:58 2014 UTC (9 years, 7 months ago) by torben
File size: 795 byte(s)
Add handling of distributor specific table extensions
1 package dk.daoas.fulddaekning;
2
3 public abstract class Constants {
4
5 private static Constants singleton = null;
6
7 abstract public double getLatitudeMargin();
8 abstract public double getLongitudeMargin();
9
10 abstract public double getMaxDistance();
11
12 abstract public int getMinPostnr();
13 abstract public int getMaxPostnr();
14
15 abstract public String getTableExtension();
16
17
18 public static Constants getInstance() { //Singleton-ish
19 return singleton;
20 }
21
22 public static void init(String distributor) {
23
24 if (distributor.equals("DAO")) {
25 singleton = new DaoConstants();
26 } else if (distributor.equals("BK")){
27 singleton = new BKConstants();
28 } else {
29 System.out.println("Ukendt distributor: " + distributor);
30 System.exit(0);
31 }
32
33 }
34
35
36 }

  ViewVC Help
Powered by ViewVC 1.1.20