2013年3月29日

动态查询的实现

摘要: 动态查询,就是在我们的应用中,需要查询某个表。只要丢一个SQL语句,就能查询到所查询表的记录。其中查询的结果包括两个集合:有多少个字段的集合,有多少表记录的集合。当前使用ibatis实现SQLMap配置:View Code <!-- 动态查询 ex-hulaizhi001 2013-1-8 --> <parameterMap id="para-dynamicQueryList" class="java.util.Map"> <parameter property="p_sql" jdbcType=&quo 阅读全文

posted @ 2013-03-29 15:40 陈惟鲜的博客 阅读(293) 评论(0) 推荐(0) 编辑

数字计算的工具类 BigDecimal

摘要: 当我们的程序中用到计算的时候,最好把金额、数字使用java.math.BigDecimal来定义。一下是工具类:View Code package com.pingan.saims.scms.fundplan.util;import java.math.BigDecimal;import java.text.DecimalFormat;import java.text.NumberFormat;import com.opensymphony.oscache.util.StringUtil;/**BigDecimal 对应的加减乘除、格式化等方法<br /> * 路人甲 * @aut 阅读全文

posted @ 2013-03-29 13:07 陈惟鲜的博客 阅读(304) 评论(0) 推荐(0) 编辑

ibatis批处理 实例

摘要: ibatis 批量处理,速度很快,适合批量数据导入操作使用。/** * 添加角色菜单关系 * * @author : 路人甲 * @create_date :2013-3-29 上午09:59:07 * @param list */ public void insertRoleMenuList(final List<RoleMenuRelationDTO> list) throws PafaDAOException { getSqlMapClientTemplate().execute(new SqlMapCl... 阅读全文

posted @ 2013-03-29 10:48 陈惟鲜的博客 阅读(187) 评论(0) 推荐(0) 编辑

导航