Package com.skyline.energy.dataaccess.jdbc

Examples of com.skyline.energy.dataaccess.jdbc.JdbcDataAccessor


    List<String> parameterNames = updateDefinition.getParsedSql().getParameterNames();
    Object[] paramArray = CommonUtils.fetchVlaues(getterMethods, parameterIndexes, args, parameterNames);

    initContext(updateDefinition, args, SqlType.UPDATE);

    JdbcDataAccessor dataAccessor = getDataAccessor();

    KeyHolder keyHolder = null;
    if (isReturnId) {
      keyHolder = dataAccessor.getKeyHolder();
    }

    LOGGER.info("Normal Update SQL:" + actualSql);
    int rows = dataAccessor.update(actualSql, keyHolder, paramArray);

    if (keyHolder != null) {
      return keyHolder.getKey();
    } else {
      return rows;
View Full Code Here


    String actualSql = batchUpdateDefinition.getActualSql(args);
    List<Object[]> paramArrays = generateBatchQueryArguments(args, batchUpdateDefinition);

    initContext(batchUpdateDefinition, args, SqlType.UPDATE);

    JdbcDataAccessor dataAccessor = getDataAccessor();

    KeyHolder keyHolder = null;
    if (batchUpdateDefinition.isReturnId()) {
      keyHolder = dataAccessor.getKeyHolder();
    }

    LOGGER.info("Normal Update SQL:" + actualSql);
    int[] rows = dataAccessor.batchUpdate(actualSql, paramArrays, keyHolder);

    if (keyHolder != null) {
      List<Number> keys = getKeysFromKeyHolder(keyHolder);
      return formatKeys(keys, batchUpdateDefinition);
    } else {
View Full Code Here

TOP

Related Classes of com.skyline.energy.dataaccess.jdbc.JdbcDataAccessor

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.