com.centit.support.database.metadata.IDatabaseInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of centit-database Show documentation
Show all versions of centit-database Show documentation
数据库操作通用方法和函数,从以前的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);
}
}