Package org.springframework.orm.ibatis

Examples of org.springframework.orm.ibatis.SqlMapClientCallback


*/
@SuppressWarnings("unchecked")
public class UtentiDaoImpl extends SqlMapClientDaoSupport implements UtentiDao {

    public int aggiornaUtenti(final List<String> ids, final long idGruppo) {
        return (Integer) getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
            public Object doInSqlMapClient(SqlMapExecutor executor) {
                int ris = 0;
                try {

                    executor.startBatch();
View Full Code Here


    public int updateUtente(Utente utente) throws DataAccessException {
        return getSqlMapClientTemplate().update("updateUtente", utente);
    }

    public int insertUtenti(final List<Utente> utenti, final long idCentro) throws DataAccessException {
        return (Integer) getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
            public Object doInSqlMapClient(SqlMapExecutor executor) {
                int ris = 0;
                try {

                    executor.startBatch();
View Full Code Here

            update("updateCenterUser", user);
        }
    }

    public void insertCenterUsers(final List<CenterUser> users) throws DataAccessException {
        execute(new SqlMapClientCallback() {
            public Object doInSqlMapClient(SqlMapExecutor executor) {
                int ris = 0;
                try {
                    executor.startBatch();
                    for (CenterUser centerUser : users) {
View Full Code Here

        params.put("groupId", groupId);
        update("updateDeleteGroup", params);
    }

    public void updateCenterUsers(final Collection<String> ids, final String groupId, final String centerId) throws DataAccessException {
        execute(new SqlMapClientCallback() {
            public Object doInSqlMapClient(SqlMapExecutor executor) {
                int ris = 0;
                try {

                    executor.startBatch();
View Full Code Here

            if (lastEx != null) {
                throw lastEx;
            }
            return counter;
        } else {
            return (Integer) getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
                public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
                    executor.startBatch();
                    for (Object item : entities) {
                        executor.insert(statementName, item);
                    }
View Full Code Here

            if (lastEx != null) {
                throw lastEx;
            }
            return counter;
        } else {
            return (Integer) getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
                public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
                    executor.startBatch();
                    for (Object parameterObject : entities) {
                        executor.delete(statementName, parameterObject);
                    }
View Full Code Here

            if (lastEx != null) {
                throw lastEx;
            }
            return counter;
        } else {
            return (Integer) getSqlMapClientTemplate().execute(new SqlMapClientCallback() {

                public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
                    executor.startBatch();
                    for (Object parameterObject : entities) {
                        executor.update(statementName, parameterObject);
View Full Code Here

            if (isPartitioningBehaviorEnabled()) {
                SortedMap<String, DataSource> dsMap = lookupDataSourcesByRouter(statementName,
                        parameterObject);
                if (!MapUtils.isEmpty(dsMap)) {

                    SqlMapClientCallback action = new SqlMapClientCallback() {
                        public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
                            return executor.delete(statementName, parameterObject);
                        }
                    };
View Full Code Here

                    return batchInsertAfterReordering(statementName, parameterObject);

                } else {
                    DataSource targetDataSource = null;
                    SqlMapClientCallback action = new SqlMapClientCallback() {
                        public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
                            return executor.insert(statementName, parameterObject);
                        }
                    };
                    SortedMap<String, DataSource> resultDataSources = lookupDataSourcesByRouter(
View Full Code Here

            String identity = entity.getKey();

            final DataSource dataSourceToUse = findDataSourceToUse(entity.getKey());

            final SqlMapClientCallback callback = new SqlMapClientCallback() {
                public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
                    return executor.insert(statementName, paramList);
                }
            };
View Full Code Here

TOP

Related Classes of org.springframework.orm.ibatis.SqlMapClientCallback

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.