<commit_before>package ca.corefacility.bioinformatics.irida.model.workflow.submission;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

import org.hibernate.envers.Audited;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import ca.corefacility.bioinformatics.irida.model.joins.Join;
import ca.corefacility.bioinformatics.irida.model.project.Project;

/**
 * {@link Join} connection between an {@link AnalysisSubmission} and
 * {@link Project}
 */
@Entity
@Table(name = "project_analysis_submission", uniqueConstraints = @UniqueConstraint(columnNames = { "project_id",
		"analysis_submission_id" }))
@Audited
@EntityListeners(AuditingEntityListener.class)
public class ProjectAnalysisSubmissionJoin implements Join<Project, AnalysisSubmission> {
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	@CreatedDate
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="created_date")
	private Date createdDate;

	@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.DETACH)
	@JoinColumn(name = "project_id")
	private Project project;

	@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.DETACH)
	@JoinColumn(name = "analysis_submission_id")
	private AnalysisSubmission analysisSubmission;

	public ProjectAnalysisSubmissionJoin() {
	}

	public ProjectAnalysisSubmissionJoin(Project project, AnalysisSubmission analysisSubmission) {
		this.project = project;
		this.analysisSubmission = analysisSubmission;
	}

	@Override
	public Long getId() {
		return id;
	}

	@Override<commit_msg>added notnull to createddate<commit_after>package ca.corefacility.bioinformatics.irida.model.workflow.submission;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import javax.validation.constraints.NotNull;

import org.hibernate.envers.Audited;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import ca.corefacility.bioinformatics.irida.model.joins.Join;
import ca.corefacility.bioinformatics.irida.model.project.Project;

/**
 * {@link Join} connection between an {@link AnalysisSubmission} and
 * {@link Project}
 */
@Entity
@Table(name = "project_analysis_submission", uniqueConstraints = @UniqueConstraint(columnNames = { "project_id",
		"analysis_submission_id" }))
@Audited
@EntityListeners(AuditingEntityListener.class)
public class ProjectAnalysisSubmissionJoin implements Join<Project, AnalysisSubmission> {
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	@NotNull
	@CreatedDate
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created_date")
	private Date createdDate;

	@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.DETACH)
	@JoinColumn(name = "project_id")
	private Project project;

	@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.DETACH)
	@JoinColumn(name = "analysis_submission_id")
	private AnalysisSubmission analysisSubmission;

	public ProjectAnalysisSubmissionJoin() {
	}

	public ProjectAnalysisSubmissionJoin(Project project, AnalysisSubmission analysisSubmission) {
		this.project = project;
		this.analysisSubmission = analysisSubmission;
	}

	@Override
	public Long getId() {
		return id;
	}

	@Override
{'fraction_non_alphanumeric': 0.09599056603773586, 'fraction_numerical': 0.0, 'mean_word_length': 7.108986615678776, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2411072', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1247, 'n_words': 236}