Search in sources :

Example 1 with DatabaseConfiger

use of net.heartsome.cat.database.ui.core.DatabaseConfiger in project translationstudio8 by heartsome.

the class NewTermDbBaseInfoPage method saveToServerConfigFile.

private void saveToServerConfigFile(SystemDBOperator dbOp) {
    DatabaseConfiger cf = new DatabaseConfiger();
    DatabaseModelBean bean = new DatabaseModelBean();
    MetaData md = dbOp.getMetaData();
    bean.metaDatatToBean(md);
    // 判断当前服务器是否已经存在
    String serverId = cf.isServerExist(bean, md);
    if (serverId == null || serverId.equals("")) {
        // 不存在
        cf.addServerConfig(bean);
    } else {
        bean.setId(serverId);
        cf.updateServerConfigById(serverId, bean);
    }
}
Also used : MetaData(net.heartsome.cat.common.bean.MetaData) DatabaseModelBean(net.heartsome.cat.common.bean.DatabaseModelBean) DatabaseConfiger(net.heartsome.cat.database.ui.core.DatabaseConfiger)

Example 2 with DatabaseConfiger

use of net.heartsome.cat.database.ui.core.DatabaseConfiger in project translationstudio8 by heartsome.

the class NewTmDbBaseInfoPage method saveToServerConfigFile.

private void saveToServerConfigFile(SystemDBOperator dbOp) {
    DatabaseConfiger cf = new DatabaseConfiger();
    DatabaseModelBean bean = new DatabaseModelBean();
    MetaData md = dbOp.getMetaData();
    bean.metaDatatToBean(md);
    // 判断当前服务器是否已经存在
    String serverId = cf.isServerExist(bean, md);
    if (serverId == null || serverId.equals("")) {
        // 不存在
        cf.addServerConfig(bean);
    } else {
        bean.setId(serverId);
        cf.updateServerConfigById(serverId, bean);
    }
}
Also used : MetaData(net.heartsome.cat.common.bean.MetaData) DatabaseModelBean(net.heartsome.cat.common.bean.DatabaseModelBean) DatabaseConfiger(net.heartsome.cat.database.ui.core.DatabaseConfiger)

Aggregations

DatabaseModelBean (net.heartsome.cat.common.bean.DatabaseModelBean)2 MetaData (net.heartsome.cat.common.bean.MetaData)2 DatabaseConfiger (net.heartsome.cat.database.ui.core.DatabaseConfiger)2