91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

有設計文檔,mysql數據庫,eclipse。有詳細的需求規格說明書,30頁word文檔。

資源截圖

代碼片段和文件信息

package?com.bbs.dao;

import?java.sql.*;
import?java.text.SimpleDateFormat;
import?java.util.ArrayList;
import?java.util.List;

import?com.bbs.entity.Article;
import?com.bbs.entity.Comment;
import?com.bbs.service.articleService;
import?com.bbs.service.commentService;
import?com.bbs.util.DBconnection;

/**
?*?
?*?@author?hsy?
?*?describe:對文章的操作
?*用id查?????用name查,查全部文章,修改文章新增文章,刪除文章
?*/

public?class?articleDao?{

//?用ID獲取文章對象
public?Article?getarticleById(int?id)?{
Connection?conn?=?null;
ResultSet?rs?=?null;
PreparedStatement?ps?=?null;
String?sql?=?“select?idunametitletypecontenttime?from?article?where?id?=??“;
try?{
conn?=?DBconnection.getConnection();
ps?=?conn.prepareStatement(sql);
ps.setInt(1?id);
rs?=?ps.executeQuery();
if?(rs.next())?{
//?如果存在,則直接構建并返回用戶對象
Article?article?=?new?Article(rs.getInt(“id“)rs.getString(“uname“)?rs.getString(“title“)?rs.getString(“type“)
rs.getString(“content“)?rs.getString(“time“));
conn.commit();
return?article;
}

}?catch?(Exception?e)?{
e.printStackTrace();
}?finally?{
//關閉連接
//DBconnection.close(rs?ps?conn);
}
return?null;
}


//?按名字查找文章
public?Article?getarticleByName(String?title)?{
ResultSet?rs?=?null;
PreparedStatement?ps?=?null;
Connection?conn?=?null;
String?sql?=?“select?idunametitletypecontenttime?from?article?where?title=??“;
try?{
conn?=?DBconnection.getConnection();
ps?=?conn.prepareStatement(sql);
ps.setString(1?title);
rs?=?ps.executeQuery();
if?(rs.next())?{
//?如果存在,則直接構建并返回用戶對象
Article?article?=?new?Article(rs.getInt(“id“)?rs.getString(“uname“)rs.getString(“title“)?rs.getString(“type“)
rs.getString(“content“)?rs.getString(“time“));
conn.commit();
return?article;
}

}?catch?(Exception?e)?{
e.printStackTrace();
}?finally?{
//關閉連接
//DBconnection.close(rs?ps?conn);
}
return?null;
}

//?查詢所有文章
public?List
?getAllarticles()?{
List
?list?=?new?ArrayList
();
ResultSet?rs?=?null;
PreparedStatement?ps?=?null;
Connection?conn?=?null;
String?sql?=?“select?idunametitletypecontenttime?from?article?“;
try?{
conn?=?DBconnection.getConnection();
ps?=?conn.prepareStatement(sql);
rs?=?ps.executeQuery();
//?循環添加用戶對象
while?(rs.next())?{
Article?article?=?new?Article(rs.getInt(“id“)rs.getString(“uname“)?rs.getString(“title“)?rs.getString(“type“)
rs.getString(“content“)?rs.getString(“time“));
list.add(article);
}
conn.commit();
}?catch?(Exception?e)?{
e.printStackTrace();
}?finally?{
//DBconnection.close(rs?ps?conn);
}
return?list;
}

//?查詢所有文章(分頁)
public?List
?getAllarticles(int?startIndexint?pageSize)?{
List
?list?=?new?ArrayLis

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????1009??2018-12-10?22:23??newBBS\.classpath

?????文件????????906??2018-11-27?22:10??newBBS\.project

?????文件????????567??2018-11-27?22:10??newBBS\.settings\.jsdtscope

?????文件?????????57??2018-11-29?10:36??newBBS\.settings\org.eclipse.core.resources.prefs

?????文件????????364??2018-11-30?09:24??newBBS\.settings\org.eclipse.jdt.core.prefs

?????文件????????470??2018-11-27?22:10??newBBS\.settings\org.eclipse.wst.common.component

?????文件????????345??2018-12-10?22:23??newBBS\.settings\org.eclipse.wst.common.project.facet.core.xml

?????文件?????????49??2018-11-27?22:10??newBBS\.settings\org.eclipse.wst.jsdt.ui.superType.container

?????文件??????????6??2018-11-27?22:10??newBBS\.settings\org.eclipse.wst.jsdt.ui.superType.name

?????文件???????5521??2018-12-13?10:36??newBBS\bbs.sql

?????文件???????5919??2018-12-19?22:23??newBBS\build\classes\com\bbs\dao\articleDao.class

?????文件???????3830??2018-12-19?22:23??newBBS\build\classes\com\bbs\dao\commentDao.class

?????文件???????5727??2018-12-19?22:23??newBBS\build\classes\com\bbs\dao\userDao.class

?????文件????????153??2018-11-28?22:40??newBBS\build\classes\com\bbs\DBconfig.properties

?????文件???????1070??2018-12-19?22:23??newBBS\build\classes\com\bbs\entity\Admin.class

?????文件???????1745??2018-12-19?22:23??newBBS\build\classes\com\bbs\entity\Article.class

?????文件???????1491??2018-12-19?22:23??newBBS\build\classes\com\bbs\entity\Comment.class

?????文件???????1509??2018-12-19?22:23??newBBS\build\classes\com\bbs\entity\User.class

?????文件???????1720??2018-12-19?22:23??newBBS\build\classes\com\bbs\entity\vo\comment_userVO.class

?????文件???????1875??2018-12-19?22:23??newBBS\build\classes\com\bbs\service\articleService.class

?????文件???????1071??2018-12-19?22:23??newBBS\build\classes\com\bbs\service\commentService.class

?????文件???????2260??2018-12-19?22:23??newBBS\build\classes\com\bbs\service\userService.class

?????文件???????2274??2018-12-19?22:23??newBBS\build\classes\com\bbs\servlet\adminLogin.class

?????文件???????1323??2018-12-19?22:23??newBBS\build\classes\com\bbs\servlet\adminLogout.class

?????文件???????2679??2018-12-19?22:23??newBBS\build\classes\com\bbs\servlet\articleContent.class

?????文件???????2247??2018-12-19?22:23??newBBS\build\classes\com\bbs\servlet\changeAuthorization.class

?????文件???????1980??2018-12-19?22:23??newBBS\build\classes\com\bbs\servlet\deleteComment.class

?????文件???????1793??2018-12-19?22:23??newBBS\build\classes\com\bbs\servlet\deleteData.class

?????文件???????1700??2018-12-19?22:23??newBBS\build\classes\com\bbs\servlet\filter0_encodingFilter.class

?????文件???????2780??2018-12-19?22:23??newBBS\build\classes\com\bbs\servlet\filter1_initFilter.class

............此處省略432個文件信息

評論

共有 條評論