gt:         hash = 11 * hash + Objects.hashCode(this.name);
context: /*
   * To change this license header, choose License Headers in Project Properties.
   * To change this template file, choose Tools | Templates
   * and open the template in the editor.
   */
  package com.ul.entities;
  
  import java.io.Serializable;
  import java.util.Date;
  import java.util.HashSet;
  import java.util.Objects;
  import java.util.Set;
  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.Temporal;
  
  /**
   *
   * @author armri
   * this class describes an article
   * which can be selled during one auction
   * or possibly several if the first was eventually canceled
   */
  @Entity
  @NamedQueries({
      @NamedQuery(name = "Article.findAll",
      query = "SELECT c FROM Article c"),
  })
  public class Article implements Serializable {
      private static final long serialVersionUID = 1L;
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      @Column(name="ARTICLE_ID")
      private Long id;
      private String name;
      private String description;
      private int startingPrice;
      @OneToMany(cascade=CascadeType.ALL, mappedBy = "article", orphanRemoval=true)
      private Set<Category> categories;
      @Temporal(javax.persistence.TemporalType.DATE)
      private Date deadline;
      @OneToMany(cascade=CascadeType.ALL, mappedBy = "article", orphanRemoval=true)
      private Set<Auction> auctions;
      @ManyToOne
      @JoinColumn(name = "PERSON_ID")
      private Person person;
  
      public Article() {
          this.categories = new HashSet<>();
          this.auctions = new HashSet<>();
      }
  
      /**
       * getter on the id field of an article
       * @return the id of the article
       */
      public Long getId() {
          return id;
      }
  
      /**
       * the setter on the id field of an article
       * @param id the id field of this article
       */
      public void setId(Long id) {
          this.id = id;
      }
  
      /**
       * the getter on the name field of an article
       * @return the name of the article
       */
      public String getName() {
          return name;
      }
  
      /**
       * the setter on the name field of the article
       * @param name the name of the article
       */
      public void setName(String name) {
          this.name = name;
      }
  
      /**
       * the getter on the description field of an article
       * @return the description of this article
       */
      public String getDescription() {
          return description;
      }
  
      /**
       * the setter on the description field of an article
       * @return the description of the article
       */
      public void setDescription(String description) {
          this.description = description;
      }
  
      /**
       * getter on the starting price of an article
       * @return the starting price of an article
       */
      public int getStartingPrice() {
          return startingPrice;
      }
  
      /**
       * the setter on the starting price of an article
       * @param starting_price the new starting price for this article
       */
      public void setStartingPrice(int startingPrice) {
          this.startingPrice = startingPrice;
      }
  
      /**
       * the adder on the category field of an article
       * @param category the new category to add to the article
       */
      public void addCategory(Category category){
          this.categories.add(category);
      }
      
      /**
       * remove a category from the article
       * @param category the category to remove
       * @return true <=> the category has well been removed from the article
       */
      public boolean removeCategory(Category category) {
          return this.categories.remove(category);
      }
      
      /**
       * test if the article is related to a specific category
       * @param category the category to test
       * @return true <=> there exists a link between the article and the category
       */
      public boolean hasCategory(Category category) {
          return this.categories.contains(category);
      }
      
      /**
       * return the number of categories of this article
       * @return the size of the collections that hold the categories for this article
       */
      public int getCategoriesNumber() {
          return this.categories.size();
      }
  
      /**
       * the getter on the dead line of the article
       * @return the dead line of the article
       */
      public Date getDeadline() {
          return deadline;
      }
  
      /**
       * the setter on the dead line of the article
       * @param dead_line the new dead line for the article
       */
      public void setDeadline(Date deadline) {
          this.deadline = deadline;
      }
  
      /**
       * the adder on the auction field of an article
       * @param auction the new auction to add to the article
       */
      public void addAuction(Auction auction){
          this.auctions.add(auction);
      }
      
      /**
       * remove an auction from the article
       * @param auction the auction to remove
       * @return true <=> the auction has well be removed from the article
       */
      public boolean removeAuction(Auction auction) {
          return this.auctions.remove(auction);
      }
      
      /**
       * test if this article is selled in a specific auction
       * @param auction the auction to test
       * @return true <=> there exists a link between the article and the person
       */
      public boolean hasAuction(Auction auction) {
          return this.auctions.contains(auction);
      }
  
      /**
       * get the number of auction of this article
       * @return the number of auctions of this article
       */
      public int getAuctionsNumber() {
          return this.auctions.size();
      }
  
      /**
       * the getter of the person field of an article
       * @return the person field of this article
       */
      public Person getPerson() {
          return person;
      }
  
      /**
       * the setter on the person field of a person
       * @param person the new person for this person
       */
      public void setPerson(Person person) {
          this.person = person;
      }
  
      @Override
      public int hashCode() {
          int hash = 7;
  