自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(20)
  • 资源 (3)
  • 收藏
  • 关注

原创 2.一对多双向关联(班级对学生):工具类

package com.bjpowernode.hibernate;import org.hibernate.Session;import org.hibernate.SessionFactory;import org.hibernate.cfg.Configuration;public class HibernateUtils { private static SessionFa

2016-04-19 14:51:41 232

原创 1.一对多双向关联(班级对学生):Object,hbm

package com.bjpowernode.hibernate;import java.util.Set;public class Classes { private int id; private String name; private Set students; public int getId() { return id;

2016-04-19 14:51:19 421

原创 5.一对多单向关联(班级对学生):总结

hibernate一对多关联映射(单向Classes--->Student)一对多关联映射和多对一关联映射映射原理是一致的,都是在多的一端加入一个外键,指向一的一端它们的区别在于维护的关系不同: * 多对一维护的关系是:多指向一的关系,有了此关系,在加载多的时候可以将一加载上来 * 一对多维护的关系是:一指向多的关系,有了此关系,在加载一的时候可以将多加载上来 在一一端维护

2016-04-19 14:51:07 904

原创 4.一对多单向关联(班级对学生):测试

package com.bjpowernode.hibernate;import java.util.HashSet;import java.util.Iterator;import java.util.Set;import org.hibernate.Session;import junit.framework.TestCase;public class

2016-04-19 14:50:45 561

原创 3.一对多单向关联(班级对学生):hibernate.cfg.xml

<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> com.mysql.jdbc.Driver j

2016-04-19 14:50:29 455

原创 2.一对多单向关联(班级对学生):工具类

package com.bjpowernode.hibernate;import org.hibernate.Session;import org.hibernate.SessionFactory;import org.hibernate.cfg.Configuration;public class HibernateUtils { private static S

2016-04-19 14:49:40 209

原创 1.一对多单向关联(班级对学生):Object,hbm

package com.bjpowernode.hibernate;import java.util.Set;public class Classes { private int id; private String name; private Set students; public int getId() { return id; } public vo

2016-04-19 14:49:22 348

原创 6.session flush 隔离级别:总结

session flush测试:session flush方法主要做了两件事: * 清理缓存 * 执行sql session在什么情况下执行flush * 默认在事务提交时 * 显示的调用flush * 在执行查询前,如:iterate hibernate按照save(insert),update、delete顺序提交相关操作

2016-04-19 14:49:02 145

原创 5.session flush 隔离级别:测试

package com.bjpowernode.hibernate;import java.util.Date;import org.hibernate.Session;import org.hibernate.Transaction;import com.bjpowernode.hibernate.HibernateUtils;import com.bjpower

2016-04-19 09:16:29 156

原创 4.session flush 隔离级别:hibernate.cfg.xml

<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> jdbc:mysql://localhost/tes

2016-04-19 09:00:57 211

原创 3.session flush 隔离级别:工具类

package com.bjpowernode.hibernate;import org.hibernate.Session;import org.hibernate.SessionFactory;import org.hibernate.cfg.Configuration;public class HibernateUtils { private static S

2016-04-19 09:00:42 163

原创 2.session flush 隔离级别:Object,hbm

package com.bjpowernode.hibernate;import java.util.Date;public class User1 { private String id; private String name; private String password; private Date createTime;

2016-04-19 09:00:34 142

原创 1.session flush 隔离级别:隔离级别

MySQL查看数据库事务隔离级别select @@tx_isolation; 未提交读set transaction isolation level read uncommitted;已提交读set transaction isolation level read committed;可重复读set transaction isolation level repea

2016-04-19 09:00:31 248

原创 5.一对一外键双向关联(人对身份证):总结

hibernate一对一唯一外键关联映射(双向关联PersonIdCard)一对一唯一外键关联双向采用标签映射,必须指定标签中的property-ref属性为关系字段的名称

2016-04-19 09:00:27 247

原创 4.一对一外键双向关联(人对身份证):测试

package com.bjpowernode.hibernate;import org.hibernate.Session;import junit.framework.TestCase;public class One2OneTest extends TestCase { public void testLoad2() { Session session = null;

2016-04-19 09:00:21 264

原创 3.一对一外键双向关联(人对身份证):hibernate.cfg.xml

<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> com.mysql.jdbc.Driver jdbc:mys

2016-04-19 09:00:15 223

原创 2.一对一外键双向关联(人对身份证):工具类

package com.bjpowernode.hibernate;import org.hibernate.Session;import org.hibernate.SessionFactory;import org.hibernate.cfg.Configuration;public class HibernateUtils { private static SessionFa

2016-04-19 08:59:45 237

原创 1.一对一外键双向关联(人对身份证):object,hbm

package com.bjpowernode.hibernate;public class Person { private int id; private String name; private IdCard idCard; public int getId() { return id; } public void setId(int id) { thi

2016-04-19 08:59:24 279

原创 5.一对一外键单向关联(人对身份证):总结

hibernate一对一唯一外键关联映射(单向关联Person----->IdCard)一对一唯一外键关联映射其实是多对一的特例采用标签来映射,指定多的一端unique为true,这样就限制了多的一端的多重性为一,就是这样来映射的。

2016-04-19 08:59:01 470 1

原创 4.一对一外键单向关联(人对身份证):测试

package com.bjpowernode.hibernate;import org.hibernate.Session;import junit.framework.TestCase;public class One2OneTest extends TestCase { public void testSave1() { Session session = null;

2016-04-19 08:56:20 206

解决无法新建源代码(src main java)目录的问题

解决无法新建源代码(src main java)目录的问题

2016-08-31

com.genuitec.eclipse.export.wizard_9.0.0.me201211011550.jar

本次对于myeclipse10破解后,导出war包时报“SECURITY ALERT: INTEGERITY CHECK ERROR”进行了破解。 1.关闭MyEclipse。 2.备份plugins目录下的文件com.genuitec.eclipse.export.wizard_9.0.0.me201211011550.jar,具体做法:把 com.genuitec.eclipse.export.wizard_9.0.0.me201211011550.jar修改成 com.genuitec.eclipse.export.wizard_9.0.0.me201211011550.txt。 3.把经破解的com.genuitec.eclipse.export.wizard_9.0.0.me201211011550.jar拷贝至备份plugins目录下,接着把 经破解的com.genuitec.eclipse.export.wizard_9.0.0.me201211011550.jar修改成 com.genuitec.eclipse.export.wizard_9.0.0.me201211011550.txt2。 4.启动MyEclipse,关闭MyEclipse。 5.把经破解的com.genuitec.eclipse.export.wizard_9.0.0.me201211011550.txt2修改成 com.genuitec.eclipse.export.wizard_9.0.0.me201211011550.jar。 6.启动MyEclipse。

2016-06-06

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除