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

📄 wealthdaoim.java

📁 一个不错的bbs论坛系统.对初学者很有帮助
💻 JAVA
字号:
package com.yhbbs.bbs.dao;

import java.sql.SQLException;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.yhbbs.bbs.itface.Wealth;
import com.yhbbs.bbs.itface.WealthDto;
import com.yhbbs.bbs.itface.dao.WealthDao;
import com.yhbbs.data.AppSqlMap;

/**
 * <p>Title:系统财富数据存取模块Bean</p>
 * <li> 系统财富数据存取模块<br>
 * <br><b>WebSite: www.yyhweb.com</b>
 * <br><b>CopyRight: yyhweb[由由华网]</b>
 * @author stephen
 * @version YHBBS-2.0
 */
public class WealthDaoIm implements WealthDao {

	private SqlMapClient sqlMapClient;
	
	private static WealthDaoIm wealthdao = new WealthDaoIm();	
	
	/**
	 * constructor
	 */
	public WealthDaoIm() {
		sqlMapClient = AppSqlMap.getInstance();
	}

	/**
	 * @return get the instance of WealthDaoIm
	 */
	public static WealthDaoIm getInstance(){
		return wealthdao;
	}
	
	public WealthDto getLoginWth() throws SQLException {
		
		return (WealthDto)sqlMapClient.queryForObject("getLoginWth",null);	
	}
	
	public WealthDto getRegWealth() throws SQLException {
		
		return (WealthDto)sqlMapClient.queryForObject("getRegWealth",null);	
	}

	public WealthDto getPostArtWth() throws SQLException {
		
		return (WealthDto)sqlMapClient.queryForObject("getPostArtWth",null);	
	}

	public WealthDto getRepArtWth() throws SQLException {
		
		return (WealthDto)sqlMapClient.queryForObject("getRepArtWth",null);	
	}

	public WealthDto getDelArtWth() throws SQLException {
		
		return (WealthDto)sqlMapClient.queryForObject("getDelArtWth",null);	
	}
	
	public WealthDto getArtEliteWth() throws SQLException {

		return (WealthDto)sqlMapClient.queryForObject("getArtEliteWth",null);	
	}
	
	public Wealth getWealth() throws SQLException {
		
		return (Wealth)sqlMapClient.queryForObject("getWealth",null);
	}

	public boolean updateWealth(Wealth wealth) throws SQLException {

		return sqlMapClient.update("updateWealth",wealth)>0;
	}

	public static void main(String[] args) throws SQLException{
		WealthDto dto = WealthDaoIm.getInstance().getRegWealth();
		System.out.println("The wealth of getRegWealth :");
		if(dto!=null){
		System.out.println("money:"+dto.getMoney());
		System.out.println("expr:"+dto.getExperc());
		System.out.println("charar:"+dto.getCharam());
		}
	}
}

⌨️ 快捷键说明

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