package com.bankaudit.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="maint_audit_parameter_derived")
public class MaintAuditParameterDerived implements Serializable{

	/*Table: maint_audit_parameter_derived
	
	Column Information
	Field                   Type         Collation          Null    Key     Default            Extra                        Privileges                       Comment  
	----------------------  -----------  -----------------  ------  ------  -----------------  ---------------------------  -------------------------------  ---------
	legal_entity_code       int(2)        (NULL)             NO      MUL     (NULL)                                          select,insert,update,references           
	audit_type_code         varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
	u_criticality           varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	unit_type               varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	classification          varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	rating                  varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	revenue_leakage         varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	frequency               varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
	duration                varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
	man_days                varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
	response_time           varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
	*/
	
	@Id
	@Column(name="legal_entity_code")
	private Integer legalEntityCode;
	
	@Id
	@Column(name="audit_type_code")
	private String auditTypeCode;
	
	@Id
	@Column(name="u_criticality")
	private String uCriticality;
	
	@Id
	@Column(name="unit_type")
	private String unitType;
	
	@Id
	@Column(name="classification")
	private String classification;
	
	@Id
	@Column(name="rating")
	private String rating;
	
	@Id
	@Column(name="revenue_leakage")
	private String revenueLeakage;	
	
	/*@Column(name="frequency_type")
	private String frequencyType;*/
	
	@Column(name="frequency")
	private String frequency;
	
	@Column(name="duration")
	private String duration;
	
	@Column(name="man_days")
	private String manDays;
		
	@Column(name="response_time", nullable = true)
	private String responseTime;
	
	@Column(name="closure_time")
	private String closureTime;
	
	private transient String auditTypeName;
	
	public Integer getLegalEntityCode() {
		return legalEntityCode;
	}

	public void setLegalEntityCode(Integer legalEntityCode) {
		this.legalEntityCode = legalEntityCode;
	}

	public String getAuditTypeCode() {
		return auditTypeCode;
	}

	public void setAuditTypeCode(String auditTypeCode) {
		this.auditTypeCode = auditTypeCode;
	}

	public String getuCriticality() {
		return uCriticality;
	}

	public void setuCriticality(String uCriticality) {
		this.uCriticality = uCriticality;
	}

	public String getUnitType() {
		return unitType;
	}

	public void setUnitType(String unitType) {
		this.unitType = unitType;
	}

	public String getClassification() {
		return classification;
	}

	public void setClassification(String classification) {
		this.classification = classification;
	}

	/*public String getFrequencyType() {
		return frequencyType;
	}

	public void setFrequencyType(String frequencyType) {
		this.frequencyType = frequencyType;
	}*/

	public String getFrequency() {
		return frequency;
	}

	public void setFrequency(String frequency) {
		this.frequency = frequency;
	}

	public String getDuration() {
		return duration;
	}

	public void setDuration(String duration) {
		this.duration = duration;
	}

	public String getManDays() {
		return manDays;
	}

	public void setManDays(String manDays) {
		this.manDays = manDays;
	}

	public String getResponseTime() {
		return responseTime;
	}

	public void setResponseTime(String responseTime) {
		this.responseTime = responseTime;
	}

	public String getClosureTime() {
		return closureTime;
	}

	public void setClosureTime(String closureTime) {
		this.closureTime = closureTime;
	}

	public String getRating() {
		return rating;
	}

	public void setRating(String rating) {
		this.rating = rating;
	}

	public String getRevenueLeakage() {
		return revenueLeakage;
	}

	public void setRevenueLeakage(String revenueLeakage) {
		this.revenueLeakage = revenueLeakage;
	}

	public String getAuditTypeName() {
		return auditTypeName;
	}

	public void setAuditTypeName(String auditTypeName) {
		this.auditTypeName = auditTypeName;
	}

	@Override
	public String toString() {
		return "MaintAuditParameter [legalEntityCode=" + legalEntityCode + ", auditTypeCode=" + auditTypeCode 
				+ ", uCriticality=" + uCriticality + ", unitType="
				+ unitType + ", classification=" + classification /*+ ", frequencyType=" + frequencyType*/ + ", frequency="
				+ frequency + ", duration=" + duration + ", manDays=" + manDays + ", responseTime=" + responseTime
				+ ", rating=" + rating + ", revenueLeakage=" + revenueLeakage + "]";
	}

}
