1 public List findByCondition(Student stu) { 2 StringBuilder sb=new StringBuilder("from Student where 1=1"); 3 List params=new ArrayList(); ...
分类:
Web程序 时间:
2014-10-30 11:00:42
阅读次数:
177
【hibernate】之关于关联映射的综合应用1、关联映射如何处理业务逻辑2、如何指定中间表3、如何进行级联操作4、如何解决Hibenrate建表过程中主键错乱问题现在有三张表Student(学生表),Course(课程表),Score(学生,课程,分数,表)那么我们分析业务逻辑可知,学生和课程是多对多..
分类:
Web程序 时间:
2014-10-29 19:46:09
阅读次数:
305
1. 2014 10 28 leavey 2 level one black man with a ring seems not a student sitting near me without anything to do just looking at the website There is...
分类:
其他好文 时间:
2014-10-29 16:32:17
阅读次数:
198
select?cid.course_id,cid.student_id,SUM(TIME_TO_SEC(STR_TO_DATE(cid.total_time,‘%h:%i:%s‘)))?from?zzxd_top_lms.cmi_item_data?cid?group?by?cid.course_id,cid.student_id time_to_sec 将time类型转...
分类:
其他好文 时间:
2014-10-29 13:13:41
阅读次数:
125
--直接调用下面的语句直接使用--插入测试数据200w条,可能会很久create table Student( Id int PRIMARY KEY identity(1,1), Name nvarchar(50), Age int) godeclare @i intset @i=1while @i...
分类:
其他好文 时间:
2014-10-29 10:39:10
阅读次数:
237
在Struts中很典型的特点就是使用了ActionForm来搜集表单数据,但是搜集到的表单数据全部都是String类型的,如果我们直接拿来使用我们会面临一个很麻烦的问题就是频繁的类型装换。Struts中使用了BeanUtils来使我们从繁重的体力劳动中解脱出来。
BeanUtils的工作原理:
我们通过一个简单的例子来了解一下他最基本的使用,首先建立一个实体类Student...
分类:
其他好文 时间:
2014-10-29 01:59:41
阅读次数:
197
一.添加新数据! 插入单行记录 1.create table box( name varchar(30) not null, id int not null primary key, student varchar(20), gender char(2) default 0 comment ...
分类:
数据库 时间:
2014-10-29 01:52:39
阅读次数:
184
/* 学生表(t_student)create table t_student( _id int primary key auto_increment, _name varchar(50), -- 名字 _age int, -- 年龄 _code varchar(50), -- 编号 _sex .....
分类:
数据库 时间:
2014-10-29 01:38:53
阅读次数:
233
对象的转型分为向上转型和向下转型向上转型:将子类的对象赋值给父类的引用,如Student s = new Student();Person P = s ;Student是Person的子类(继承)。首先声明了student的引用s,再同new关键字调用了构造函数生成student的对象,并把对象赋值...
分类:
其他好文 时间:
2014-10-28 23:38:17
阅读次数:
290
【Hibernate】之关于多对多的单向关联映射老师和学生,最典型的多对多关联,Teacher和Student,所谓单向意思就是说,老师知道自己的教的是哪些学生而学生不知道是哪些老师教。也可以这么说,在查询的时候,通过老师可以级联查询出学生,但是通过学生不可以级联查询出老师!而多..
分类:
Web程序 时间:
2014-10-28 18:09:10
阅读次数:
206