package org.seasar.dao.impl;

import javax.sql.DataSource;

import org.seasar.dao.BeanMetaData;

/**
 * @author higa
 *  
 */
public abstract class AbstractBatchAutoStaticCommand extends
		AbstractAutoStaticCommand {

	public AbstractBatchAutoStaticCommand(DataSource dataSource,
			BeanMetaData beanMetaData, String[] propertyNames) {

		super(dataSource, beanMetaData, propertyNames);
	}

	public Object execute(Object[] args) {
		AbstractAutoHandler handler = createAutoHandler();
		handler.setSql(getSql());
		int updatedRows = handler.execute(args);
		return new Integer(updatedRows);
	}
}