All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tmsps.ne4spring.orm.param.SQLBean Maven / Gradle / Ivy

There is a newer version: 999.0.0.0
Show newest version
package com.tmsps.ne4spring.orm.param;

import org.apache.commons.lang3.StringUtils;

/**
 * @Title:  SQLBean.java
 * @Package com.tmsps.ne4spring.orm.param
 * @Description: SQL 语句工具
 * @author: zhangwei
 * @date:   2023年1月19日
 * @time:	下午3:32:31
 * @version  v1.0
 * @Copyright: 2019 XingGe All rights reserved.
 */
public class SQLBean {
	// SQL语句中的select语句,从起始到from语句之前这一段
	private StringBuffer sql = new StringBuffer();

	/**
	 * @Description:追加SQL语句
	 * @author: Mr72
	 * @date: 2023-01-19 15:34:43
	 * @param appendSQL
	 */
	public void sqlAppend(String appendSQL) {
		if (StringUtils.isNotBlank(appendSQL)) {
			this.sql.append(StringUtils.SPACE).append(appendSQL.trim());
		}
	}

	/**
	 * @Description:返回SQL语句
	 * @author: Mr72
	 * @date: 2023-01-19 15:34:57
	 * @return
	 */
	public String getSQL() {
		return sql.toString().trim();
	}
	
	public String toString() {
		return this.getSQL();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy