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

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


   */
  @Override
  public int updateByLogic(Object... pojos) throws DataAccessException {
    int r = 0;
    for (Object obj : pojos) {
      SqlUpdGenerator sqlGenerator = new SqlUpdGenerator(obj, false);
      try {
        r += execute(sqlGenerator.getSql(), sqlGenerator.getArgs());
      } catch (IllegalArgumentException e) {
        logger.error("init update sql error! exec number : {}", r, e);
        throw new DataAccessException("init update sql error!", e);
      } catch (IllegalAccessException e) {
        logger.error("init update sql error! exec number : {}", r, e);
View Full Code Here


   */
  @Override
  public int updateByPhysical(Object... pojos) throws DataAccessException {
    int r = 0;
    for (Object obj : pojos) {
      SqlUpdGenerator sqlGenerator = new SqlUpdGenerator(obj, true);
      try {
        r += execute(sqlGenerator.getSql(), sqlGenerator.getArgs());
      } catch (IllegalArgumentException e) {
        logger.error("init update sql error! exec number : {}", r, e);
        throw new DataAccessException("init update sql error!", e);
      } catch (IllegalAccessException e) {
        logger.error("init update sql error! exec number : {}", r, e);
View Full Code Here

    try {
      String sql = null;
      List<Object[]> argsList = new ArrayList<Object[]>();
      for (T t : pojos) {
        if ( pojoType.equals(t.getClass())) {
          SqlUpdGenerator sqlGenerator = new SqlUpdGenerator(t, false);
          sql = sqlGenerator.getSql();
          argsList.add(sqlGenerator.getArgs());
        } else {
          throw new DataAccessException("Update : The type of inconsistency!");
        }
      }
      if (sql != null) {
View Full Code Here

    try {
      String sql = null;
      List<Object[]> argsList = new ArrayList<Object[]>();
      for (T t : pojos) {
        if ( pojoType.equals(t.getClass())) {
          SqlUpdGenerator sqlGenerator = new SqlUpdGenerator(t, true);
          sql = sqlGenerator.getSql();
          argsList.add(sqlGenerator.getArgs());
        } else {
          throw new DataAccessException("Update : The type of inconsistency!");
        }
      }
      if (sql != null) {
View Full Code Here

   */
  @Override
  public int updateByLogic(Object... pojos) throws DataAccessException {
    int r = 0;
    for (Object obj : pojos) {
      SqlUpdGenerator sqlGenerator = new SqlUpdGenerator(obj, false);
      try {
        r += execute(sqlGenerator.getSql(), sqlGenerator.getArgs());
      } catch (IllegalArgumentException e) {
        logger.error("init update sql error! exec number : {}", r, e);
        throw new DataAccessException("init update sql error!", e);
      } catch (IllegalAccessException e) {
        logger.error("init update sql error! exec number : {}", r, e);
View Full Code Here

   */
  @Override
  public int updateByPhysical(Object... pojos) throws DataAccessException {
    int r = 0;
    for (Object obj : pojos) {
      SqlUpdGenerator sqlGenerator = new SqlUpdGenerator(obj, true);
      try {
        r += execute(sqlGenerator.getSql(), sqlGenerator.getArgs());
      } catch (IllegalArgumentException e) {
        logger.error("init update sql error! exec number : {}", r, e);
        throw new DataAccessException("init update sql error!", e);
      } catch (IllegalAccessException e) {
        logger.error("init update sql error! exec number : {}", r, e);
View Full Code Here

    try {
      String sql = null;
      List<Object[]> argsList = new ArrayList<Object[]>();
      for (T t : pojos) {
        if ( pojoType.equals(t.getClass())) {
          SqlUpdGenerator sqlGenerator = new SqlUpdGenerator(t, false);
          sql = sqlGenerator.getSql();
          argsList.add(sqlGenerator.getArgs());
        } else {
          throw new DataAccessException("Update : The type of inconsistency!");
        }
      }
      if (sql != null) {
View Full Code Here

    try {
      String sql = null;
      List<Object[]> argsList = new ArrayList<Object[]>();
      for (T t : pojos) {
        if ( pojoType.equals(t.getClass())) {
          SqlUpdGenerator sqlGenerator = new SqlUpdGenerator(t, true);
          sql = sqlGenerator.getSql();
          argsList.add(sqlGenerator.getArgs());
        } else {
          throw new DataAccessException("Update : The type of inconsistency!");
        }
      }
      if (sql != null) {
View Full Code Here

TOP

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

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.