Package cn.org.zeronote.orm.dao.parser

Examples of cn.org.zeronote.orm.dao.parser.SqlSelGenerator


   
    Map<String, Object[]> nArgs = new HashMap<String, Object[]>();
    for (String key : args.keySet()) {
      nArgs.put(key, new Object[]{args.get(key)});
    }
    SqlSelGenerator sqlGenerator = new SqlSelGenerator(pojoType, null, nArgs);
    try {
      String sql = sqlGenerator.getSql();
      Object[] argsObj = sqlGenerator.getArgs();
      return queryForPaginatedPojoList(sql, argsObj, pojoType, rowSelection);
    } catch (IllegalAccessException e) {
      logger.error("init sql error!", e);
      throw new DataAccessException("init sql error!", e);
    }
View Full Code Here


      } catch (IllegalAccessException e) {
        logger.error("init query sql error!", e);
        throw new DataAccessException("init query sql error!", e);
      }
    } else {
      SqlSelGenerator sqlGenerator = new SqlSelGenerator(pojoType, requireFields, argsMap);
      try {
        sqls = new String[]{sqlGenerator.getSql()};
        argsObjs = new ArrayList<Object[]>();
        argsObjs.add(sqlGenerator.getArgs());
      } catch (IllegalAccessException e) {
        logger.error("init query sql error!", e);
        throw new DataAccessException("init query sql error!", e);
      }
    }
View Full Code Here

      throws DataAccessException {
    Map<String, Object[]> argsMap = new HashMap<String, Object[]>();
    for (String key : args.keySet()) {
      argsMap.put(key, new Object[]{args.get(key)});
    }
    SqlSelGenerator sqlGenerator = new SqlSelGenerator(pojoType, null, argsMap);
    String sql;
    Object[] objArgs;
    try {
      sql = sqlGenerator.getSql();
      objArgs = sqlGenerator.getArgs();
    } catch (IllegalAccessException e) {
      logger.error("init query sql error!", e);
      throw new DataAccessException("init query sql error!", e);
    }
    return (T) query(sql, objArgs, new PojoResultSetExtractor<T>(pojoType));
View Full Code Here

   
    Map<String, Object[]> nArgs = new HashMap<String, Object[]>();
    for (String key : args.keySet()) {
      nArgs.put(key, new Object[]{args.get(key)});
    }
    SqlSelGenerator sqlGenerator = new SqlSelGenerator(pojoType, nArgs);
    try {
      String sql = sqlGenerator.getSql();
      Object[] argsObj = sqlGenerator.getArgs();
      return queryForPaginatedPojoList(sql, argsObj, pojoType, rowSelection);
    } catch (IllegalAccessException e) {
      logger.error("init sql error!", e);
      throw new DataAccessException("init sql error!", e);
    }
View Full Code Here

      } catch (IllegalAccessException e) {
        logger.error("init query sql error!", e);
        throw new DataAccessException("init query sql error!", e);
      }
    } else {
      SqlSelGenerator sqlGenerator = new SqlSelGenerator(pojoType, argsMap);
      try {
        sqls = new String[]{sqlGenerator.getSql()};
        argsObjs = new ArrayList<Object[]>();
        argsObjs.add(sqlGenerator.getArgs());
      } catch (IllegalAccessException e) {
        logger.error("init query sql error!", e);
        throw new DataAccessException("init query sql error!", e);
      }
    }
View Full Code Here

      throws DataAccessException {
    Map<String, Object[]> argsMap = new HashMap<String, Object[]>();
    for (String key : args.keySet()) {
      argsMap.put(key, new Object[]{args.get(key)});
    }
    SqlSelGenerator sqlGenerator = new SqlSelGenerator(pojoType, argsMap);
    String sql;
    Object[] objArgs;
    try {
      sql = sqlGenerator.getSql();
      objArgs = sqlGenerator.getArgs();
    } catch (IllegalAccessException e) {
      logger.error("init query sql error!", e);
      throw new DataAccessException("init query sql error!", e);
    }
    return (T) query(sql, objArgs, new PojoResultSetExtractor<T>(pojoType));
View Full Code Here

TOP

Related Classes of cn.org.zeronote.orm.dao.parser.SqlSelGenerator

Copyright © 2018 www.massapicom. 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.