类 GeneratorSqlmap

java.lang.Object
com.mbap.ct.generator.service.GeneratorSqlmap

@Component("GeneratorSqlmap") public class GeneratorSqlmap extends Object
  • 构造器详细资料

    • GeneratorSqlmap

      public GeneratorSqlmap()
  • 方法详细资料

    • generatorConfig

      public void generatorConfig(String targetPackage, String targetProject, List<String> tableList, String classpathEntry)
      参数:
      targetPackage - 生成模型的包路径
      targetProject - 生成模型的位置
      classpathEntry - 本地硬盘上面的数据库驱动包路径
      tableList - 要生成的 表名称:实体类名称 多个用逗号隔开 示例log_business:Business
    • isexists

      public boolean isexists(String targetPackage, String entityName)
      参数:
      targetPackage - 包路径
      entityName - 实体名称
      返回:
    • getAllTable

      public List<Map<String,Object>> getAllTable() throws Exception
      获取当前用户下的表数据
      返回:
      抛出:
      Exception
    • getAllTableByDb

      public List<Map<String,Object>> getAllTableByDb(DataSourceConfig dsc) throws Exception
      获取外部数据源的表信息
      参数:
      dsc -
      返回:
      抛出:
      Exception
    • getFieldByTable

      public List<FieldInfo> getFieldByTable(String tableName) throws Exception
      根据表名称获取字段信息
      参数:
      tableName -
      返回:
      抛出:
      Exception
    • getFieldByTableAndDb

      public List<FieldInfo> getFieldByTableAndDb(DataSourceConfig dsc, String tableName) throws Exception
      根据表名称以及外部数据源配置获取字段信息
      参数:
      dsc -
      tableName -
      返回:
      抛出:
      Exception
    • generatorEntityFile

      public void generatorEntityFile(BuildEntity buildEntity)
      生成实体类文件
      参数:
      id - 实体配置
      抛出:
      Exception
    • getClassPath

      public String getClassPath(String targetPackage, String entityName)
    • connectionTest

      public boolean connectionTest(DataSourceConfig dsc)
      外部数据源连接测试
      参数:
      dsc -
      返回:
    • getTableNameList

      public List<Map<String,Object>> getTableNameList(Connection connection, boolean flag) throws Exception
      参数:
      connection -
      flag - 是否返回所有表信息
      返回:
      抛出:
      Exception
    • getFieldList

      public List<FieldInfo> getFieldList(Connection connection, String tableName) throws Exception
      根据数据源及表名称获取字段信息
      参数:
      tableName -
      返回:
      抛出:
      Exception
    • getConnection

      public Connection getConnection()
    • getConnection

      public Connection getConnection(DataSourceConfig dsc)