accountbo.java
来自「use MVC bean with 3-tiers」· Java 代码 · 共 56 行
JAVA
56 行
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 + =
减小字号Ctrl + -
显示快捷键?