Codota Logo
com.baomidou.mybatisplus.core.toolkit
Code IndexAdd Codota to your IDE (free)

How to use com.baomidou.mybatisplus.core.toolkit

Best Java code snippets using com.baomidou.mybatisplus.core.toolkit (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: baomidou/mybatis-plus

/**
 * 获取TableInfo
 *
 * @param clazz 对象类
 * @return TableInfo 对象表信息
 */
public static TableInfo table(Class<?> clazz) {
  TableInfo tableInfo = TableInfoHelper.getTableInfo(clazz);
  Assert.notNull(tableInfo, "Error: Cannot execute table Method, ClassGenricType not found .");
  return tableInfo;
}
origin: baomidou/mybatis-plus

/**
 * 断言这个 map 不为 empty
 * <p>为 empty 则抛异常</p>
 *
 * @param map     集合
 * @param message 消息
 */
public static void notEmpty(Map<?, ?> map, String message, Object... params) {
  isTrue(CollectionUtils.isNotEmpty(map), message, params);
}
origin: baomidou/mybatis-plus

  /**
   * 断言这个 数组 不为 empty
   * <p>为 empty 则抛异常</p>
   *
   * @param array   数组
   * @param message 消息
   */
  public static void notEmpty(Object[] array, String message, Object... params) {
    isTrue(ArrayUtils.isNotEmpty(array), message, params);
  }
}
origin: baomidou/mybatis-plus

/**
 * 断言这个 value 不为 empty
 * <p>为 empty 则抛异常</p>
 *
 * @param value   字符串
 * @param message 消息
 */
public static void notEmpty(String value, String message, Object... params) {
  isTrue(StringUtils.isNotEmpty(value), message, params);
}
origin: baomidou/mybatis-plus

/**
 * 是否开启逻辑删除
 */
public boolean isLogicDelete() {
  return StringUtils.isNotEmpty(logicDeleteValue);
}
origin: baomidou/mybatis-plus

/**
 * 断言这个 object 为 null
 * <p>不为 null 则抛异常</p>
 *
 * @param object  对象
 * @param message 消息
 */
public static void isNull(Object object, String message, Object... params) {
  isTrue(object == null, message, params);
}
origin: baomidou/mybatis-plus

/**
 * 判断object是否为空,集合会校验size
 */
public static boolean isNull(Object... objs) {
  for (Object obj : objs) {
    if (ObjectUtils.isEmpty(obj)) {
      return true;
    }
  }
  return false;
}
origin: baomidou/mybatis-plus

  /**
   * 判断Map是否不为空
   *
   * @param map 入参
   * @return boolean
   */
  public static boolean isNotEmpty(Map<?, ?> map) {
    return !isEmpty(map);
  }
}
origin: baomidou/mybatis-plus

/**
 * 断言这个 boolean 为 true
 * <p>为 false 则抛出异常</p>
 *
 * @param expression boolean 值
 * @param message    消息
 */
public static void isTrue(boolean expression, String message, Object... params) {
  if (!expression) {
    throw ExceptionUtils.mpe(message, params);
  }
}
origin: baomidou/mybatis-plus

/**
 * 判断object是否不为空,集合会校验size
 */
public static boolean isNotNull(Object... obj) {
  return !ObjectUtils.isNull(obj);
}
origin: baomidou/mybatis-plus

/**
 * 判断数组是否不为空
 *
 * @param array 数组
 * @return 数组对象内含有任意对象时返回 true
 * @see ArrayUtils#isEmpty(Object[])
 */
public static boolean isNotEmpty(Object[] array) {
  return !isEmpty(array);
}
origin: baomidou/mybatis-plus

/**
 * 是否为驼峰下划线混合命名
 *
 * @param word 待判断字符串
 * @return ignore
 */
public static boolean isMixedMode(String word) {
  return matches(".*[A-Z]+.*", word) && matches(".*[/_]+.*", word);
}
origin: baomidou/mybatis-plus

/**
 * 时间 ID = Time + ID
 * <p>例如:可用于商品订单 ID</p>
 */
public static String getTimeId() {
  return getMillisecond() + getId();
}
origin: baomidou/mybatis-plus

  @Override
  @SuppressWarnings("all")
  public Children clone() {
    return SerializationUtils.clone(typedThis);
  }
}
origin: baomidou/mybatis-plus

/**
 * 第一个首字母小写,之后字符大小写的不变
 * <p>StringUtils.firstCharToLower( "UserService" )     = userService</p>
 * <p>StringUtils.firstCharToLower( "UserServiceImpl" ) = userServiceImpl</p>
 *
 * @param rawString 需要处理的字符串
 * @return ignore
 */
public static String firstCharToLower(String rawString) {
  return prefixToLower(rawString, 1);
}
origin: baomidou/mybatis-plus

/**
 * 字符串第一个字母大写
 *
 * @param str 被处理的字符串
 * @return 首字母大写后的字符串
 */
public static String capitalize(final String str) {
  return concatCapitalize(null, str);
}
origin: baomidou/mybatis-plus

protected long tilNextMillis(long lastTimestamp) {
  long timestamp = timeGen();
  while (timestamp <= lastTimestamp) {
    timestamp = timeGen();
  }
  return timestamp;
}
origin: baomidou/mybatis-plus

/**
 * 有参构造器
 *
 * @param workerId     工作机器 ID
 * @param datacenterId 序列号
 */
public static void initSequence(long workerId, long datacenterId) {
  WORKER = new Sequence(workerId, datacenterId);
}
origin: baomidou/mybatis-plus

/**
 * 断言这个 collection 不为 empty
 * <p>为 empty 则抛异常</p>
 *
 * @param collection 集合
 * @param message    消息
 */
public static void notEmpty(Collection<?> collection, String message, Object... params) {
  isTrue(CollectionUtils.isNotEmpty(collection), message, params);
}
origin: baomidou/mybatis-plus

/**
 * 断言这个 boolean 为 false
 * <p>为 true 则抛出异常</p>
 *
 * @param expression boolean 值
 * @param message    消息
 */
public static void isFalse(boolean expression, String message, Object... params) {
  isTrue(!expression, message, params);
}
com.baomidou.mybatisplus.core.toolkit

Most used classes

  • StringUtils
    String 工具类
  • TableInfoHelper
    实体类反射表辅助类
  • CollectionUtils
    Collection工具类
  • Wrappers
  • Assert
    断言类
  • ExceptionUtils,
  • ObjectUtils,
  • ReflectionKit,
  • ArrayUtils,
  • GlobalConfigUtils,
  • SqlScriptUtils,
  • EncryptUtils,
  • IdWorker,
  • LambdaUtils,
  • PluginUtils,
  • SystemClock,
  • SqlUtils,
  • SerializedLambda,
  • BeanUtils
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now