/*
 * Copyright (C) 2005 NTT DATA Corporation
 * 
 */
package org.postgresforest.tool.bean;

import java.util.Date;


/**
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class ConfigInfo implements Cloneable{
	
    static public final String FOREST_DEFAULT_CONFIG = "FOREST_DEFAULT_CONFIG";
    
	/** コンフィグレーションID */
	protected String m_configId  = FOREST_DEFAULT_CONFIG; 
	/** 説明 */
	protected String m_description = ""; 
	/** GSCキャッシュ読込間隔 */
	protected long m_cacheReflesh = 30; 
	/** 障害時リトライ回数 */
	protected long m_retryCount = 0; 
	/** 障害判定タイムアウト */
	protected long m_defectTimeout = 300; 
	/** 検索処理分散方式 */
	protected int m_distributedCon = 0; 
	/** 非パーティションフラグ */
	protected boolean m_pertitionMode = false; 
	/** 更新同期モード */
	protected boolean m_syncMode = false; 
	/** 更新日時 */
	protected Date m_updateDate = new Date(); 
	
	
	public long getCacheReflesh() {
		return m_cacheReflesh;
	}
	public void setCacheReflesh(long cacheReflesh) {
		m_cacheReflesh = cacheReflesh;
	}
	public String getConfigId() {
		return m_configId;
	}
	public void setConfigId(String configId) {
		m_configId = configId;
	}
	public long getDefectTimeout() {
		return m_defectTimeout;
	}
	public void setDefectTimeout(long defectTimeout) {
		m_defectTimeout = defectTimeout;
	}
	public String getDescription() {
		return m_description;
	}
	public void setDescription(String description) {
		m_description = description;
	}
	public int getDistributedCon() {
		return m_distributedCon;
	}
	public void setDistributedCon(int distributedCon) {
		m_distributedCon = distributedCon;
	}
	public long getRetryCount() {
		return m_retryCount;
	}
	public void setRetryCount(long retryCount) {
		m_retryCount = retryCount;
	}
	public Date getUpdateDate() {
		return m_updateDate;
	}
	public void setUpdateDate(Date updateDate) {
		m_updateDate = updateDate;
	}
	public boolean isPertitionMode() {
		return m_pertitionMode;
	}
	public void setPertitionMode(boolean pertitionMode) {
		m_pertitionMode = pertitionMode;
	}
	public boolean isSyncMode() {
		return m_syncMode;
	}
	public void setSyncMode(boolean syncMode) {
		m_syncMode = syncMode;
	}
	//MASUCOMMENT 追記DeepCopy用
	public Object clone(){
		ConfigInfo destConfigInfo = new ConfigInfo();
		
		destConfigInfo.setConfigId(this.getConfigId());
		destConfigInfo.setCacheReflesh(this.getCacheReflesh());
		destConfigInfo.setDefectTimeout(this.getDefectTimeout());
		destConfigInfo.setDescription(this.getDescription());
		destConfigInfo.setDistributedCon(this.getDistributedCon());
		destConfigInfo.setPertitionMode(this.isPertitionMode());
		destConfigInfo.setSyncMode(this.isSyncMode());
		destConfigInfo.setRetryCount(this.getRetryCount());
		destConfigInfo.setUpdateDate(this.getUpdateDate());
	
		return (Object)destConfigInfo;
		
		
	}
}
