package com.platform.service.thread;

import org.apache.log4j.Logger;

import com.base.Custom4exception;
import com.platform.form.oracleForm;
import com.platform.service.IOracleExtractService;
import com.platform.service.impl.CheckoutServiceImpl;

/** 抽取标准表线程
 * @author chen
 *
 */
public class ThreadExtractStandardOracle extends Thread {
	
	/**
	 * 日志
	 */
	public static Logger log = Logger.getLogger(CheckoutServiceImpl.class);

	/**
	 * 抽取实现
	 */
	private IOracleExtractService OracleExtract;
	
	private oracleForm form;
	
	/** oracle汇总库抽取
	 * @param form
	 * @param OracleExtract
	 */
	public ThreadExtractStandardOracle(oracleForm form, IOracleExtractService OracleExtract) {
		this.setDaemon(true);
		this.OracleExtract = OracleExtract;
		this.form = form;
	}
	
	@Override
	public void run() {
		try {
			OracleExtract.extractStandardTable(form.getName(), form.getInneed(),form.getTarget());
		} catch (Exception e) {
			log.error(Custom4exception.threadVolume_Oracle_Except,e);
		}
	}

}
