package neu.integration.ctic.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.search.annotations.Analyze;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Index;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;

/**
 * Cnvd entity. @author MyEclipse Persistence Tools
 */
@Indexed
@Entity(name = "Cnvd")
//@Table(name = "cnvd", catalog = "cti")
public class Cnvd implements java.io.Serializable {

	// Fields

	private Integer id;
	private String title;
	private String vulnerabilityDescribe;
	private String referenceLink;
	private String solution;
	private String finder;
	private String patch;
	private String patchLink;
	private String validationInformation;
	private String submissionTime;
	private String cnvdId;
	private String releaseTime;
	private String damageGrade;
	private String attackRoute;
	private String attackComplexity;
	private String authentication;
	private String confidentiality;
	private String integrity;
	private String usability;
	private String vulnerabilityScore;
	private String impactProduct;
	private String bugtraqId;
	private String cveId;
	private String includedTime;
	private String updateTime;
	private String vulnerabilityAttachment;
	private String otherId;
	private String type;

	// Constructors

	/** default constructor */
	public Cnvd() {
	}

	/** minimal constructor */
	public Cnvd(String title) {
		this.title = title;
	}

	/** full constructor */
	public Cnvd(String title, String vulnerabilityDescribe,
			String referenceLink, String solution, String finder, String patch,
			String patchLink, String validationInformation,
			String submissionTime, String cnvdId, String releaseTime,
			String damageGrade, String attackRoute, String attackComplexity,
			String authentication, String confidentiality, String integrity,
			String usability, String vulnerabilityScore, String impactProduct,
			String bugtraqId, String cveId, String includedTime,
			String updateTime, String vulnerabilityAttachment, String otherId,
			String type) {
		this.title = title;
		this.vulnerabilityDescribe = vulnerabilityDescribe;
		this.referenceLink = referenceLink;
		this.solution = solution;
		this.finder = finder;
		this.patch = patch;
		this.patchLink = patchLink;
		this.validationInformation = validationInformation;
		this.submissionTime = submissionTime;
		this.cnvdId = cnvdId;
		this.releaseTime = releaseTime;
		this.damageGrade = damageGrade;
		this.attackRoute = attackRoute;
		this.attackComplexity = attackComplexity;
		this.authentication = authentication;
		this.confidentiality = confidentiality;
		this.integrity = integrity;
		this.usability = usability;
		this.vulnerabilityScore = vulnerabilityScore;
		this.impactProduct = impactProduct;
		this.bugtraqId = bugtraqId;
		this.cveId = cveId;
		this.includedTime = includedTime;
		this.updateTime = updateTime;
		this.vulnerabilityAttachment = vulnerabilityAttachment;
		this.otherId = otherId;
		this.type = type;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	@DocumentId
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * Field注解： store=Store.NO：是否将数据存储在索引中，如果store=Store.YES值是直接从索引文档中获取。
	 * index=Index.YES：是否索引该字段 analyze=Analyze.YES：是否分词
	 * 
	 * @return
	 */
	@Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
	@Column(name = "title", nullable = false, length = 65535)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "vulnerability_describe", length = 65535)
	public String getVulnerabilityDescribe() {
		return this.vulnerabilityDescribe;
	}

	public void setVulnerabilityDescribe(String vulnerabilityDescribe) {
		this.vulnerabilityDescribe = vulnerabilityDescribe;
	}

	@Column(name = "reference_link", length = 65535)
	public String getReferenceLink() {
		return this.referenceLink;
	}

	public void setReferenceLink(String referenceLink) {
		this.referenceLink = referenceLink;
	}

	@Column(name = "solution", length = 65535)
	public String getSolution() {
		return this.solution;
	}

	public void setSolution(String solution) {
		this.solution = solution;
	}

	@Column(name = "finder", length = 65535)
	public String getFinder() {
		return this.finder;
	}

	public void setFinder(String finder) {
		this.finder = finder;
	}

	@Column(name = "patch", length = 65535)
	public String getPatch() {
		return this.patch;
	}

	public void setPatch(String patch) {
		this.patch = patch;
	}

	@Column(name = "patch_link", length = 65535)
	public String getPatchLink() {
		return this.patchLink;
	}

	public void setPatchLink(String patchLink) {
		this.patchLink = patchLink;
	}

	@Column(name = "validation_information", length = 65535)
	public String getValidationInformation() {
		return this.validationInformation;
	}

	public void setValidationInformation(String validationInformation) {
		this.validationInformation = validationInformation;
	}

	@Column(name = "submission_time", length = 65535)
	public String getSubmissionTime() {
		return this.submissionTime;
	}

	public void setSubmissionTime(String submissionTime) {
		this.submissionTime = submissionTime;
	}

	@Column(name = "cnvd_id", length = 65535)
	public String getCnvdId() {
		return this.cnvdId;
	}

	public void setCnvdId(String cnvdId) {
		this.cnvdId = cnvdId;
	}

	@Column(name = "release_time", length = 65535)
	public String getReleaseTime() {
		return this.releaseTime;
	}

	public void setReleaseTime(String releaseTime) {
		this.releaseTime = releaseTime;
	}

	@Column(name = "damage_grade", length = 65535)
	public String getDamageGrade() {
		return this.damageGrade;
	}

	public void setDamageGrade(String damageGrade) {
		this.damageGrade = damageGrade;
	}

	@Column(name = "attack_route", length = 65535)
	public String getAttackRoute() {
		return this.attackRoute;
	}

	public void setAttackRoute(String attackRoute) {
		this.attackRoute = attackRoute;
	}

	@Column(name = "attack_complexity", length = 65535)
	public String getAttackComplexity() {
		return this.attackComplexity;
	}

	public void setAttackComplexity(String attackComplexity) {
		this.attackComplexity = attackComplexity;
	}

	@Column(name = "authentication", length = 65535)
	public String getAuthentication() {
		return this.authentication;
	}

	public void setAuthentication(String authentication) {
		this.authentication = authentication;
	}

	@Column(name = "confidentiality", length = 65535)
	public String getConfidentiality() {
		return this.confidentiality;
	}

	public void setConfidentiality(String confidentiality) {
		this.confidentiality = confidentiality;
	}

	@Column(name = "integrity", length = 65535)
	public String getIntegrity() {
		return this.integrity;
	}

	public void setIntegrity(String integrity) {
		this.integrity = integrity;
	}

	@Column(name = "usability", length = 65535)
	public String getUsability() {
		return this.usability;
	}

	public void setUsability(String usability) {
		this.usability = usability;
	}

	@Column(name = "vulnerability_score", precision = 22, scale = 0)
	public String getVulnerabilityScore() {
		return this.vulnerabilityScore;
	}

	public void setVulnerabilityScore(String vulnerabilityScore) {
		this.vulnerabilityScore = vulnerabilityScore;
	}

	@Column(name = "impact_product", length = 65535)
	public String getImpactProduct() {
		return this.impactProduct;
	}

	public void setImpactProduct(String impactProduct) {
		this.impactProduct = impactProduct;
	}

	@Column(name = "bugtraq_id", length = 65535)
	public String getBugtraqId() {
		return this.bugtraqId;
	}

	public void setBugtraqId(String bugtraqId) {
		this.bugtraqId = bugtraqId;
	}

	@Column(name = "cve_id", length = 65535)
	public String getCveId() {
		return this.cveId;
	}

	public void setCveId(String cveId) {
		this.cveId = cveId;
	}

	@Column(name = "included_time", length = 65535)
	public String getIncludedTime() {
		return this.includedTime;
	}

	public void setIncludedTime(String includedTime) {
		this.includedTime = includedTime;
	}

	@Column(name = "update_time", length = 65535)
	public String getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "vulnerability_attachment", length = 65535)
	public String getVulnerabilityAttachment() {
		return this.vulnerabilityAttachment;
	}

	public void setVulnerabilityAttachment(String vulnerabilityAttachment) {
		this.vulnerabilityAttachment = vulnerabilityAttachment;
	}

	@Column(name = "other_id", length = 65535)
	public String getOtherId() {
		return this.otherId;
	}

	public void setOtherId(String otherId) {
		this.otherId = otherId;
	}

	@Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
	@Column(name = "type", nullable = false, length = 65535)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Override
	public String toString() {
		return "Cnvd [id=" + id + ", title=" + title
				+ ", vulnerabilityDescribe=" + vulnerabilityDescribe
				+ ", referenceLink=" + referenceLink + ", solution=" + solution
				+ ", finder=" + finder + ", patch=" + patch + ", patchLink="
				+ patchLink + ", validationInformation="
				+ validationInformation + ", submissionTime=" + submissionTime
				+ ", cnvdId=" + cnvdId + ", releaseTime=" + releaseTime
				+ ", damageGrade=" + damageGrade + ", attackRoute="
				+ attackRoute + ", attackComplexity=" + attackComplexity
				+ ", authentication=" + authentication + ", confidentiality="
				+ confidentiality + ", integrity=" + integrity + ", usability="
				+ usability + ", vulnerabilityScore=" + vulnerabilityScore
				+ ", impactProduct=" + impactProduct + ", bugtraqId="
				+ bugtraqId + ", cveId=" + cveId + ", includedTime="
				+ includedTime + ", updateTime=" + updateTime
				+ ", vulnerabilityAttachment=" + vulnerabilityAttachment
				+ ", otherId=" + otherId + ", type=" + type + "]";
	}

}