FieldStrategy.java 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) 2011-2022, baomidou (jobob@qq.com).
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package com.baomidou.mybatisplus.annotation;
  17. /**
  18. * 字段策略枚举类
  19. * <p>
  20. * 如果字段是基本数据类型则最终效果等同于 {@link #IGNORED}
  21. *
  22. * @author hubin
  23. * @since 2016-09-09
  24. */
  25. public enum FieldStrategy {
  26. /**
  27. * 忽略判断
  28. */
  29. IGNORED,
  30. /**
  31. * 非NULL判断
  32. */
  33. NOT_NULL,
  34. /**
  35. * 非空判断(只对字符串类型字段,其他类型字段依然为非NULL判断)
  36. */
  37. NOT_EMPTY,
  38. /**
  39. * 默认的,一般只用于注解里
  40. * <p>1. 在全局里代表 NOT_NULL</p>
  41. * <p>2. 在注解里代表 跟随全局</p>
  42. */
  43. DEFAULT,
  44. /**
  45. * 不加入 SQL
  46. */
  47. NEVER
  48. }