public String getSql(DetailCompRule rule) {
   StringBuffer sql = new StringBuffer();
   sql.append(
       "insert into nms_comp_detail_rule(RULEID,RELATION,ISCONTAIN,EXPRESSION,BEGINBLOCK,ENDBLOCK,ISEXTRACONTAIN,EXTRABLOCK)values(");
   sql.append(rule.getRuleId());
   sql.append(",");
   sql.append(rule.getRelation());
   sql.append(",");
   sql.append(rule.getIsContain());
   sql.append(",'");
   sql.append(rule.getExpression());
   sql.append("','");
   sql.append(rule.getBeginBlock());
   sql.append("','");
   sql.append(rule.getEndBlock());
   sql.append("',");
   sql.append(rule.getIsExtraContain());
   sql.append(",'");
   sql.append(rule.getExtraBlock());
   sql.append("')");
   return sql.toString();
 }