freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于jsp新聞發(fā)布系統(tǒng)之登錄模塊與后臺(tái)一級(jí)新聞管理模塊的設(shè)計(jì)與實(shí)現(xiàn)畢業(yè)論文-資料下載頁(yè)

2024-11-17 21:53本頁(yè)面

【導(dǎo)讀】要渠道,正以一種前所未有的沖擊力影響著人類的活動(dòng)。它在人們政治、經(jīng)濟(jì)、生活。等各個(gè)方面發(fā)揮著重要的作用。因此網(wǎng)站建設(shè)在Inter應(yīng)用上的地位顯而易見(jiàn),它已成為政府、企事業(yè)單位信息化建設(shè)中的重要組成部分,從而倍受人們的重視。5.采用MVC模式,把交互系統(tǒng)的組成分解成模型、視圖、控制器三部分。6.用戶組件和樣式的設(shè)計(jì)。建立統(tǒng)一的樣式文件進(jìn)行管理。7.實(shí)現(xiàn)以下主要功能:注冊(cè)登錄、前臺(tái)新聞瀏覽管理、后臺(tái)新聞管理等。分步調(diào)試,綜合調(diào)試。

  

【正文】 含屬性: ID、 名稱、創(chuàng)建者、創(chuàng)建時(shí)間 代碼: package db。 import 。 public class FirstLevelTitle { private int id。 //ID private String titleName。 //名稱 private String creator。 //創(chuàng)建者 private Date createTime。 //創(chuàng)建時(shí)間 /* * 使用構(gòu)造方法進(jìn)行初始 化 */ public FirstLevelTitle() { } public FirstLevelTitle(int id, String titleName, String creator,Date createTime) { = id。 = titleName。 = creator。 = createTime。 33 } public int getId() { return 。 } public String getTitleName() { return 。 } public String getCreator() { return 。 } public Date getCreateTime() { return 。 } public void setId(int paramId) { = paramId。 } public void setTitleName(String paramTitleName) { = paramTitleName。 } public void setCreator(String paramCreator) { = paramCreator。 } public void setCreateTime(Date paramCreateTime) { = paramCreateTime。 } } 創(chuàng)建數(shù)據(jù)訪問(wèn)類: FirstLeveTitleDbOpreation 建立方法 getNewId():用來(lái)獲取新聞一級(jí)標(biāo)題表中最大的 ID,并對(duì)它加一,作為新的一級(jí)標(biāo)題的 ID; 建立方法 insertOneRecord(FirstLevelTitle fTitle):用來(lái)向數(shù)據(jù)庫(kù)中插入一條新聞 一級(jí)標(biāo)題; 包含方法 getAllFirstLevelTitleList:用來(lái)查詢數(shù)據(jù)庫(kù),并返回所有的新聞一級(jí)標(biāo)題。 代碼片斷 ArrayList list = new ArrayList()。 34 Connection dbConnection = null。 PreparedStatement pStatement = null。 ResultSet res = null。 注: 定義類中需要的屬性 代碼 : package db。 import .*。 import .*。 import 。 import 。 import 。 import 。 import 。 public class FirstLeveTitleDbOpreation { public List getAllFirstLevelTitleList() { ArrayList list = new ArrayList()。 Connection dbConnection = null。 PreparedStatement pStatement = null。 ResultSet res = null。 try { dbConnection = ()。 String strSql = select * from FirstLevelTitle order by CreateTime desc。 pStatement = (strSql)。 res = ()。 while (()) { int id = (id)。 String title = (TitleName)。 String creater = (Creator)。 Date time = (CreateTime)。 //把各屬性的值封裝在一個(gè) FirstLevelTitle 對(duì)象中 FirstLevelTitle fTitle = new FirstLevelTitle(id, title,creater, time)。 //把各 FirstLevelTitle 對(duì)象依次添加進(jìn)集 合中 (fTitle)。 } } catch (SQLException sqlE) { 35 ()。 } finally { (res)。 (pStatement)。 (dbConnection)。 } return list。 } public int insertOneRecord(FirstLevelTitle fTitle) { int result = 0。 Connection con = null。 PreparedStatement pStatement = null。 try { SimpleDateFormat HMFromat = new SimpleDateFormat(yyyyMMdd hh:mm:ss)。 String strCurrentTime = ( new Date())。 con = ()。 String strSql = insert into FirstLevelTitle values(?,?,?,?)。 pStatement = (strSql)。 (1, getNewId())。 (2, ())。 (3, ())。 (4, strCurrentTime)。 result = ()。 } catch (SQLException sqlE) { ()。 } finally { (pStatement)。 (con)。 } return result。 } private int getNewId() { int id = 0。 36 Connection con = null。 PreparedStatement pstmt = null。 ResultSet resSet = null。 try { con = ()。 String sqlStr = select max(id) from FirstLevelTitle 。 pstmt = (sqlStr)。 resSet = ()。 if (()) { id = (1)。 } }catch (Exception e) { ()。 }finally { (resSet)。 (pstmt)。 (con)。 } return id + 1。 } public static void main(String[] args) { FirstLeveTitleDbOpreation abc=new FirstLeveTitleDbOpreation()。 FirstLevelTitle fTitle=new FirstLevelTitle(9,多媒體 ,管理員 ,new Date())。 (fTitle)。 (())。 } } 用戶 : : package db。 public class User { private String name。// 用戶名 private String password。// 密碼 /** * 構(gòu)造函數(shù) 37 * * @param name 用戶名 * @param password 密碼 */ public User(String name, String password) { = name。 = password。 } /** * 返回用戶名 */ public String getName() { return name。 } /** * 返回密碼 */ public String getPassword() { return password。 } /** * 設(shè)定用戶名 * @param name */ public void setName(String name) { = name。 } /** * 設(shè)定密碼 * @param password */ public void setPassword(String password) { = password。 } } 38 : package db。 import .*。 import 。 import 。 public class NewsFirstTitleDB2 { public static void main(String[] args) { Connection con = null。 PreparedStatement pStatement = null。 try { SimpleDateFormat hmFromat = new SimpleDateFormat( yyyyMMdd hh:mm:ss)。 con = ()。 String strSql = insert into FirstLevelTitle values(?,?,?,?)。 pStatement = (strSql)。 (1, 5)。 (2, 養(yǎng)生 )。 (3, 管理員 )。 (4, (new Date()))。 ()。 } catch (SQLException sqlE) { ()。 } finally { (pStatement)。 (con)。 } } } package db。 import .*。 import .*。 import 。 import 。 import 。 39 import 。 public class CopyOfFirstLeveTitleDbOpreation { public List getAllFirstLevelTitleList() { ArrayList list = new ArrayList()。 Connection dbConnection = null。 PreparedStatement pStatement = null。 ResultSet res = null。 try { dbConnection = ()。 String strSql = select * from FirstLevelTitle order by CreateTime desc。 pStatement = (strSql)。 res = ()。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1