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

com.jpattern.orm.session.NullSqlExecutor Maven / Gradle / Ivy

There is a newer version: 3.5.1
Show newest version
package com.jpattern.orm.session;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import com.jpattern.orm.exception.OrmException;

/**
 * 
 * @author Francesco Cina
 *
 * 02/lug/2011
 */
public class NullSqlExecutor implements SqlPerformer {

	/**
	 * 
	 */
	

	@Override
	public void setMaxRows(int maxRows) {
	}

	@Override
	public int getMaxRows() {
		return 0;
	}

	@Override
	public void setQueryTimeout(int queryTimeout) {
	}

	@Override
	public int getQueryTimeout() {
		return 0;
	}

	@Override
	public void execute(String sql) throws OrmException {
	}

	@Override
	public  T query(String sql, ResultSetReader rse, Object... args) throws OrmException {
		return null;
	}

	@Override
	public int update(String sql, Object... args) throws OrmException {
		return 0;
	}

	@Override
	public int update(String sql, GeneratedKeyReader generatedKeyExtractor, Object... args) throws OrmException {
		return 0;
	}

	@Override
	public int[] batchUpdate(List sqls) throws OrmException {
		return new int[0];
	}

	@Override
	public int[] batchUpdate(String sql, List args) throws OrmException {
		return new int[0];
	}

	@Override
	public int[] batchUpdate(String sql, PreparedStatementCreator psc) throws OrmException {
		return new int[0];
	}

	@Override
	public Integer queryForInt(String sql, Object... args) throws OrmException {
		return 0;
	}

	@Override
	public Long queryForLong(String sql, Object... args) throws OrmException {
		return 0l;
	}

	@Override
	public Double queryForDouble(String sql, Object... args) throws OrmException {
		return 0d;
	}

	@Override
	public Float queryForFloat(String sql, Object... args) throws OrmException {
		return 0f;
	}

	@Override
	public String queryForString(String sql, Object... args) throws OrmException {
		return "";
	}

	@Override
	public Boolean queryForBoolean(String sql, Object... args) throws OrmException {
		return false;
	}

	@Override
	public BigDecimal queryForBigDecimal(String sql, Object... args) throws OrmException {
		return new BigDecimal(0);
	}

	@Override
	public Object[] queryForArray(String sql, Object... args) throws OrmException {
		return new Object[0];
	}

	@Override
	public List queryForList(String sql, Object... args) throws OrmException {
		return new ArrayList();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy