FieldFill.java 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (c) 2011-2019, 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. * https://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.annotation;
  17. /**
  18. * 字段填充策略枚举类
  19. *
  20. * <p>
  21. * 判断注入的 insert 和 update 的 sql 脚本是否在对应情况下忽略掉字段的 if 标签生成
  22. * <if test="...">......</if>
  23. * 判断优先级比 {@link FieldStrategy} 高
  24. * </p>
  25. *
  26. * @author hubin
  27. * @since 2017-06-27
  28. */
  29. public enum FieldFill {
  30. /**
  31. * 默认不处理
  32. */
  33. DEFAULT,
  34. /**
  35. * 插入时填充字段
  36. */
  37. INSERT,
  38. /**
  39. * 更新时填充字段
  40. */
  41. UPDATE,
  42. /**
  43. * 插入和更新时填充字段
  44. */
  45. INSERT_UPDATE
  46. }