/**
* Copyright (C) 2001 Yasna.com. All rights reserved.
*
* ===================================================================
* The Apache Software License, Version 1.1
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by
* Yasna.com (http://www.yasna.com)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Yazd" and "Yasna.com" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please
* contact yazd@yasna.com.
*
* 5. Products derived from this software may not be called "Yazd",
* nor may "Yazd" appear in their name, without prior written
* permission of Yasna.com.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL YASNA.COM OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of Yasna.com. For more information
* on Yasna.com, please see <http://www.yasna.com>.
*/
/**
* Copyright (C) 2000 CoolServlets.com. All rights reserved.
*
* ===================================================================
* The Apache Software License, Version 1.1
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by
* CoolServlets.com (http://www.coolservlets.com)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Jive" and "CoolServlets.com" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please
* contact webmaster@coolservlets.com.
*
* 5. Products derived from this software may not be called "Jive",
* nor may "Jive" appear in their name, without prior written
* permission of CoolServlets.com.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL COOLSERVLETS.COM OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of CoolServlets.com. For more information
* on CoolServlets.com, please see <http://www.coolservlets.com>.
*/
package com.Yasna.forum.database;
import java.util.Iterator;
import java.util.Enumeration;
import java.util.Properties;
import java.util.ArrayList;
import java.util.Date;
import java.sql.*;
import java.io.*;
import com.Yasna.forum.*;
import com.Yasna.forum.filter.*;
import com.Yasna.util.Cache;
import com.Yasna.util.Cacheable;
import com.Yasna.util.CacheSizes;
/**
* Database implementation of the Forum interface. It loads and stores forum
* information from a a database.
*
* @see Forum
*/
public class DbForum implements Forum, Cacheable {
/** DATABASE QUERIES **/
private static final String ADD_THREAD =
"UPDATE yazdThread set forumID=? WHERE threadID=?";
protected static final String DELETE_THREAD = "DELETE FROM yazdThread WHERE threadID=?";
private static final String THREAD_COUNT =
"SELECT count(*) FROM yazdThread WHERE forumID=?";
private static final String MESSAGE_COUNT =
"SELECT count(*) FROM yazdThread, yazdMessage WHERE " +
"yazdThread.forumID=? AND yazdThread.threadID=yazdMessage.threadID";
private static final String ADD_USER_PERM =
"INSERT INTO yazdUserPerm(forumID,userID,permission) VALUES(?,?,?)";
private static final String REMOVE_USER_PERM =
"DELETE FROM yazdUserPerm WHERE forumID=? AND userID=? AND permission=?";
private static final String USERS_WITH_PERM =
"SELECT DISTINCT userID FROM yazdUserPerm WHERE forumID=? AND permission=?";
private static final String ADD_GROUP_PERM =
"INSERT INTO yazdGroupPerm(forumID,groupID,permission) VALUES(?,?,?)";
private static final String REMOVE_GROUP_PERM =
"DELETE FROM yazdGroupPerm WHERE forumID=? AND groupID=? AND permission=?";
private static final String GROUPS_WITH_PERM =
"SELECT DISTINCT groupID FROM yazdGroupPerm WHERE forumID=? AND permission=?";
private static final String LOAD_FILTERS =
"SELECT filterObject, filterIndex FROM yazdFilter WHERE forumID=? ORDER BY filterIndex ASC";
private static final String DELETE_FILTERS = "DELETE FROM yazdFilter WHERE forumID=?";
private static final String ADD_FILTER =
"INSERT INTO yazdFilter(forumID,filterIndex,filterObject) VALUES(?,?,?)";
private static final String LOAD_PROPERTIES =
"SELECT name, propValue FROM yazdForumProp WHERE forumID=?";
private static final String DELETE_PROPERTIES =
"DELETE FROM yazdForumProp WHERE forumID=?";
private static final String INSERT_PROPERTY =
"INSERT INTO yazdForumProp(forumID,name,propValue) VALUES(?,?,?)";
private static final String LOAD_FORUM_BY_ID =
"SELECT forumID, name, description, creationDate, modifiedDate, moderated FROM yazdForum WHERE forumID=?";
private static final String LOAD_FORUM_BY_NAME =
"S
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Jive论坛 (398个子文件)
ant 1KB
global.css 2KB
global.css 1KB
global.css 1KB
global.css 881B
CoolForum.gif 16KB
back.gif 11KB
title_beta2.gif 5KB
title_beta.gif 5KB
back_tb.gif 5KB
back_blue.gif 3KB
header.gif 3KB
install.gif 3KB
backleft_tb.gif 2KB
cache.gif 2KB
tabs_global.gif 1KB
tabs_forum.gif 1KB
search_tb_right.gif 1KB
Yazdheader.gif 1KB
setup.gif 1KB
prev.gif 1014B
next.gif 1014B
tabs_forum_on.gif 1000B
logout.gif 994B
tabs_global_on.gif 952B
edit_button.gif 942B
t_arrow.gif 873B
plus.gif 845B
login.gif 845B
minus.gif 840B
post_tb.gif 740B
button_system_on.gif 720B
button_system_off.gif 720B
button_forum_off.gif 715B
button_forum_on.gif 715B
loginbacktop.gif 707B
user.gif 595B
tabs_forum_off.gif 580B
tabs_global_off.gif 533B
doc_green.gif 493B
doc_yellow.gif 493B
doc_white.gif 493B
title.gif 458B
read_tb.gif 433B
search_ve.gif 400B
search_tb_left.gif 397B
search.gif 380B
search_j.gif 302B
bang.gif 301B
bang.gif 301B
new.gif 301B
x.gif 286B
check.gif 284B
check.gif 284B
search_blue_i.gif 284B
search_red_i.gif 284B
loginbacktop2.gif 279B
circle.gif 256B
reply.gif 244B
postnewmsg.gif 237B
searchButton.gif 227B
next.gif 225B
nextOff.gif 225B
backOff.gif 222B
back.gif 222B
replyOff.gif 219B
reply.gif 193B
reply_button.gif 149B
remove.gif 126B
shadowBack.gif 118B
tabs_padding.gif 117B
edit.gif 117B
arrowRed.gif 98B
shadows.gif 96B
x.gif 81B
t3.gif 78B
lside.gif 76B
t1.gif 76B
t2.gif 70B
shadowBottom.gif 68B
rside.gif 66B
backleft.gif 64B
t0.gif 58B
arrow-down.gif 56B
arrow-up.gif 55B
blank.gif 43B
blank.gif 43B
blank.gif 43B
blank.gif 43B
t_new.gif 43B
vertLine.gif 38B
bluedot.gif 35B
bluedot.gif 35B
说明.htm 4KB
shadow.html 267B
line.html 86B
webserver.jar 397KB
ant.jar 289KB
yazd.jar 256KB
jasper.jar 205KB
共 398 条
- 1
- 2
- 3
- 4
资源评论
- xtqve2011-10-26少了个JAR包呀~~~~
- bejixue_3142012-12-02资源不能运行
- hatom2012-08-03就是不能运行 。。。
Domo007
- 粉丝: 3
- 资源: 20
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功