| java.lang.Object dlog4j.ManagerBase dlog4j.LogManager
LogManager | public class LogManager extends ManagerBase (Code) | | author: Liudong author: 日记管理器 |
Method Summary | |
protected static Calendar | buildCalendar(int year, int month, int date, boolean clearTime) | public static DraftForm | getDraft(Session ssn, SiteForm site, int draft_id) | public static int | getLogCount(Session ssn, int cat_id) | public static int | getLogCount(Session ssn, SiteForm site, UserForm loginUser, int cat_id, int userid, int year, int month, int date) | public static LogForm | getLogForm(Session ssn, SiteForm site, UserForm loginUser, int log_id) | public static int | getSearchLogCount(Session ssn, SiteForm site, UserForm loginUser, int cat_id, String search) | public static List | listDrafts(Session ssn, SiteForm site, UserForm loginUser) | public static List | listLogs(Session ssn, SiteForm site, UserForm loginUser, int cat_id, int userid, int from, int count, String orderField, int year, int month, int date) | protected static void | resetCalendar(Calendar cal) | public static List | searchAllLogs(Session ssn, SiteForm site, UserForm loginUser, int cat_id, String search, String orderField) | public static List | searchLogs(Session ssn, SiteForm site, UserForm loginUser, int cat_id, String search, String orderField, int from, int count) | public static int[] | statLogs(Session ssn, SiteForm site, UserForm loginUser, int year, int month) | public static int[] | statLogs(Session ssn, SiteForm site, UserForm loginUser, Calendar month) | public static int[] | statLogs(Connection conn, SiteForm site, UserForm loginUser, Calendar month) |
buildCalendar | protected static Calendar buildCalendar(int year, int month, int date, boolean clearTime)(Code) | | 根据参数构建一个日历对象实例
Parameters: year - Parameters: month - 1-12 Parameters: date - Parameters: clearTime - 是否清除时间字段 |
getDraft | public static DraftForm getDraft(Session ssn, SiteForm site, int draft_id) throws HibernateException(Code) | | 读取草稿的详细信息
Parameters: ssn - Parameters: site - Parameters: draft_id - throws: HibernateException - |
getLogCount | public static int getLogCount(Session ssn, int cat_id) throws HibernateException(Code) | | 获取某个日记分类下的日记数
Parameters: ssn - Parameters: cat_id - throws: HibernateException - |
getLogCount | public static int getLogCount(Session ssn, SiteForm site, UserForm loginUser, int cat_id, int userid, int year, int month, int date) throws HibernateException(Code) | | 获取日记总数
Parameters: ssn - Parameters: site - Parameters: cat_id - 指定某个日记分类 |
getLogForm | public static LogForm getLogForm(Session ssn, SiteForm site, UserForm loginUser, int log_id)(Code) | | 读取指定的日记信息
Parameters: ssn - Parameters: site - Parameters: loginUser - Parameters: log_id - |
getSearchLogCount | public static int getSearchLogCount(Session ssn, SiteForm site, UserForm loginUser, int cat_id, String search) throws HibernateException, IOException, ParseException(Code) | | 得到查询出的日记总数
Parameters: ssn - Parameters: site - Parameters: loginUser - Parameters: cat_id - Parameters: search - throws: HibernateException - throws: IOException - throws: ParseException - |
listDrafts | public static List listDrafts(Session ssn, SiteForm site, UserForm loginUser) throws HibernateException(Code) | | 列出某个网站的所有草稿信息
Parameters: ssn - Parameters: site - throws: HibernateException - |
listLogs | public static List listLogs(Session ssn, SiteForm site, UserForm loginUser, int cat_id, int userid, int from, int count, String orderField, int year, int month, int date) throws HibernateException(Code) | | 列出某个分类下的日志
Parameters: ssn - Parameters: site - Parameters: cat_id - Parameters: orderField - throws: HibernateException - |
resetCalendar | protected static void resetCalendar(Calendar cal)(Code) | | 清除日历的时间字段
Parameters: cal - |
searchAllLogs | public static List searchAllLogs(Session ssn, SiteForm site, UserForm loginUser, int cat_id, String search, String orderField) throws HibernateException, IOException, ParseException(Code) | | 搜索符合条件的所有日记
Parameters: ssn - Parameters: site - Parameters: loginUser - Parameters: cat_id - Parameters: search - throws: HibernateException - throws: IOException - throws: ParseException - |
searchLogs | public static List searchLogs(Session ssn, SiteForm site, UserForm loginUser, int cat_id, String search, String orderField, int from, int count) throws HibernateException, IOException, ParseException(Code) | | 日记的搜索
Parameters: ssn - Parameters: site - Parameters: loginUser - Parameters: cat_id - Parameters: search - Parameters: from - Parameters: count - throws: HibernateException - |
statLogs | public static int[] statLogs(Session ssn, SiteForm site, UserForm loginUser, int year, int month) throws HibernateException(Code) | | 统计出指定月份每天的日记篇数
使用SQL查询方式避免加载日记内容以提供查询速度
Parameters: ssn - Parameters: site - Parameters: year - Parameters: month - (1-12) throws: HibernateException - |
statLogs | public static int[] statLogs(Session ssn, SiteForm site, UserForm loginUser, Calendar month) throws HibernateException(Code) | | 统计指定月份每天的日记数(使用Hibernate查询方式)
使用SQL查询方式避免加载日记内容以提供查询速度
Parameters: ssn - Parameters: site - Parameters: loginUser - Parameters: month - throws: HibernateException - |
statLogs | public static int[] statLogs(Connection conn, SiteForm site, UserForm loginUser, Calendar month) throws SQLException(Code) | | 统计指定月份每天的日记数(使用SQL查询方式)
Parameters: ssn - Parameters: site - Parameters: loginUser - Parameters: month - throws: HibernateException - |
|
|