criteria.setCacheable(true);这个方法是干什么用的
criteria.setCacheable(true);
一下是Criteria的底层源代码
/**
* Enable caching of this query result, provided query caching is enabled
* for the underlying session factory.
*
* @param cacheable Should the result be considered cacheable; default is
* to not cache (false).
* @return this (for method chaining)
*/
public Criteria setCacheable(boolean cacheable);
意思是:
启用查询缓存结果,提供查询缓存
*为底层会话工厂。
*
* @param缓存的结果应该被认为是默认缓存;
*不缓存(false)。
*“退货(方法链接)
就是给criteria一个缓存
criteria.setCacheable(true);这个方法是干什么用的的更多相关文章
- struts.enable.DynamicMethodInvocation = true 动态方法调用
default.properties 在Struts 2的核心jar包-struts2-core中,有一个default.properties的默认配置文件.里面配置了一些全局的信息,比如: stru ...
- struts.enable.DynamicMethodInvocation = true 动态方法调用(转)
原文地址:http://blog.csdn.net/wfcaven/article/details/5937557 default.properties 在Struts 2的核心jar包-struts ...
- 对比两个String无规律包含连续4个相同字符返回true的方法
package com.qif.dsa.util; import java.util.ArrayList; import java.util.List; /** * @author * @Title: ...
- DropDownList 需要加AutoPostBack="true" ,OnSelectedIndexChanged方法才有效
<asp:DropDownList ID="ddlType" runat="server" AutoPostBack="True" ...
- Spring MVC模式下,获取WebApplicationContext的工具类 方法
在已有的注解类型下,获取WebApplicationContext的工具类 通过 WebApplicationContextUtils.getRequiredWebApplicationContex ...
- Hibernate缓存机制简述 (转)
感谢:http://blog.csdn.net/ramln1989/article/details/5528445 ------------------------------------------ ...
- 传智博客(JavaWeb方面的所有知识)听课记录(经典)
一. JavaWeb基础 第一天: 1.Eclipse详解: (1).Bad versionnumber in .class file:编译器版本和运行(JRE)版本不符合.高的JRE版本 ...
- 20160512--hibernate--缓存
缓存 缓存的作用主要用来提高性能,可以简单的理解成一个Map:使用缓存涉及到三个操作:把数据放入缓存.从缓存中获取数据.删除缓存中的无效数据. 原理模拟分析:(不能运行,只是模拟)(缓存实现复杂, ...
- hibernate详解
Hibernate原理与应用 主要内容 1.引入 2.安装配置 3.基本概念和CURD 4.HQL和Criteria 5.关联映射 6.继承映射 7.集合映射 8.懒加载 9.缓存 10.事务 11. ...
随机推荐
- 005.前端开发知识,前端基础CSS(2020-01-14)
一.CSS权重 权重是可以叠加的,事例如下: div ul li ------> 0,0,0,3 .nav ul li ------> 0,0,1,2 a:hover -----—> ...
- android 圆环进度view
新建RoundProgressBar class RoundProgressBar : View { private val paint = Paint() var max = 100 //最大进度 ...
- 区别 new function(){} 和 function(){}()
只要 new 表达式之后的 constructor 返回(return)一个引用对象(数组,对象,函数等),都将覆盖new创建的匿名对象,如果返回(return)一个原始类型(无 return 时其实 ...
- 文本输入框input将输入转换为统一大小写
转载地址:http://blog.csdn.net/yieryi_/article/details/52078596 文本输入框input将输入转换为统一大小写,通常有两种方法:JS和CSS方法. 1 ...
- <USACO09DEC>视频游戏的麻烦Video Game Troublesの思路
emm今天模拟赛的题.神奇地A了 #include<cstdio> #include<cstring> #include<iostream> #include< ...
- 第一届“信安杯”部分WriteUp
第一届"信安杯"部分WriteUp------OooooohLeeGay队! 小队成员(按姓氏):郭泽坤.李江川.赵乐祺 以下这部分是做出来的 2019.11.23-24 ++Re ...
- Oralce获取32位随机数
SELECT SYS_GUID() from dual;
- Mysql主从同步原理简介
1.定义:当master(主)库的数据发生变化的时候,变化会实时的同步到slave(从)库. 2.好处: 1)水平扩展数据库的负载能力. 2)容错,高可用.Failover(失败切换)/High Av ...
- JDBC之BaseDao类
package com.it.util; import java.sql.Connection; import java.sql.DriverManager; import java.sql.Prep ...
- CPU|MICGPU|FPGA|超算|Meta-data|
生物医学大数据: 收集数据后对数据的分析,如同看相,而对数据信息的挖掘可以看作是算命.这两个过程是基于算法和软件这类工具之上的. 在存储方面:在硬件上,为了Parallel computing的目的, ...