`
wangtong40
  • 浏览: 254799 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
节 8.01    基本查询 以下是HQL/QBC/Native SQL三种查询策略 HQL策略: session.createQuery("FROM Category c where c.name like 'Laptop%'");   QBC策略: session.createCriteria(Category.class).add(Restrictions.like("name", "Laptop%"));   Native SQL策 ...
HQL查询 节 10.01    单表HQL查询 FROM CUSTOMERS as customers   节 10.02    Where子句 (a)    比较表达式 FROM CUSTOMERS as customers WHERE customers.id=1 FROM CUSTOMERS as customers WHERE customers.amount between 1 and 10 FROM CUSTOMERS as customers WHERE customers.amount >100 FROM CUSTOMERS as customers WHERE cus ...
第 I 条
节 1.01 
1、 
(a) 
1、在Hibernate的配置文件中添加以下内容:   <property name="hibernate.transaction.factory_class"> org.hibernate.transaction.JDBCTransactionFactory </property>  2、Java代码如下: Session session = null; Transaction tx = null; try { session = sessionFactory.openSession(); tx = session.begi ...
Struts的ActionForm对象是由多个对象组成,如下:   public class SettleEnterRecord implements java.io.Serializable { private String enterRecordId; private SettleEnterCarMark settleEnterCarMark; private SettleEnterCarTypeModel settleEnterCarTypeModel; private SettleEnterRedo settleEnterRedo; }  为了在JSP表单中显示ActionFo ...
当主外键为同一字段时可以使用一对一的延迟加载 具体配置如下
...
...
  持久化上下文作用 :
  1、
回调函数只能接受一个参数:即远程方法调用的返回值,当需要多个参数传递给回调函数时,需要使用 JavaScript 的闭包特性解决该问题。   在如下示例中需要返回的结果是 XXX is married to YYY ,但是只能从 java 后台代码中返 ...
<convert converter="bean" match="practicaldwr2project.chapter02.seconddwr.Student" /> <create creator="new" javascript="StudentRegistry"> <param name="class" value="practicaldwr2project.chapter02.seconddwr.StudentRegistry" /&g ...
Global site tag (gtag.js) - Google Analytics