/*
 *  The MIT License (MIT)
 *
 *  View the full license at:
 *  https://github.com/hendrixjoseph/FamilyTree/blob/master/LICENSE.md
 *
 *  Copyright (c) 2015 Joseph Hendrix
 *
 *  Hosted on GitHub at https://github.com/hendrixjoseph/FamilyTree
 *
 */

package edu.wright.hendrix11.familyTree.entity.event;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.TypedQuery;

/**
 * @author Joe Hendrix <hendrix.11@wright.edu>
 */
@Entity
@DiscriminatorValue(value = "death")
@NamedQueries({
                      @NamedQuery(name = Death.FIND_ALL, query = "SELECT d FROM Death d"),
                      @NamedQuery(name = Death.COUNT_BY_YEAR,
                                  query = "SELECT COUNT(d.year), d.year FROM Death d WHERE d.year IS NOT NULL GROUP BY d.year ORDER BY d.year")

              })
public class Death extends SinglePersonEvent
{

    /**
     *
     */
    public static final String COUNT_BY_YEAR = "Death.countByYear";
    /**
     * Specifies the {@link String} that represents the {@link NamedQuery} to create a {@link TypedQuery} to get all
     * death records.
     * <p>
     * For example: {@code TypedQuery<Death> query = em.createNamedQuery(Death.FIND_ALL, Death.class);}
     */
    public static final String FIND_ALL = "Death.findAll";
}

@@ -597,46 +597,8 @@
 h%22)%0A
-@NamedQueries(%7B%0A                      
 @Nam
@@ -664,372 +664,55 @@
  d%22)
-,%0A                      @NamedQuery(name = Death.COUNT_BY_YEAR,%0A                                  query = %22SELECT COUNT(d.year), d.year FROM Death d WHERE d.year IS NOT NULL GROUP BY d.year ORDER BY d.year%22)%0A%0A              %7D)%0Apublic class Death extends SinglePersonEvent%0A%7B%0A%0A    /**%0A     *%0A     */%0A    public static final String COUNT_BY_YEAR = %22Death.countByYear%22;
+%0Apublic class Death extends SinglePersonEvent%0A%7B
 %0A   
@@ -886,16 +886,41 @@
 xample: 
+%0A     * %3Cblockquote%3E%3Cpre%3E
 %7B@code T
@@ -994,16 +994,35 @@
 class);%7D
+%3C/pre%3E%3C/blockquote%3E
 %0A     */

Update Death.java