package com.bankaudit.model;

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

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.ManyToOne;
import javax.persistence.Table;

@Entity 
@Table(name="activity_process_finding_mapping")
public class ActivityProcessFindingMapping implements Serializable {

	
/*Table: activity_process_finding_mapping
-------------------------------------------

Column Information
----------------------

Field                   Type          Collation          Null    Key     Default            Extra                        Privileges                       Comment  
----------------------  ------------  -----------------  ------  ------  -----------------  ---------------------------  -------------------------------  ---------
legal_entity_code       int(2)        (NULL)             NO      PRI     (NULL)                                          select,insert,update,references           
mapping_id              varchar(20)   latin1_swedish_ci  NO      PRI     (NULL)                                          select,insert,update,references           
mapping_code            varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
audit_type_code         varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
audit_group_code        varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
audit_sub_group_code    varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
activity_id             varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
activity_code           varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
process_id              varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
process_code            varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
finding_id              varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
finding_code            varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
auth_rej_remarks        varchar(200)  latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
entity_status           varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
status                  varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
maker                   varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
maker_timestamp         timestamp     (NULL)             NO              CURRENT_TIMESTAMP  on update CURRENT_TIMESTAMP  select,insert,update,references           
checker                 varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
checker_timestamp       timestamp     (NULL)             YES             (NULL)                                          select,insert,update,references           
businessdate_timestamp  timestamp     (NULL)             YES             (NULL)                                          select,insert,update,references           
sysdate_timestamp       timestamp     (NULL)  */

	
	@Id
	@Column(name="legal_entity_code")
	private Integer legalEntityCode;
	
	@Id
	// @GeneratedValue() 
	@Column(name="mapping_id")
	private String mappingId;
	
	
	@Column(name="mapping_code")
	private String mappingCode;
	
	
	
	@Column(name="audit_type_code")
	private String auditTypeCode;
		
	@Column(name="audit_group_code")
	private String auditGroupCode;
		
	@Column(name="audit_sub_group_code")
	private String auditSubGroupCode;
		
	@Column(name="activity_id")
	private String activityId;
	
	@Column(name="activity_code")
	private String activityCode;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumns({
        @JoinColumn(
            name = "legal_entity_code",
            referencedColumnName = "legal_entity_code",insertable=false,updatable=false),
        @JoinColumn(
            name = "activity_id",
            referencedColumnName = "activity_id",insertable=false,updatable=false)
    })
	MaintAuditActivity maintAuditActivity;
	
	@Column(name="process_id")
	private String processId;
	
	@Column(name="process_code")
	private String processCode;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumns({
        @JoinColumn(
            name = "legal_entity_code",
            referencedColumnName = "legal_entity_code",insertable=false,updatable=false),
        @JoinColumn(
            name = "process_id",
            referencedColumnName = "process_id",insertable=false,updatable=false)
    })
	MaintAuditProcess maintAuditProcess;
	
	
	@Column(name="finding_id")
	private String findingId;
	
	@Column(name="finding_code")
	private String findingCode;
	
	@Column(name="risk_belongs_to")
	private String riskBelongsTo;
	
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumns({
        @JoinColumn(
            name = "legal_entity_code",
            referencedColumnName = "legal_entity_code",insertable=false,updatable=false),
        @JoinColumn(
            name = "finding_id",
            referencedColumnName = "finding_id",insertable=false,updatable=false)
    })
	MaintAuditFinding maintAuditFinding;
	
	@Column(name = "auth_rej_remarks")
	private String authRejRemarks;
	
	@Column(name = "entity_status")
	private String entityStatus;
	
	@Column(name="status")
	private String status;
	
	@Column(name="maker")
	private String maker;
	
	@Column(name="maker_timestamp")
	private Date makerTimestamp;
	
	@Column(name="checker")
	private String checker;
	
	@Column(name="checker_timestamp")
	private Date checkerTimestamp;
	
	@Column(name="businessdate_timestamp")
	private Date businessdateTimestamp;
	
	@Column(name="sysdate_timestamp")
	private Date sysdateTimestamp;

	private transient String fCriticality; // LossEventType for Risk
	
	/**
	 * @return the activityCode
	 */
	public String getActivityCode() {
		return activityCode;
	}

	/**
	 * @param activityCode the activityCode to set
	 */
	public void setActivityCode(String activityCode) {
		this.activityCode = activityCode;
	}

	/**
	 * @return the processCode
	 */
	public String getProcessCode() {
		return processCode;
	}

	/**
	 * @param processCode the processCode to set
	 */
	public void setProcessCode(String processCode) {
		this.processCode = processCode;
	}

	/**
	 * @return the findingCode
	 */
	public String getFindingCode() {
		return findingCode;
	}

	/**
	 * @param findingCode the findingCode to set
	 */
	public void setFindingCode(String findingCode) {
		this.findingCode = findingCode;
	}

	/**
	 * @return the mappingCode
	 */
	public String getMappingCode() {
		return mappingCode;
	}

	/**
	 * @param mappingCode the mappingCode to set
	 */
	public void setMappingCode(String mappingCode) {
		this.mappingCode = mappingCode;
	}

	/**
	 * @return the authRejRemarks
	 */
	public String getAuthRejRemarks() {
		return authRejRemarks;
	}

	/**
	 * @param authRejRemarks the authRejRemarks to set
	 */
	public void setAuthRejRemarks(String authRejRemarks) {
		this.authRejRemarks = authRejRemarks;
	}

	/**
	 * @return the mappingId
	 */
	public String getMappingId() {
		return mappingId;
	}

	/**
	 * @param mappingId the mappingId to set
	 */
	public void setMappingId(String mappingId) {
		this.mappingId = mappingId;
	}

	/**
	 * @return the maintAuditActivity
	 */
	public MaintAuditActivity getMaintAuditActivity() {
		return maintAuditActivity;
	}

	/**
	 * @param maintAuditActivity the maintAuditActivity to set
	 */
	public void setMaintAuditActivity(MaintAuditActivity maintAuditActivity) {
		this.maintAuditActivity = maintAuditActivity;
	}

	/**
	 * @return the maintAuditProcess
	 */
	public MaintAuditProcess getMaintAuditProcess() {
		return maintAuditProcess;
	}

	/**
	 * @param maintAuditProcess the maintAuditProcess to set
	 */
	public void setMaintAuditProcess(MaintAuditProcess maintAuditProcess) {
		this.maintAuditProcess = maintAuditProcess;
	}

	/**
	 * @return the maintAuditFinding
	 */
	public MaintAuditFinding getMaintAuditFinding() {
		return maintAuditFinding;
	}

	/**
	 * @param maintAuditFinding the maintAuditFinding to set
	 */
	public void setMaintAuditFinding(MaintAuditFinding maintAuditFinding) {
		this.maintAuditFinding = maintAuditFinding;
	}


	/**
	 * @return the activityId
	 */
	public String getActivityId() {
		return activityId;
	}

	/**
	 * @param activityId the activityId to set
	 */
	public void setActivityId(String activityId) {
		this.activityId = activityId;
	}

	/**
	 * @return the legalEntityCode
	 */
	public Integer getLegalEntityCode() {
		return legalEntityCode;
	}

	/**
	 * @param legalEntityCode the legalEntityCode to set
	 */
	public void setLegalEntityCode(Integer legalEntityCode) {
		this.legalEntityCode = legalEntityCode;
	}

	/**
	 * @return the auditTypeCode
	 */
	public String getAuditTypeCode() {
		return auditTypeCode;
	}

	/**
	 * @param auditTypeCode the auditTypeCode to set
	 */
	public void setAuditTypeCode(String auditTypeCode) {
		this.auditTypeCode = auditTypeCode;
	}

	/**
	 * @return the auditGroupCode
	 */
	public String getAuditGroupCode() {
		return auditGroupCode;
	}

	/**
	 * @param auditGroupCode the auditGroupCode to set
	 */
	public void setAuditGroupCode(String auditGroupCode) {
		this.auditGroupCode = auditGroupCode;
	}

	/**
	 * @return the auditSubGroupCode
	 */
	public String getAuditSubGroupCode() {
		return auditSubGroupCode;
	}

	/**
	 * @param auditSubGroupCode the auditSubGroupCode to set
	 */
	public void setAuditSubGroupCode(String auditSubGroupCode) {
		this.auditSubGroupCode = auditSubGroupCode;
	}



	/**
	 * @return the processId
	 */
	public String getProcessId() {
		return processId;
	}

	/**
	 * @param processId the processId to set
	 */
	public void setProcessId(String processId) {
		this.processId = processId;
	}



	/**
	 * @return the findingId
	 */
	public String getFindingId() {
		return findingId;
	}

	/**
	 * @param findingId the findingId to set
	 */
	public void setFindingId(String findingId) {
		this.findingId = findingId;
	}

	public String getRiskBelongsTo() {
		return riskBelongsTo;
	}

	public void setRiskBelongsTo(String riskBelongsTo) {
		this.riskBelongsTo = riskBelongsTo;
	}

	public String getEntityStatus() {
		return entityStatus;
	}

	public void setEntityStatus(String entityStatus) {
		this.entityStatus = entityStatus;
	}

	/**
	 * @return the status
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * @return the maker
	 */
	public String getMaker() {
		return maker;
	}

	/**
	 * @param maker the maker to set
	 */
	public void setMaker(String maker) {
		this.maker = maker;
	}

	/**
	 * @return the makerTimestamp
	 */
	public Date getMakerTimestamp() {
		return makerTimestamp;
	}

	/**
	 * @param makerTimestamp the makerTimestamp to set
	 */
	public void setMakerTimestamp(Date makerTimestamp) {
		this.makerTimestamp = makerTimestamp;
	}

	/**
	 * @return the checker
	 */
	public String getChecker() {
		return checker;
	}

	/**
	 * @param checker the checker to set
	 */
	public void setChecker(String checker) {
		this.checker = checker;
	}

	/**
	 * @return the checkerTimestamp
	 */
	public Date getCheckerTimestamp() {
		return checkerTimestamp;
	}

	/**
	 * @param checkerTimestamp the checkerTimestamp to set
	 */
	public void setCheckerTimestamp(Date checkerTimestamp) {
		this.checkerTimestamp = checkerTimestamp;
	}

	/**
	 * @return the businessdateTimestamp
	 */
	public Date getBusinessdateTimestamp() {
		return businessdateTimestamp;
	}

	/**
	 * @param businessdateTimestamp the businessdateTimestamp to set
	 */
	public void setBusinessdateTimestamp(Date businessdateTimestamp) {
		this.businessdateTimestamp = businessdateTimestamp;
	}

	/**
	 * @return the sysdateTimestamp
	 */
	public Date getSysdateTimestamp() {
		return sysdateTimestamp;
	}

	/**
	 * @param sysdateTimestamp the sysdateTimestamp to set
	 */
	public void setSysdateTimestamp(Date sysdateTimestamp) {
		this.sysdateTimestamp = sysdateTimestamp;
	}

	public String getfCriticality() {
		return fCriticality;
	}

	public void setfCriticality(String fCriticality) {
		this.fCriticality = fCriticality;
	}
	
	
	
}
