⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 abstractcommonsql.java

📁 羽量级数据持久层开发框架
💻 JAVA
字号:
package org.speedframework.sql;

import java.util.List;

import org.speedframework.exception.SpeedFrameworkException;
import org.speedframework.utilities.PropertiesUtil;
import org.speedframework.utilities.StringUtils;

/**
 * Class AbstractCommonSQL
 * 
 * @author <a href="mailto:santafeng@gmail.com"> lizf </a>
 * @version $Revision:1.0.0, $Date: 2007-11-1 上午03:21:46 $
 */
public abstract class AbstractCommonSQL implements ICommonSQL {
	protected Object tableObject;
	protected String tableSchema;
	protected String tableName;
	
	public String getTableName() {
		String tableName = StringUtils.getExcuteTableName(this.tableObject
				.getClass());
		if (this.tableSchema != null && !tableSchema.equals("")) {
			tableName = tableSchema + "." + tableName;
		}
		return tableName;
	}

	public List getParam(String sql) {
		// TODO 自动生成方法存根
		return null;
	}

	/**
	 * 
	 * @param paramlist
	 * @param entity
	 */
	public Object[] getParamValue(List paramlist, Object entity) {
		Object[] paramvalue = null;

		try {
			if (paramlist != null) {
				paramvalue = new Object[paramlist.size()];
				for (int i = 0; i < paramlist.size(); i++) {
					paramvalue[i] = PropertiesUtil.getProperty(entity,
							paramlist.get(i).toString().trim());
				}
			}
		} catch (Exception e) {
			throw new SpeedFrameworkException(
					"SpeedFramework Get param values error ", e);
		}
		return paramvalue;
	}

	/**
	 * 
	 * @param tableObject
	 */
	public void setTableObject(Object tableObject) {
		this.tableObject = tableObject;
	}

	/**
	 * 
	 * @param tableSchema
	 */
	public void setTableSchema(String tableSchema) {
		this.tableSchema = tableSchema;
	}


}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -