六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 62|回复: 0

项目笔记记录

[复制链接]

升级  22.67%

22

主题

22

主题

22

主题

秀才

Rank: 2

积分
84
 楼主| 发表于 2013-2-7 14:50:18 | 显示全部楼层 |阅读模式
1、HQL语句 :select t from RepNewsUsers t where t.runUserId=:userId  <=对应传值=>map<k,v>
                select t from RepNewsUsers t where t.runUserId=? <=对应传值=> value  (但要标注?顺序)
2、判断某字符串 是否为 空,或者为 ""   ====>可以使用 StringUtils.hasText(string) 来判断;
org.springframework.util
Class StringUtils


java.lang.Object  org.springframework.util.StringUtils相关链接http://static.springsource.org/spring/docs/2.0.x/api/org/springframework/util/StringUtils.html#hasText%28java.lang.String%29 StringUtils.hasText(null) = false StringUtils.hasText("") = false StringUtils.hasText(" ") = false StringUtils.hasText("12345") = true StringUtils.hasText(" 12345 ") = true
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表