session.createSQLQuery.转载对原生SQL查询执行的控制是通过SQLQuery接口进行的,通过执行Session.createSQLQuery()获取这个接口。下面来描述如何使用这个API进行查询。1.标量查询(Scalar
queries)最基本的SQL查询就是获得一个标量(数...
分类:
数据库 时间:
2014-05-05 23:26:26
阅读次数:
593
在hibernate中使用annotation非常方便我们的web开发.下面对比一下使用annotation和和不使用之间的差别吧. 首先,无论你是否使用annotation,都必须有hibernate的配置文件(hibernate.cfg.xml),这个在hibernate的自带的手册中能找到,....
分类:
系统相关 时间:
2014-05-05 23:15:49
阅读次数:
443
1、One To One 单相背景: 古代一个老婆
只能关联一个老公husband.javapackage com.rhythmk.model;public class husband { public
Integer getHusbandId() { return husbandId; }...
分类:
系统相关 时间:
2014-05-05 23:06:28
阅读次数:
516
Given an unsorted array of integers, find the
length of the longest consecutive elements sequence.For example,Given [100, 4,
200, 1, 3, 2],The longest...
分类:
其他好文 时间:
2014-05-05 23:01:41
阅读次数:
374
Problem
Link:http://oj.leetcode.com/problems/longest-consecutive-sequence/This problem
is a classical problem where we can reduce the running time by ...
分类:
其他好文 时间:
2014-05-05 22:55:22
阅读次数:
552
在做hibernate修改和删除的时候,可能会遇到
org.hibernate.NonUniqueObjectException异常,a different object with the same
identifier value was already associated with the s...
分类:
系统相关 时间:
2014-05-05 22:27:35
阅读次数:
361
开发过程中发现SSH2的开发模型其实类似于经典的三层模式,在每一层中分别添加了不同的框架,显示层使用的是Struts2进行配置的,业务逻辑层使用的是Spring配置,数据持久层则采用的是Hibernate,开发模式简单易懂,接下来将会分别从三层着手讨论每一层的运行内容。...
分类:
其他好文 时间:
2014-05-04 00:22:56
阅读次数:
448
grails开发项目应该还是比较快的,至少配置没有SSH那么繁琐,节省出来的时间可以用在业务逻辑上。grails在简化的同时依然保留了hibernate、spring的特点例如hql、Criteria等。...
分类:
其他好文 时间:
2014-05-04 00:18:37
阅读次数:
351
Max Sum of Max-K-sub-sequence
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 5673 Accepted Submission(s): 2049
Problem Description...
分类:
其他好文 时间:
2014-05-03 16:30:10
阅读次数:
412
模块“市”的设计与加入
现在重复加入“省”模块的过程,来加入市的模块。
1、建立数据表CityCREATE TABLE [dbo].[City](
[tf_cityId] [nvarchar](4) COLLATE Chinese_PRC_CI_AS NOT NULL,
[tf_provinceId] [nvarchar](2) COLLATE Chinese_PRC_...
分类:
其他好文 时间:
2014-05-03 16:02:29
阅读次数:
293