Examples of queryForList()


Examples of co.cubicode.jdbcframework.DatabaseFactory.queryForList()

  public static List<RolePermission> findByRoleAndApplication(Role role, String application) throws ObjectNotFoundException {
    DatabaseFactory instance = DatabaseFactory.getInstance("rbac");
    SQLQuery sql = SQL.getSQL(RolePermission.class, "findByRoleAndApplication");
    sql.setParameter("role", role.getId());
    sql.setParameter("application", application);
    return instance.queryForList(RolePermission.class, sql);
  }

}
View Full Code Here

Examples of com.alibaba.druid.support.ibatis.SqlMapClientWrapper.queryForList()

        Assert.assertNotNull((User) wrapper.queryForObject("User.select"));
        Assert.assertNotNull((User) wrapper.queryForObject("User.select", Collections.emptyMap()));
        Assert.assertNotNull((User) wrapper.queryForObject("User.select", Collections.emptyMap(), new User()));

        Assert.assertEquals(1, wrapper.queryForList("User.select").size());
        Assert.assertEquals(1, wrapper.queryForList("User.select", Collections.emptyMap()).size());
        Assert.assertEquals(1, wrapper.queryForList("User.select", Collections.emptyMap(), 0, 2).size());

        wrapper.queryWithRowHandler("User.select", new RowHandler() {
View Full Code Here

Examples of com.alibaba.druid.support.ibatis.SqlMapExecutorWrapper.queryForList()

        Assert.assertNotNull((User) wrapper.queryForObject("User.select"));
        Assert.assertNotNull((User) wrapper.queryForObject("User.select", Collections.emptyMap()));
        Assert.assertNotNull((User) wrapper.queryForObject("User.select", Collections.emptyMap(), new User()));

        Assert.assertEquals(1, wrapper.queryForList("User.select").size());
        Assert.assertEquals(1, wrapper.queryForList("User.select", Collections.emptyMap()).size());
        Assert.assertEquals(1, wrapper.queryForList("User.select", Collections.emptyMap(), 0, 2).size());

        wrapper.queryWithRowHandler("User.select", new RowHandler() {
View Full Code Here

Examples of com.founder.fix.fixflow.core.impl.db.SqlCommand.queryForList()

      engine = this.getProcessEngine(agentId);
      SqlCommand sqlCommand = new SqlCommand(connection);
      String sqlStr = "select * from fixflow_agent_agentinfo where agent_id = ?";
      List<Object> data = new ArrayList<Object>();
      data.add(agentId);
      List<Map<String, Object>> listData = sqlCommand.queryForList(
          sqlStr, data);
      if (listData.size() > 0) {
        Map<String, Object> eachAgentInfo = listData.get(0);
        agentInfo.put("agentId", agentId);
        agentInfo.put("agentName", this.getUserName(agentId));
View Full Code Here

Examples of com.founder.fix.fixflow.core.impl.db.SqlCommand.queryForList()

        sqlStr = "select * from fixflow_agent_agentdetails where agent_id = ?";
       
     
        data.clear();
        data.add(agentId);
        listData = sqlCommand.queryForList(sqlStr, data);
        for (Map<String, Object> rowDataMap : listData) {
          // if (resultData.size() > 0) {
          eachResultData.put("agentId", rowDataMap.get("AGENT_ID"));
          String auser = StringUtil
              .getString(rowDataMap.get("AUSER"));
View Full Code Here

Examples of com.founder.fix.fixflow.core.impl.db.SqlCommand.queryForList()

      StringBuffer sb = new StringBuffer();
      sb.append("SELECT USERID,USERNAME FROM AU_USERINFO WHERE LOGINID=? AND PASSWORD=?");
      connection = dbcf.createConnection();
      //这里是自带的数据库操作方式。
      SqlCommand sqlcommand = new SqlCommand(connection);
      List<Map<String, Object>> list2 = sqlcommand.queryForList(sb.toString(),list);
      if(list2!=null && list2.size()>0){
        //这里约定了一个参数,流程引擎在运行时会默认从session里按照这两个key来获取参数,如果替换了登录的方式,请保证这两个key依然可以获取到正确的数据
        request.getSession().setAttribute(FlowCenterService.LOGIN_USER_ID, list2.get(0).get("USERID"));
        request.getSession().setAttribute(FlowCenterService.LOGIN_USER_NAME, list2.get(0).get("USERNAME"));
       
View Full Code Here

Examples of com.founder.fix.fixflow.core.impl.db.SqlCommand.queryForList()

                .getConnection(ConnectionManagement.defaultDataBaseId);
         
            SqlCommand sc = new SqlCommand(connection);
            List params = new ArrayList();
            params.add(key);
            List<Map<String, Object>> res = sc.queryForList(
                "select * from DEMOTABLE where COL1=?", params);
            if(res!=null && res.size()>0)
              filter.put("demoObject", res.get(0));
            request.setAttribute("result", filter);
          }
View Full Code Here

Examples of com.founder.fix.fixflow.core.impl.db.SqlCommand.queryForList()

        try {
          SqlCommand sc = new SqlCommand(connection);
          List params = new ArrayList();
          params.add(filter.get("bizKey"));
          List<Map<String, Object>> res = sc.queryForList(
              "select * from DEMOTABLE where COL1=?", params);
         
          if(res!=null && res.size()>0)
            filter.put("demoObject", res.get(0));

View Full Code Here

Examples of com.founder.fix.fixflow.core.impl.db.SqlCommand.queryForList()

   
   
   
    String sqlText=pagination.getPaginationSql("SELECT * FROM FIXFLOW_MAIL WHERE MAIL_STATUS=?", 1, 10, "*", null);
   
    List<Map<String, Object>> dataList = sqlCommand.queryForList(sqlText, pObjects);
   
    for (Map<String, Object> mapData : dataList) {

      try {
        FixMailTo fixMailTo = new FixMailTo();
View Full Code Here

Examples of com.founder.fix.fixflow.core.impl.db.SqlCommand.queryForList()

    this.seconds = seconds;
   
    //搜索出工作日
    String sql = "select commom_date from FIXFLOW_WORKDATE_DETAIL" +
        " group by commom_date order by commom_date";
    List<Map<String, Object>> workDays = sqlCommand.queryForList(sql);
    if(workDays == null || workDays.size() == 0) {
      return newDate;
    }
   
    //计算日期
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.