LibraryDAO.java~10~
上传用户:toby828
上传日期:2015-06-26
资源大小:8558k
文件大小:1k
- package com.dao;
- import com.core.ConnDB;
- import java.sql.*;
- import com.actionForm.LibraryForm;
- /**
- * <p>Title: LibraryManage</p>
- *
- * <p>Description: </p>
- *
- * <p>Copyright: Copyright (c) 2006</p>
- *
- * <p>Company: </p>
- *
- * @author not attributable
- * @version 1.0
- */
- public class LibraryDAO {
- ConnDB conn=null;
- public LibraryDAO() {
- conn=new ConnDB();
- }
- public LibraryForm query(){
- LibraryForm libraryForm1=null;
- String sql = "select * from tb_library where id=1";
- ResultSet rs =conn.executeQuery(sql);
- try {
- while (rs.next()) {
- libraryForm1 = new LibraryForm();
- libraryForm1.setId(Integer.valueOf(rs.getString(1)));
- libraryForm1.setLibraryname(rs.getString(2));
- libraryForm1.setCurator(rs.getString(3));
- libraryForm1.setTel(rs.getString(4));
- libraryForm1.setAddress(rs.getString(5));
- libraryForm1.setEmail(rs.getString(6));
- libraryForm1.setUrl(rs.getString(7));
- libraryForm1.setCreateDate(rs.getString(8));
- libraryForm1.setIntroduce(rs.getString(9));
- }
- } catch (Exception ex) {
- }
- conn.close();
- return libraryForm1;
- }
- public int update(LibraryForm libraryForm){
- String sql="UPDATE tb_library SET libraryname='"++"',curator='"++"',;
- return flag;
- }
- }