9b1eb23b7d286e1496e9bd8a87e1c8f1b75a765f
[dcaegen2/services.git] /
1 /*
2 * ============LICENSE_START=======================================================
3 * ONAP : DCAE
4 * ================================================================================
5 * Copyright 2018 TechMahindra
6 *=================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 *     http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
19 */
20 package org.onap.datalake.feeder.enumeration;
21
22 /**
23  * Database type
24  * 
25  * @author Guobiao Mo
26  *
27  */
28 public enum DbTypeEnum { 
29         CB("Couchbase"), DRUID("Druid"), ES("Elasticsearch"), HDFS("HDFS"), MONGO("MongoDB"), KIBANA("Kibana");
30
31         private final String name;
32
33         DbTypeEnum(String name) {
34                 this.name = name;
35         }
36
37         public static DbTypeEnum fromString(String s) {
38                 for (DbTypeEnum df : DbTypeEnum.values()) {
39                         if (df.name.equalsIgnoreCase(s)) {
40                                 return df;
41                         }
42                 }
43                 throw new IllegalArgumentException("Invalid value for db: " + s);
44         }
45 }