package net.northking.cctp.element.database;

import net.northking.cctp.element.core.AbstractLibrary;
import net.northking.cctp.element.core.annotation.Library;
import net.northking.cctp.element.core.type.LibraryConstant;
import net.northking.cctp.element.util.Javadoc2Libdoc;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * <p>这是一个用于数据库操作的组件库。</p>
 * 数据库组件库是基础组件库，用于执行MySQL,Oracle,Mongodb数据库语句。
 */
@Library(scanBasePackage = "net.northking.cctp.element.database", infoClass = DatabaseLibrary.class)
public class DatabaseLibrary extends AbstractLibrary {

    private static final Logger logger = LoggerFactory.getLogger(DatabaseLibrary.class);
    private static final Javadoc2Libdoc JAVA_DOC_2_LIB_DOC = new Javadoc2Libdoc(DatabaseLibrary.class);
    private static final String NAME = "NK.Database";
    private static final String CH_NAME = "数据库组件库";
    private static final String VERSION = "3.22";
    private static final Integer TYPE = LibraryConstant.LIB_TYPE_NOT;

    @Override
    public String getName() {
        return NAME;
    }

    @Override
    public String getChName() {
        return CH_NAME;
    }

    @Override
    public String getVersion() {
        return VERSION;
    }

    @Override
    public Javadoc2Libdoc getLibDoc() {
        return JAVA_DOC_2_LIB_DOC;
    }

    @Override
    public Integer getType() {
        return TYPE;
    }
    @Override
    public void destroy() {
        logger.info("destroy done.");
    }

}