DbLinkService.java 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. package jnpf.base.service;
  2. import jnpf.base.service.SuperService;
  3. import com.baomidou.mybatisplus.extension.service.IService;
  4. import jnpf.base.model.dblink.PaginationDbLink;
  5. import jnpf.database.model.dto.DbConnDTO;
  6. import jnpf.database.model.entity.DbLinkEntity;
  7. import jnpf.exception.DataException;
  8. import java.util.List;
  9. /**
  10. * 数据连接
  11. *
  12. * @author JNPF开发平台组
  13. * @version V3.1.0
  14. * @copyright 引迈信息技术有限公司
  15. * @date 2019年9月27日 上午9:18
  16. */
  17. public interface DbLinkService extends SuperService<DbLinkEntity> {
  18. /**
  19. * 列表
  20. *
  21. * @return ignore
  22. */
  23. List<DbLinkEntity> getList();
  24. /**
  25. * 列表关键字查询
  26. *
  27. * @param pagination 数据连接分页
  28. * @return ignore
  29. */
  30. List<DbLinkEntity> getList(PaginationDbLink pagination);
  31. /**
  32. * 信息
  33. *
  34. * @param id 主键
  35. * @return ignore
  36. */
  37. DbLinkEntity getInfo(String id);
  38. /**
  39. * 验证名称
  40. *
  41. * @param fullName 名称
  42. * @param id 主键值
  43. * @return ignore
  44. */
  45. boolean isExistByFullName(String fullName, String id);
  46. /**
  47. * 创建
  48. *
  49. * @param entity 实体对象
  50. */
  51. void create(DbLinkEntity entity);
  52. /**
  53. * 更新
  54. *
  55. * @param id 主键值
  56. * @param entity 实体对象
  57. * @return ignore
  58. */
  59. boolean update(String id, DbLinkEntity entity);
  60. /**
  61. * 删除
  62. *
  63. * @param entity 实体对象
  64. */
  65. void delete(DbLinkEntity entity);
  66. /**
  67. * 上移
  68. *
  69. * @param id 主键值
  70. * @return ignore
  71. */
  72. boolean first(String id);
  73. /**
  74. * 下移
  75. *
  76. * @param id 主键值
  77. * @return ignore
  78. */
  79. boolean next(String id);
  80. /**
  81. * 测试连接
  82. *
  83. * @param entity 实体对象
  84. * @return ignore
  85. * @throws DataException ignore
  86. */
  87. boolean testDbConnection(DbLinkEntity entity) throws Exception;
  88. /**
  89. * 获取动态数据源
  90. *
  91. * @param dbLinkId 数据连接ID
  92. * @return 动态数据库源
  93. * @throws DataException ignore
  94. */
  95. DbLinkEntity getResource(String dbLinkId) throws Exception;
  96. }