InjectionConfig.java 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /**
  2. * Copyright (c) 2011-2020, hubin (jobob@qq.com).
  3. * <p>
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. * <p>
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. * <p>
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.baomidou.mybatisplus.generator;
  17. import java.util.List;
  18. import java.util.Map;
  19. import com.baomidou.mybatisplus.generator.config.FileOutConfig;
  20. import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder;
  21. /**
  22. * <p>
  23. * 抽象的对外接口
  24. * </p>
  25. *
  26. * @author hubin
  27. * @since 2016-12-07
  28. */
  29. public abstract class InjectionConfig {
  30. /**
  31. * 全局配置
  32. */
  33. private ConfigBuilder config;
  34. /**
  35. * 自定义返回配置 Map 对象
  36. */
  37. private Map<String, Object> map;
  38. /**
  39. * 自定义输出文件
  40. */
  41. private List<FileOutConfig> fileOutConfigList;
  42. /**
  43. * 注入自定义 Map 对象
  44. */
  45. public abstract void initMap();
  46. public ConfigBuilder getConfig() {
  47. return config;
  48. }
  49. public InjectionConfig setConfig(ConfigBuilder config) {
  50. this.config = config;
  51. return this;
  52. }
  53. public Map<String, Object> getMap() {
  54. return map;
  55. }
  56. public InjectionConfig setMap(Map<String, Object> map) {
  57. this.map = map;
  58. return this;
  59. }
  60. public List<FileOutConfig> getFileOutConfigList() {
  61. return fileOutConfigList;
  62. }
  63. public InjectionConfig setFileOutConfigList(List<FileOutConfig> fileOutConfigList) {
  64. this.fileOutConfigList = fileOutConfigList;
  65. return this;
  66. }
  67. }