com.github.yulichang.adapter.v355.Adapter355 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mybatis-plus-join-adapter-v355 Show documentation
Show all versions of mybatis-plus-join-adapter-v355 Show documentation
An enhanced toolkit of Mybatis-Plus to simplify development.
package com.github.yulichang.adapter.v355;
import com.github.yulichang.adapter.base.IAdapter;
import com.github.yulichang.adapter.jsqlparser.v46.JSqlParserHelperV46;
import org.apache.ibatis.plugin.Interceptor;
import org.apache.ibatis.session.Configuration;
import org.apache.ibatis.type.TypeHandler;
import org.apache.ibatis.type.TypeHandlerRegistry;
import java.lang.reflect.Field;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
/**
* @author yulichang
* @since 1.4.12
*/
public class Adapter355 implements IAdapter {
@Override
public void parserColum(String alias, String from, String selectSql, Consumer columConsumer) {
JSqlParserHelperV46.parserColum(alias, from, selectSql, columConsumer);
}
@Override
public TypeHandler> getTypeHandler(Configuration configuration, Class> propertyType, Class extends TypeHandler>> typeHandlerClass, Field field) {
TypeHandlerRegistry registry = configuration.getTypeHandlerRegistry();
TypeHandler> typeHandler = registry.getMappingTypeHandler(typeHandlerClass);
if (typeHandler == null) {
typeHandler = registry.getInstance(propertyType, typeHandlerClass);
}
return typeHandler;
}
@Override
public void wrapperInnerPage(Interceptor interceptor, Predicate
© 2015 - 2025 Weber Informatics LLC | Privacy Policy