/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package kr.co.kihyun.beans.ecross;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Set;
import javax.jdo.Query;
import kr.co.kihyun.beans.entity.AcceptanceLimitStrategy;
import kr.co.kihyun.beans.entity.Board;
import kr.co.kihyun.beans.entity.MDept;
import kr.co.kihyun.beans.entity.TotDoc;
import kr.co.kihyun.beans.entity.TotItem;
import kr.co.kihyun.beans.entity.TotReport;
import kr.co.kihyun.beans.entity.TotTable;
import kr.co.kihyun.beans.entity.ecross.CRUD;
import kr.co.kihyun.beans.entity.ecross.ECross;
import kr.co.kihyun.beans.entity.ecross.IRemotePersistable;
import kr.co.kihyun.beans.entity.ecross.ReceiverTotReport;
import kr.co.kihyun.beans.entity.util.MPersistenceManager;
import kr.co.kihyun.beans.totsys.doc.table.DataDupCheck;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author bhs
 */
public final class VCMCCMC2013 extends ECrossInterface {

	private static final Logger LOG = LoggerFactory.getLogger(VCMCCMC2013.class);

	private TotDoc totDoc;
	private MDept mDept;

	public VCMCCMC2013(TotDoc totDoc) {
		super(AcceptanceLimitStrategy.class, TotDoc.class, TotTable.class, TotItem.class, Board.class, TotReport.class);
		this.totDoc = totDoc;
	}

	public VCMCCMC2013(MDept mDept) {
		super(AcceptanceLimitStrategy.class, TotDoc.class, TotTable.class, TotItem.class, Board.class, TotReport.class);
		this.mDept = mDept;
	}

	@Override
	public void saveAll(MPersistenceManager moumiPm, MPersistenceManager eCrossPm, Collection<MDept> parties) {
                this.save(moumiPm, eCrossPm, totDoc.getAcceptanceLimitStrategy(), CRUD.C, parties);//
		this.save(moumiPm, eCrossPm, totDoc, CRUD.C, parties);//
		this.saveAll(moumiPm, eCrossPm, totDoc.getTotTables(), CRUD.C, parties);
		this.saveAll(moumiPm, eCrossPm, totDoc.getTotItems(), CRUD.C, parties);
		this.saveAll(moumiPm, eCrossPm, totDoc.getTotReports(), CRUD.C, parties);
		this.save(moumiPm, eCrossPm, totDoc.getBoard(), CRUD.C, parties);//
	}
}
