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

📄 sqlmapuserdao.java

📁 esri的ArcGIS Server超级学习模板程序(for java)
💻 JAVA
字号:
package com.esri.solutions.jitk.personalization.dao;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.dao.DataAccessException;

/**
 * 
 * @author Susan Herdina
 * @version 1.0
 * @created 05-Nov-2007 10:29:29 AM
 * 
 * This class implements the IUserDAO and provides functionality to read and write User
 * Records to and from the database.
 *
 */
public class SqlMapUserDAO extends SqlMapClientDaoSupport implements IUserDAO {

	public void insert(UserRecord user)
			throws PersonalizationDAOException {
		try{
			user.setTimeModified(new java.sql.Timestamp(System.currentTimeMillis()));
			getSqlMapClientTemplate().insert("insertUser", user);	
		}
		catch(DataAccessException e){
			throw new PersonalizationDAOException( e );
		}		
	}

	public UserRecord selectOne(String id)
			throws PersonalizationDAOException {
		try{
			return (UserRecord)getSqlMapClientTemplate().queryForObject("selectOneUser", id);
		}
		catch(DataAccessException e){
			throw new PersonalizationDAOException( e );
		}
	}	

	public void update(UserRecord user)
			throws PersonalizationDAOException {
		try{
			user.setTimeModified(new java.sql.Timestamp(System.currentTimeMillis()));
			getSqlMapClientTemplate().update("updateUser", user);	
		}
		catch(DataAccessException e){
			throw new PersonalizationDAOException( e );
		}
	}
	
	public void delete(String id) throws PersonalizationDAOException {
		try{
			getSqlMapClientTemplate().delete("deleteUser", id);
		}
		catch(DataAccessException e){
			throw new PersonalizationDAOException( e );
		}
	}
}

⌨️ 快捷键说明

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