사용자가 api 를 만들수 있는지 여부를 설정 하도록 개선.
[Tadpole.git] / com.hangum.tadpole.commons.sql / src / com / hangum / tadpole / engine / define / DBGroupDefine.java
blob30b4ba049c72da03ea4146d67cecae90a531e8c5
1 /*******************************************************************************
2 * Copyright (c) 2016 hangum.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the GNU Lesser Public License v2.1
5 * which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 *
8 * Contributors:
9 * hangum - initial API and implementation
10 ******************************************************************************/
11 package com.hangum.tadpole.engine.define;
13 import org.apache.log4j.Logger;
15 /**
16 * Define database group
17 * reference {@code DBDefine}
19 * @author hangum
22 public enum DBGroupDefine {
23 /* oracle, tibero */
24 ORACLE_GROUP,
25 /* mssql 8le, mssql */
26 MSSQL_GROUP,
27 /* mysql, mariadb */
28 MYSQL_GROUP,
29 /* postgre */
30 POSTGRE_GROUP,
31 /* hive, hive2 */
32 HIVE_GROUP,
33 /* sqlite */
34 SQLITE_GROUP,
35 /* mongodb */
36 MONGODB_GROUP,
37 /* cubrid */
38 CUBRID_GROUP,
39 /* altibase */
40 ALTIBASE_GROUP,
42 DYNAMODB_GROUP
45 private static final Logger logger = Logger.getLogger(DBGroupDefine.class);
47 public static DBGroupDefine getGroup(DBDefine dbDefine) {
48 if(dbDefine == DBDefine.ORACLE_DEFAULT || dbDefine == DBDefine.TIBERO_DEFAULT) {
49 return ORACLE_GROUP;
50 } else if(dbDefine == DBDefine.MSSQL_DEFAULT || dbDefine == DBDefine.MSSQL_8_LE_DEFAULT) {
51 return MSSQL_GROUP;
52 } else if(dbDefine == DBDefine.MYSQL_DEFAULT || dbDefine == DBDefine.MARIADB_DEFAULT) {
53 return MYSQL_GROUP;
54 } else if(dbDefine == DBDefine.POSTGRE_DEFAULT || dbDefine == DBDefine.AMAZON_REDSHIFT_DEFAULT || dbDefine == DBDefine.NETEZZA_DEFAULT) {
55 return POSTGRE_GROUP;
56 } else if(dbDefine == DBDefine.HIVE_DEFAULT || dbDefine == DBDefine.HIVE2_DEFAULT) {
57 return HIVE_GROUP;
58 } else if(dbDefine == DBDefine.SQLite_DEFAULT) {
59 return SQLITE_GROUP;
60 } else if(dbDefine == DBDefine.CUBRID_DEFAULT) {
61 return CUBRID_GROUP;
62 } else if(dbDefine == DBDefine.ALTIBASE_DEFAULT) {
63 return ALTIBASE_GROUP;
64 } else if(dbDefine == DBDefine.DYNAMODB_DEFAULT) {
65 return DYNAMODB_GROUP;
66 } else {
67 return MONGODB_GROUP;