cn.featherfly.hammer.dml.builder.ConditionBuildUtils Maven / Gradle / Ivy
package cn.featherfly.hammer.dml.builder;
/**
*
* 条件构造器工具
*
* @author zhongj
*/
public class ConditionBuildUtils {
/**
*
* 条件添加工具
*
* @param condition 现有条件
* @param appendCondition 添加条件
*/
public static void appendCondition(StringBuilder condition, String appendCondition) {
if (condition != null) {
if (condition.length() == 0) {
condition.append(appendCondition.trim());
} else if (condition.charAt(condition.length() - 1) == ' ') {
condition.append(appendCondition.trim());
} else {
condition.append(" ").append(appendCondition.trim());
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy