<commit_before>package org.randomcoder.db;

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

import javax.persistence.*;

import org.randomcoder.article.moderation.ModerationStatus;
import org.randomcoder.content.ContentType;

/**
 * JPA entity representing an article comment.
 */
@NamedQueries({ @NamedQuery(name = "Comment.ForModeration", query = "from Comment c where c.moderationStatus = 'PENDING' order by c.creationDate") })
@Entity
@Table(name = "comments")
@SequenceGenerator(name = "comments", sequenceName = "comments_seq", allocationSize = 1)
public class Comment implements Serializable
{
	private static final long serialVersionUID = 7444605318685376170L;

	private Long id;
	private Article article;
	private ContentType contentType;
	private User createdByUser;
	private Date creationDate;
	private String anonymousUserName;
	private String anonymousEmailAddress;
	private String anonymousWebsite;
	private String title;
	private String content;
	private boolean visible;
	private ModerationStatus moderationStatus;
	private CommentReferrer referrer;
	private CommentIp ipAddress;
	private CommentUserAgent userAgent;

	/**
	 * Gets the ID for this comment.
	 * 
	 * @return id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "comments")<commit_msg>Added @Cache annotation to Comment<commit_after>package org.randomcoder.db;

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

import javax.persistence.*;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import org.hibernate.annotations.*;
import org.hibernate.annotations.Cache;
import org.randomcoder.article.moderation.ModerationStatus;
import org.randomcoder.content.ContentType;

/**
 * JPA entity representing an article comment.
 */
@NamedQueries({ @NamedQuery(name = "Comment.ForModeration", query = "from Comment c where c.moderationStatus = 'PENDING' order by c.creationDate") })
@Entity
@Table(name = "comments")
@SequenceGenerator(name = "comments", sequenceName = "comments_seq", allocationSize = 1)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Comment implements Serializable
{
	private static final long serialVersionUID = 7444605318685376170L;

	private Long id;
	private Article article;
	private ContentType contentType;
	private User createdByUser;
	private Date creationDate;
	private String anonymousUserName;
	private String anonymousEmailAddress;
	private String anonymousWebsite;
	private String title;
	private String content;
	private boolean visible;
	private ModerationStatus moderationStatus;
	private CommentReferrer referrer;
	private CommentIp ipAddress;
	private CommentUserAgent userAgent;

	/**
	 * Gets the ID for this comment.
	 * 
	 * @return id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "comments")
{'fraction_non_alphanumeric': 0.08585164835164835, 'fraction_numerical': 0.013736263736263736, 'mean_word_length': 5.985611510791367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5003126', 'n_tokens_mistral': 849, 'n_tokens_neox': 798, 'n_words': 237}