org.mybatis.scripting.thymeleaf.SqlGenerator Maven / Gradle / Ivy
/*
* Copyright 2018-2022 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
*
* https://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 org.mybatis.scripting.thymeleaf;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import java.util.stream.Collectors;
import org.mybatis.scripting.thymeleaf.expression.Likes;
import org.thymeleaf.ITemplateEngine;
import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.IContext;
import org.thymeleaf.templatemode.TemplateMode;
import org.thymeleaf.templateresolver.ClassLoaderTemplateResolver;
import org.thymeleaf.templateresolver.StringTemplateResolver;
/**
* The sql template engine for integrating with Thymeleaf.
*
* @author Kazuki Shimizu
*
* @version 1.0.2
*/
public class SqlGenerator {
static class ContextKeys {
static final String PARAMETER_OBJECT = "_parameter";
}
private final ITemplateEngine templateEngine;
private Map defaultCustomVariables = Collections.emptyMap();
private PropertyAccessor propertyAccessor = PropertyAccessor.BuiltIn.STANDARD;
private BiFunction
© 2015 - 2025 Weber Informatics LLC | Privacy Policy