Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Copyright (C) 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.viiyue.plugins.mybatis.template;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.mapping.SqlCommandType;
import org.apache.ibatis.session.Configuration;
import com.viiyue.plugins.mybatis.Constants;
import com.viiyue.plugins.mybatis.enums.Setting;
import com.viiyue.plugins.mybatis.template.builder.ColumnBuilder;
import com.viiyue.plugins.mybatis.template.handler.DynamicTemplateHandler;
import com.viiyue.plugins.mybatis.template.handler.ExceptionHandler;
import com.viiyue.plugins.mybatis.template.handler.ExpressionHandler;
import com.viiyue.plugins.mybatis.template.handler.KeywordsHandler;
import com.viiyue.plugins.mybatis.template.handler.MybatisParameterHandler;
import com.viiyue.plugins.mybatis.template.handler.ParameterHandler;
import com.viiyue.plugins.mybatis.template.handler.StaticTemplateHandler;
import com.viiyue.plugins.mybatis.template.handler.base.AbstractHandler;
import com.viiyue.plugins.mybatis.utils.StringUtil;
/**
* Template syntax handler for parsing all template syntax that appears in text
*
* @author tangxbai
* @since 1.1.0
*/
public final class TemplateHandler {
/**
* Template exception handler
*
*
* <error>message</error>
*
*/
private static final ExceptionHandler exceptionHandler = new ExceptionHandler(); // message
/**
* Expression template handler
*
*
* @{expression}
*
*/
private static final ExpressionHandler expressionHandler = new ExpressionHandler(); // @{expression}
/**
* Expression template handler
*
*
* [keywords]
*
*/
private static final KeywordsHandler keywordsHandler = new KeywordsHandler(); // [expression]
/**
* Parameter template handler
*
*
* {{parameter expression}}
*
*
*
Internal value expression:
*
*
{{env.xxx}} See {@link Constants#ENV_PROP_NAMES}
*
{{system.xxx}} See {@link TemplateEngine#systemContext()}
*
*/
private static final ParameterHandler parameterTemplateHandler = new ParameterHandler(); // {{expression}}
/**
* Dynamic expression template handler
*
*
* %{expression}
*
*/
private static final DynamicTemplateHandler dynamicTemplateHandler = new DynamicTemplateHandler(); // %{expression}
/**
* Static expression template handler
*
*