Notice: Undefined index: HTTP_ACCEPT_ENCODING in C:\server\web\www.showyounger.com\s-system.php on line 2
hibernate like 查询 | 小样儿(ShowYounger)
小样儿,顶呱呱!!![http://www.showyounger.com]
- public List liketxt(String txt) {
- log.debug("finding all Log instances");
- try {
- String queryString = "from Log as a where a.ltxt like ? ";
-
- Query queryObject = getSession().createQuery(queryString);
- queryObject.setString(0, "%" + txt + "%");
- return queryObject.list();
- } catch (RuntimeException re) {
- log.error("find all failed", re);
- throw re;
- }
- }