Package com.ibatis.sqlmap.client

Examples of com.ibatis.sqlmap.client.SqlMapClient.queryForObject()


        Object in = exchange.getIn().getBody();
        if (in != null) {
            if (LOG.isTraceEnabled()) {
                LOG.trace("QueryForObject: " + in + "  using statement: " + statement);
            }
            result = client.queryForObject(statement, in);
        } else {
            if (LOG.isTraceEnabled()) {
                LOG.trace("QueryForObject using statement: " + statement);
            }
            result = client.queryForObject(statement);
View Full Code Here


            result = client.queryForObject(statement, in);
        } else {
            if (LOG.isTraceEnabled()) {
                LOG.trace("QueryForObject using statement: " + statement);
            }
            result = client.queryForObject(statement);
        }

        doProcessResult(exchange, result);
    }
View Full Code Here

        Object in = exchange.getIn().getBody();
        if (in != null) {
            if (LOG.isTraceEnabled()) {
                LOG.trace("QueryForObject: " + in + "  using statement: " + statement);
            }
            result = client.queryForObject(statement, in);
        } else {
            if (LOG.isTraceEnabled()) {
                LOG.trace("QueryForObject using statement: " + statement);
            }
            result = client.queryForObject(statement);
View Full Code Here

            result = client.queryForObject(statement, in);
        } else {
            if (LOG.isTraceEnabled()) {
                LOG.trace("QueryForObject using statement: " + statement);
            }
            result = client.queryForObject(statement);
        }

        doProcessResult(exchange, result);
    }
View Full Code Here

  public String execute() throws Exception {
    //TODO  检测username and password,如果出错的话,返回error,交由struts2.0进行处理;
    // 如果正确的话,就会redirect到 EasyJ的原框架进行处理.
    SqlMapClient client = Utils.getMapClient();
    Object user = client.queryForObject("user.getUserByUserName",userName);
    if(user == null){
      System.out.println(userName+" 不存在");
      return ActionSupport.ERROR;
    }else{
      System.out.println(userName+"正确");
View Full Code Here

  public static int VALIDATE_OK  =  0 ;
  public static int login(String username, String passwd) throws Exception
  {
    SqlMapClient client = Utils.getMapClient();
    SysUser user = null;   
    user = (SysUser)client.queryForObject("user.getUserByUserName", username);   
    if(user == null) return LOGIN_ERROR;   
    if(user.getPassword().equals(passwd))
    {
      ActionContext.getContext().getSession().put("user", user);
      return user.getUserId().intValue();
View Full Code Here

    else return LOGIN_ERROR;
  }
  public static int validateName(String username)throws Exception{
    SqlMapClient client = Utils.getMapClient();
    SysUser user = null;
    user = (SysUser)client.queryForObject("user.getUserByUserName",username);
    if(user != null) return VALIDATE_FAIL;
    return VALIDATE_OK;
  }
  public static void main(String []args){
    try{
View Full Code Here

    System.out.println(userName);
    return ActionSupport.SUCCESS;
  }
  public static void main(String []args)throws Exception{
    SqlMapClient client = Utils.getMapClient();
    Object user = client.queryForObject("user.getUserByUserName","admin");
   
  }

}
View Full Code Here

          .getResourceAsStream("SqlMapConfig.xml"));
      client = Utils.getSqlMapClient(input);
     
      FileModel model = null;
      recid = Integer.valueOf(req.getParameter("recid"));
      model= (FileModel) client.queryForObject("getModel",recid);
      if(model != null){
        List<DrawModel> draws = client.queryForList("getDraws",recid);
        model.setDraws(draws);
      }         
     
View Full Code Here

        Object in = exchange.getIn().getBody();
        if (in != null) {
            if (LOG.isTraceEnabled()) {
                LOG.trace("QueryForObject: " + in + "  using statement: " + statement);
            }
            result = client.queryForObject(statement, in);
        } else {
            if (LOG.isTraceEnabled()) {
                LOG.trace("QueryForObject using statement: " + statement);
            }
            result = client.queryForObject(statement);
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.