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

📄 accountbo.java

📁 use MVC bean with 3-tiers
💻 JAVA
字号:
package usermanager.bo;

import java.util.ArrayList;

import usermanager.access.mapper.AccountMapper;
import usermanager.dto.AccountDTO;

public class AccountBO {
	public boolean login(String username, String password) throws Exception {
		AccountMapper mapper = null;
		boolean found = false;
		try {
			mapper = new AccountMapper();
			found = mapper.login(username, password);
		}
		catch (Exception e) {
			throw e;
		}
		
		return found;
	}
	
	public void insertNewUser(AccountDTO newUser) throws Exception {
		AccountMapper mapper = null;
		try {
			mapper = new AccountMapper();
			mapper.insertNewUser(newUser);
		}
		catch (Exception e) {
			throw e;
		}
	}
	
	public AccountDTO getUserInformation(String username) throws Exception {
		AccountMapper mapper = null;
		try {
			mapper = new AccountMapper();
			return mapper.getUserInformation(username);
		}
		catch (Exception e) {
			throw e;
		}
	}
	
	public ArrayList<AccountDTO> listUser() throws Exception {
		AccountMapper mapper = null;
		try {
			mapper = new AccountMapper();
			return mapper.listUser();
		}
		catch (Exception e) {
			throw e;
		}
	}
}

⌨️ 快捷键说明

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