All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.centit.support.database.metadata.IDatabaseInfo Maven / Gradle / Ivy

Go to download

数据库操作通用方法和函数,从以前的util包中分离出来,并且整合了部分sys-module中的函数

The newest version!
package com.centit.support.database.metadata;

import com.alibaba.fastjson.annotation.JSONField;
import com.centit.support.database.utils.DBType;

import java.util.Map;

/**
 * 数据库基本信息
 */
public interface IDatabaseInfo {
    String getDatabaseCode();

    String getDatabaseName();

    String getOsId();

    String getDatabaseUrl();

    String getUsername();

    String getPassword();

    String getDatabaseDesc();

    @JSONField(serialize = false)
    String getClearPassword();

    Map getExtProps();

    default DBType getDBType() {
        return DBType.mapDBType(getDatabaseUrl());
    }

    default Object getExtProp(String key) {
        Map extProps = getExtProps();
        if(extProps==null){
            return null;
        }
        return extProps.get(key);
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy