2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.database
;
12 import org
.apache
.log4j
.Logger
;
23 private static final Logger logger
= Logger
.getLogger(H2Mode
.class);
26 private static final String embedded
= "embedded";
27 private static final String inMemory
= "inMemory";
28 private static final String tcp
= "tcp";
30 public String
toString(){
31 if (this.equals(H2Mode
.EMBEDDED
)){
33 }else if (this.equals(H2Mode
.IN_MEMORY
)){
35 }else if (this.equals(H2Mode
.TCP
)){
38 logger
.warn("toString for mode not yet implemented");
44 public static H2Mode
fromString(String modeString
){
45 if (modeString
== null){
47 }else if (modeString
.equals(H2Mode
.EMBEDDED
.toString())){
48 return H2Mode
.EMBEDDED
;
49 }else if (modeString
.equals(H2Mode
.IN_MEMORY
.toString())){
50 return H2Mode
.IN_MEMORY
;
51 }else if (modeString
.equals(H2Mode
.IN_MEMORY
.toString())){
54 logger
.warn("Unknown modeString");