上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页
摘要: 执行第一句语句如下 此时得到前两页中的数据,执行第二句: 此时得到前两页中的数据的后两行也就是第二页,执行第三句: 此时分页实现 阅读全文
posted @ 2016-11-09 11:21 丶疏影横斜 阅读(4021) 评论(0) 推荐(0) 编辑
摘要: Hibernate查询语言(HQL)是一种面向对象的查询语言,类似于SQL,但不是对表和列操作,HQL适用于持久对象和它们的属性。 HQL查询由Hibernate转换成传统的SQL查询,这在圈上的数据库执行操作。 虽然可以直接使用SQL语句和Hibernate使用原生SQL,但建议使用HQL尽可能避 阅读全文
posted @ 2016-11-09 09:39 丶疏影横斜 阅读(4068) 评论(0) 推荐(1) 编辑
摘要: Insert title here 访问 Insert title here 阅读全文
posted @ 2016-11-07 18:15 丶疏影横斜 阅读(499) 评论(0) 推荐(0) 编辑
摘要: package com.shuyinghengxie.doudou; import static org.junit.Assert.*; import org.hibernate.SessionFactory; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg... 阅读全文
posted @ 2016-11-07 18:06 丶疏影横斜 阅读(148) 评论(0) 推荐(0) 编辑
摘要: // 附 : 常用的正则表达式: // 匹配特定数字: // ^[1-9]d*$ //匹配正整数 // ^-[1-9]d*$ //匹配负整数 // ^-?[1-9]d*$ //匹配整数 // ^[1-9]d*|0$ //匹配非负整数(正整数 + 0) // ^-[1-9]d*|0$ //匹配非正整数(负整数 + 0) // ^[1-9... 阅读全文
posted @ 2016-11-07 09:36 丶疏影横斜 阅读(232) 评论(0) 推荐(0) 编辑
摘要: /** * 验证验证输入字母 * * @param 待验证的字符串 * @return 如果是符合格式的字符串,返回 true ,否则为 false */ public static boolean IsLetter(String str) { String regex = "^[A-Za-z]+$"; return match(regex, str); } /** * 验证验证输入汉字 ... 阅读全文
posted @ 2016-11-07 09:25 丶疏影横斜 阅读(179) 评论(0) 推荐(0) 编辑
摘要: /** * @param regex * 正则表达式字符串 * @param str * 要匹配的字符串 * @return 如果str 符合 regex的正则表达式格式,返回true, 否则返回 false; */ private static boolean match(String regex, String str) { Pattern pattern = Pattern.compile... 阅读全文
posted @ 2016-11-07 09:25 丶疏影横斜 阅读(209) 评论(0) 推荐(0) 编辑
摘要: /** * 验证大写字母 * * @param 待验证的字符串 * @return 如果是符合格式的字符串,返回 true ,否则为 false */ public static boolean IsUpChar(String str) { String regex = "^[A-Z]+$"; return match(regex, str); } /** * 验证小写字母 * * @p... 阅读全文
posted @ 2016-11-07 09:16 丶疏影横斜 阅读(436) 评论(0) 推荐(0) 编辑
摘要: /** * 验证非零的正整数 * * @param 待验证的字符串 * @return 如果是符合格式的字符串,返回 true ,否则为 false */ public static boolean IsIntNumber(String str) { String regex = "^\\+?[1-9][0-9]*$"; return match(regex, str); } 阅读全文
posted @ 2016-11-07 09:15 丶疏影横斜 阅读(270) 评论(0) 推荐(0) 编辑
摘要: /** * 验证数字输入 * * @param 待验证的字符串 * @return 如果是符合格式的字符串,返回 true ,否则为 false */ public static boolean IsNumber(String str) { String regex = "^[0-9]*$"; return match(regex, str); } 阅读全文
posted @ 2016-11-07 09:14 丶疏影横斜 阅读(206) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页