package jp.mosp.common.part;

import java.sql.Connection;
import java.util.Properties;

import jp.mosp.common.common.BaseDto;
import jp.mosp.common.dto.CmAspUserDto;
import jp.mosp.common.dto.CmUserDto;

/**
 * Partを利用する際に必要な情報DTO
 * @author yoshida
 *	@version	0.0.1
 */
public class PartInfo extends BaseDto {

	private static final long serialVersionUID = -6077546544100981837L;

	private Properties 		cfg;
	private String 			cmd;
	private CmAspUserDto 	aspUser;
	private CmUserDto 		user;

	private transient Connection 		conn;

	/**
	 * コンストラクタ
	 */
	private PartInfo() {
		super();
	}

	/**
	 * コンストラクタ
	 * @param cfg
	 * @param cmd
	 * @param aspUser
	 * @param user
	 * @param conn
	 */
	public PartInfo(
			Properties cfg,
			String cmd,
			CmAspUserDto aspUser,
			CmUserDto user,
			Connection conn
	) {
		super();
		init(cfg, cmd, aspUser, user, conn);
	}

	/**
	 * 初期化
	 * @param cfg
	 * @param cmd
	 * @param aspUser
	 * @param user
	 * @param conn
	 */
	private void init(
			Properties cfg,
			String cmd,
			CmAspUserDto aspUser,
			CmUserDto user,
			Connection conn		
	) {
		this.cfg = cfg;
		this.cmd = cmd;
		this.aspUser = aspUser;
		this.user = user;
		this.conn = conn;		
	}

	// アクセサメソッド
	public Properties 		getCfg() 		{ return cfg		; }
	public String 			getCmd() 		{ return cmd		; }
	public CmAspUserDto 	getAspUser() 	{ return aspUser	; }
	public CmUserDto 		getUser() 		{ return user		; }
	public Connection 		getConn() 		{ return conn		; }

}
