All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.swak.archiver.common.SwakTemplateExecutor Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (C), 2011-2017
 * File Name: ExecutionMarsService.java
 * Encoding: UTF-8
 * Date: 17-8-23 下午5:19
 * History:
 */
package com.swak.archiver.common;


import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.rowset.SqlRowSet;
import org.springframework.transaction.support.TransactionTemplate;

/**
 * @author mayuanchao
 * @version 1.0  Date: 17-8-23 下午5:19
 */
public interface SwakTemplateExecutor {
     TransactionTemplate getTransactionTemplate();

     JdbcTemplate getJdbcTemplate();

     void execute(final String sql) throws DataAccessException;

     /**
      * 根据where条件查询总条数
      *
      * @param sql
      * @throws DataAccessException
      */
     Integer findTotalCount(String sql) throws DataAccessException;

     /**
      * 获取表的maxId
      *
      * @param toString
      * @throws DataAccessException
      */
     Long findMaxId(String toString) throws DataAccessException;

     SqlRowSet queryForRowSet(String sql) throws DataAccessException;

     /**
      * 批量删除
      *
      * @param sql
      * @throws DataAccessException
      */
     int batchUpdate(String sql) throws DataAccessException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy