u03studentbo.java

来自「持久层hibernate技术使用的一个例子」· Java 代码 · 共 34 行

JAVA
34
字号
package cn.hope.front.bo;

import org.apache.log4j.Logger;

import cn.hope.front.pojo.Student;

import cn.hope.front.pojo.dao.StudentDAO;


public class U03StudentBO {
	Logger log = Logger.getLogger(U03StudentBO.class.getName());
	private StudentDAO studentDAO = new StudentDAO();
	public Student searchByKey(String SUsername) throws Exception {
		Student student=new Student();
		try {
			student = studentDAO.searchByKey(SUsername);
		} catch (Exception e) {
			log.error(e);
			e.printStackTrace();
			throw new Exception(e);
		}
		return student;
	}
	public void update(Student student)throws Exception {
		try {
			studentDAO.update(student);
		} catch (Exception e) {
			log.error(e);
			e.printStackTrace();
			throw new Exception(e);
		}
	}
}

⌨️ 快捷键说明

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