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. ...
随机推荐
- GSON解译Json为DTO
除了用okhttp网络库外,还用到google的gson库. 1. uti类的对象一般都用懒汉模式.这次gson也是用懒汉模式. public class GsonTools { private st ...
- 修改mysql密码报错: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
使用这种格式报错: 格式:mysql> set password for 用户名@localhost = password('新密码'); 找到另一种方法解决: ALTER USER 'root ...
- 【更新中】Hotspot tracer
Hotspot Follower 闲着没事,打算做一个爬取社会热点的项目,首先通过微信搜狗进行分析. 代码基于PYTHON import requests import json def page(s ...
- git 首次提交
git init# 将本地仓库与码云远程仓库进行关联 git remote add origin git的url地址 git add . git commit -m "描述" # ...
- 自定义控件 监控宿主activity的生命周期
使用不显示的fragment来监控activity生命周期,fragment生命周期基本上跟随宿主activity变化.我们通过fragment的生命周期就可以知到activity的生命周期 我们自定 ...
- 感觉自己out了
看了公司混乱而落后的框架,想自己开发一个. 无意中到开源网站看到,开源的控件已经非常多了,基本上说应有尽有. 感叹这个知识大爆炸的年代. 自己现在是坐在井底的蛤蟆?
- HashMap、Hashtable、ConcurrentHashMap、ConcurrentSkipListMap对比及java并发包(java.util.concurrent)
一.基础普及 接口(interface) 类(class) 继承类 实现的接口 Array √ Collection √ Set √ Collection List √ Collection Map ...
- python库之——sklearn
机器学习库sklearn 官方documentation(资料)中分为不同的部分: 其中我们主要讲User Guide(机器学习算法理论介绍).API(程序实现方法): 一.User Guide ht ...
- Office 365 的安装方法
一.在线安装 进入网址 https://www.office.com/ 使用office账号登陆 1.点击右上角安装office应用,选择第二项 其他安装选项 2.选择安装语言 点击高级,选择安装版本 ...
- java中的二维数组基础知识
二维数组基本知识,毕竟常见的有:概念,初始化,遍历 概念: 理解二维数组,首先要先理解一维数组是什么.一维数组是个容器,存储相同数据类型的容器(这里不再做一位数组的具体介绍).二维数组就是用来存储一维 ...