package gov.va.med.mpn.codedcontrol.model;

import java.util.Date;
import java.util.UUID;

import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;


/**
 * The Class Control. Contains the coded control information 
 * 
 * <p> 
 * <A HREF="http://www.hp.com"> Hewlett-Packard Enterprise Services</A> 
 * </p> 
 * 
 * @author <a href="mailto:pratap.chilukuri@hp.com">Pratap Chilukuri</a> 
 */

@XmlRootElement  
public class Control {
	
	/** The control uuid. */
	private UUID controlUUID ;
	 
 	/** The control name. */
 	private String controlName;
	 
 	/** The control description. */
 	private String controlDescription;
	 
 	/** The control mod by. */
 	private String controlModBy;
	 
 	/** The control create by. */
 	private String controlCreateBy;
	 
 	/** The category. */
 	private Category category;
	 
 	/** The classification. */
 	private Classification classification;
	 
 	/** The create dt. */
 	private Date createDt;
	 
 	/** The modify dt. */
 	private Date modifyDt;
	 
	 
	/**
	 * Sets the category.
	 *
	 * @param category the new category
	 */
	public void setCategory(Category category) {
		this.category = category;
	}
	
	/**
	 * Sets the classification.
	 *
	 * @param classification the new classification
	 */
	public void setClassification(Classification classification) {
		this.classification = classification;
	}
	
	/**
	 * Gets the control uuid.
	 *
	 * @return the control uuid
	 */
	public UUID getControlUUID() {
		return controlUUID;
	}
	
	/**
	 * Sets the control uuid.
	 *
	 * @param controlUUID the new control uuid
	 */
	public void setControlUUID(UUID controlUUID) {
		this.controlUUID = controlUUID;
	}
	
	/**
	 * Gets the control name.
	 *
	 * @return the control name
	 */
	public String getControlName() {
		return controlName;
	}
	
	/**
	 * Sets the control name.
	 *
	 * @param controlName the new control name
	 */
	public void setControlName(String controlName) {
		this.controlName = controlName;
	}
	
	/**
	 * Gets the control description.
	 *
	 * @return the control description
	 */
	public String getControlDescription() {
		return controlDescription;
	}
	
	/**
	 * Sets the control description.
	 *
	 * @param controlDescription the new control description
	 */
	public void setControlDescription(String controlDescription) {
		this.controlDescription = controlDescription;
	}
	
	/**
	 * Gets the control mod by.
	 *
	 * @return the control mod by
	 */
	public String getControlModBy() {
		return controlModBy;
	}
	
	/**
	 * Sets the control mod by.
	 *
	 * @param controlModBy the new control mod by
	 */
	public void setControlModBy(String controlModBy) {
		this.controlModBy = controlModBy;
	}
	
	/**
	 * Gets the control create by.
	 *
	 * @return the control create by
	 */
	public String getControlCreateBy() {
		return controlCreateBy;
	}
	
	/**
	 * Sets the control create by.
	 *
	 * @param controlCreateBy the new control create by
	 */
	public void setControlCreateBy(String controlCreateBy) {
		this.controlCreateBy = controlCreateBy;
	}
	
	/**
	 * Gets the category.
	 *
	 * @return the category
	 */
	public Category getCategory() {
		return category;
	}
	
	/**
	 * Gets the classification.
	 *
	 * @return the classification
	 */
	public Classification getClassification() {
		return classification;
	}
	 
    /**
     * Gets the creates the dt.
     *
     * @return the creates the dt
     */
    public Date getCreateDt() {
		return createDt;
	}
	
	/**
	 * Sets the creates the dt.
	 *
	 * @param createDt the new creates the dt
	 */
	public void setCreateDt(Date createDt) {
		this.createDt = createDt;
	}
	
	/**
	 * Gets the modify dt.
	 *
	 * @return the modify dt
	 */
	public Date getModifyDt() {
		return modifyDt;
	}
	
	/**
	 * Sets the modify dt.
	 *
	 * @param modifyDt the new modify dt
	 */
	public void setModifyDt(Date modifyDt) {
		this.modifyDt = modifyDt;
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
	  StringBuilder buffer = new StringBuilder();

      buffer.append(getClass().getName()).append(" [");
      buffer.append("controlUUID").append("='").append(getControlUUID()).append("' ");			
      buffer.append("contolName").append("='").append(getControlName()).append("' ");	
      buffer.append("controlDescription").append("='").append(getControlName()).append("' ");
      buffer.append("controlModBy").append("='").append(getControlName()).append("' ");
      buffer.append("controlCreateBy").append("='").append(getControlName()).append("' ");
      buffer.append("createDt").append("='").append(getCreateDt()).append("' ");	
      buffer.append("modifyDt").append("='").append(getModifyDt()).append("' ");
      buffer.append("Classification").append("=").append(getClassification().toString());
      buffer.append("category").append("=").append(getCategory().toString());
      buffer.append("]");
      
      return buffer.toString();
     }
	
}
