资源简介
博客系统(sshjavaweb).zip

代码片段和文件信息
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not write to the Free Software
* Foundation Inc. 59 Temple Place - Suite 330 Boston MA 02111-1307 USA.
*/
package dlog4j;
import java.util.Iterator;
import java.util.List;
import dlog4j.formbean.CategoryForm;
import dlog4j.formbean.SiteForm;
import dlog4j.formbean.UserForm;
import dlog4j.security.DlogRole;
import net.sf.hibernate.Criteria;
import net.sf.hibernate.HibernateException;
import net.sf.hibernate.Session;
import net.sf.hibernate.expression.expression;
import net.sf.hibernate.expression.Order;
/**
* 日记分类管理器
* @author Liudong
*/
public class CategoryManager {
/**
* 读取日记分类的详细信息(管理级别的方法)
* DlogCategoryAction的删除和更新分类方法用到该方法
* @param ssn
* @param site
* @param loginUser
* @param cat_id
* @return
* @throws HibernateException
*/
public static CategoryForm getCategory(Session ssn SiteForm site int cat_id)
throws HibernateException {
Criteria crit = ssn.createCriteria(CategoryForm.class);
crit = crit.add(expression.eq(“site.id“ new Integer(site.getId())));
crit = crit.add(expression.eq(“id“ new Integer(cat_id)));
try {
List cats = crit.list();
if(cats.size()>0)
return (CategoryForm)cats.get(0);
}catch(HibernateException e) {}
return null;
}
/**
* 查询指定站点的所有日记分类(管理级别的方法)
* DlogCategoryAction: doCreateCategory doMoveDown doMoveUp
* @param ssn
* @param site
* @return
* @throws SQLException
* @throws HibernateException
*/
public static List listCategories(Session ssn SiteForm site)
throws HibernateException {
Criteria crit = ssn.createCriteria(CategoryForm.class);
crit = crit.add(expression.eq(“site.id“ new Integer(site.getId())));
crit = crit.addOrder(Order.asc(“order“));
return crit.list();
}
/**
* 查询某个用户可见的所有日记分类用于浏览日记而非添加日记
* CategoryTag.java (一般用途)
* @param ssn
* @param site
* @return
* @throws SQLException
* @throws HibernateException
*/
public static List listCategories(Session ssn SiteForm site UserForm loginUser)
throws HibernateException {
Criteria crit = ssn.createCriteria(CategoryForm.class);
crit = crit.add(expression.eq(“site.id“ new Integer(site.getId())));
crit = crit.addOrder(Order.asc(“order“));
List cats = crit.list();
Iterator icats = cats.iter
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-07-19 23:03 博客系统(struts+hibernate+spring)\
目录 0 2019-07-19 23:03 博客系统(struts+hibernate+spring)\博客\
目录 0 2019-07-19 23:03 博客系统(struts+hibernate+spring)\博客\myBlog\
目录 0 2019-07-19 23:03 博客系统(struts+hibernate+spring)\博客\myBlog\blog\
文件 2569 2004-11-11 16:24 博客系统(struts+hibernate+spring)\博客\myBlog\blog\atom.jsp
文件 2191 2004-11-11 16:23 博客系统(struts+hibernate+spring)\博客\myBlog\blog\rss1.jsp
文件 2480 2004-11-11 16:24 博客系统(struts+hibernate+spring)\博客\myBlog\blog\rss2.jsp
目录 0 2019-07-19 23:03 博客系统(struts+hibernate+spring)\博客\myBlog\css\
文件 2679 2004-10-21 11:00 博客系统(struts+hibernate+spring)\博客\myBlog\css\rss.css
文件 6426 2004-11-21 17:51 博客系统(struts+hibernate+spring)\博客\myBlog\css\st
目录 0 2019-07-19 23:03 博客系统(struts+hibernate+spring)\博客\myBlog\faces\
文件 372 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\01.gif
文件 374 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\02.gif
文件 358 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\03.gif
文件 347 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\04.gif
文件 373 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\05.gif
文件 374 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\06.gif
文件 357 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\07.gif
文件 363 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\08.gif
文件 364 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\09.gif
文件 345 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\10.gif
文件 355 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\11.gif
文件 329 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\12.gif
文件 174 2004-03-12 14:55 博客系统(struts+hibernate+spring)\博客\myBlog\faces\13.gif
文件 361 2004-03-12 14:55 博客系统(struts+hibernate+spring)\博客\myBlog\faces\14.gif
文件 359 2004-03-12 14:55 博客系统(struts+hibernate+spring)\博客\myBlog\faces\15.gif
文件 1688 2004-09-09 15:57 博客系统(struts+hibernate+spring)\博客\myBlog\faces\16.gif
文件 391 2004-09-09 15:57 博客系统(struts+hibernate+spring)\博客\myBlog\faces\17.gif
文件 2866 2004-09-09 15:57 博客系统(struts+hibernate+spring)\博客\myBlog\faces\18.gif
文件 208 2004-02-10 09:13 博客系统(struts+hibernate+spring)\博客\myBlog\faces\blueidea.gif
文件 294 2004-02-14 04:54 博客系统(struts+hibernate+spring)\博客\myBlog\faces\face1.gif
............此处省略1237个文件信息
- 上一篇:javaPOI ssm导入导出
- 下一篇:java课程设计——记忆测试系统和课程报告
相关资源
- java 毕业设计 进销存管理系统 源码
- Android分区工具包
- 药品进销存管理系统(论文范文_JSP
- Java写的一个简单的字体更改程序
- 尚硅谷Java视频Java8新特性视频教程
- 关于CommVault统一数据管理方案
- 基于CenGRP3.0 烟草行业企业整合解决方
- java并发编程实战高清版pdf
- java并发编程实战pdf
- 实现jsp页面二级下拉框联动,实时读
- 北师大学珠海校区实施SunONE数字校园
- Java-核心技术-36-讲李运华完.pdf
- 小工具,解决oschina码云svn文件夹不能
- Sun公司为中国客户提供Java架构咨询与
- 美国Holy Cross 医院使用Sun 解决方案对
- 立邦漆公司向Sun架构的移植预期使总
- 通用电气公司基于Sun 平台部署其全球
- jbpm(juel-api.jar)
- jstl 和 standard jar 包
- 验证全志R18的LCD+HDMI双屏异显
- jsp网站模板
- 《21天学通SQL Server》源码
- JSP多文件上传同时上传
- J2EE服务支持平台下融通供应商服务系
- Data Structures and Algorithm Analysis in Java
- Thinking In Java第五版
- think in java中文第五版
- JAVA JDK百度网盘地址
- jdk1.9安装包
- NCC-OpenAPI文档.zip
评论
共有 条评论