<commit_before>package au.com.subash.entity;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author subash
 */
@Entity
@Table(name = "TODOLIST")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Todolist.findAll", query = "SELECT t FROM Todolist t")
    , @NamedQuery(name = "Todolist.findById", query = "SELECT t FROM Todolist t WHERE t.id = :id")
    , @NamedQuery(name = "Todolist.findByTitle", query = "SELECT t FROM Todolist t WHERE t.title = :title")
    , @NamedQuery(name = "Todolist.findByIdAndUserId", query = "SELECT t FROM Todolist t WHERE t.id = :listId AND t.appuser.id = :userId")
})
public class Todolist implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @SequenceGenerator(name = "todolist_id_seq",
                       sequenceName = "todolist_id_seq",
                       allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE,
                    generator = "todolist_id_seq")
    @Basic(optional = false)
    @Column(name = "ID")
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "TITLE")
    private String title;
    @JoinColumn(name = "APPUSER", referencedColumnName = "ID")
    @ManyToOne(optional = false)
    private Appuser appuser;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "todolistid")
    private List<Todoitem> todoitemList;

    public Todolist() {
    }
<commit_msg>enable orphan removal on todolist entity<commit_after>package au.com.subash.entity;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author subash
 */
@Entity
@Table(name = "TODOLIST")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Todolist.findAll", query = "SELECT t FROM Todolist t")
    , @NamedQuery(name = "Todolist.findById", query = "SELECT t FROM Todolist t WHERE t.id = :id")
    , @NamedQuery(name = "Todolist.findByTitle", query = "SELECT t FROM Todolist t WHERE t.title = :title")
    , @NamedQuery(name = "Todolist.findByIdAndUserId", query = "SELECT t FROM Todolist t WHERE t.id = :listId AND t.appuser.id = :userId")
})
public class Todolist implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @SequenceGenerator(
      name = "todolist_id_seq",
      sequenceName = "todolist_id_seq",
      allocationSize = 1
    )
    @GeneratedValue(
      strategy = GenerationType.SEQUENCE,
      generator = "todolist_id_seq"
    )
    @Basic(optional = false)
    @Column(name = "ID")
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "TITLE")
    private String title;
    @JoinColumn(name = "APPUSER", referencedColumnName = "ID")
    @ManyToOne(optional = false)
    private Appuser appuser;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "todolistid", orphanRemoval = true)
    private List<Todoitem> todoitemList;

    public Todolist() {
    }

{'fraction_non_alphanumeric': 0.11052268017499424, 'fraction_numerical': 0.002763067004374856, 'mean_word_length': 4.265454545454546, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '5933219', 'n_tokens_mistral': 1357, 'n_tokens_neox': 1364, 'n_words': 313}