/*
 *  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.place;

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

/**
 * @author Joe
 */
@Entity
@DiscriminatorValue(value = "cemetery")
@NamedQueries({
                      @NamedQuery(name = Cemetery.FIND_BY_NAME,
                                  query = "SELECT p FROM Cemetery p WHERE p.name = :name"),
                      @NamedQuery(name = Cemetery.FIND_ALL, query = "SELECT p FROM Cemetery p")
              })
public class Cemetery extends Place
{

    /**
     *
     */
    public static final String FIND_ALL = "Cemetery.findAll";

    /**
     *
     */
    public static final String FIND_BY_NAME = "Cemetery.findByName";

    /**
     *
     */
    public Cemetery()
    {
    }

    /**
     * @param name
     */
    public Cemetery(String name)
    {
        super(name);
    }

    /**
     * Returns the city that the cemetery is in.
     *
     * @return the city that the cemetery is in
     */
    public City getCity()
    {
        return (City) getRegionByClass(City.class);
    }

    /**
     * Returns the county that the cemetery is in.
     *
     * @return the county that the cemetery is in
     */
    public County getCounty()
    {
        return (County) getRegionByClass(County.class);
    }

    /**
     * Returns the country that the cemetery is in.
     *
     * @return the country that the cemetery is in
     */
    public Country getCountry()
    {
        return (Country) getRegionByClass(Country.class);
    }

    /**
     * Returns the state that the cemetery is in.
     *
     * @return the state that the cemetery is in
     */
    public State getState()
    {
        return (State) getRegionByClass(State.class);
    }

    @Override
    public String getLink()
    {
        return super.queryLink(toString());
    }
}

@@ -850,17 +850,16 @@
 Place%0A%7B%0A
-%0A
     /**%0A
@@ -868,94 +868,661 @@
    *
-%0A     */%0A    public static final String FIND_ALL = %22Cemetery.findAll%22;%0A%0A    /**%0A     *
+ Specifies the %7B@link String%7D that represents the %7B@link NamedQuery%7D to create a %7B@link TypedQuery%7D to get all%0A     * cemeteries.%0A     * %3Cp%3E%0A     * For example: %7B@code TypedQuery%3CCemetery%3E query = em.createNamedQuery(Cemetery.FIND_ALL, Cemetery.class);%7D%0A     */%0A    public static final String FIND_ALL = %22Cemetery.findAll%22;%0A%0A    /**%0A     * Specifies the %7B@link String%7D that represents the %7B@link NamedQuery%7D to create a %7B@link TypedQuery%7D to get all%0A     * cemeteries by name.%0A     * %3Cp%3E%0A     * For example: %7B@code TypedQuery%3CCemetery%3E query = em.createNamedQuery(Cemetery.FIND_BY_NAME, Cemetery.class);%7D %0A     * %7B@code query.setParameter(%22name%22, name);
 %0A   
@@ -1606,24 +1606,57 @@
   /**%0A     *
+ No-argument constructor for JPA.
 %0A     */%0A   
@@ -1713,16 +1713,41 @@
 ram name
+ the name of the cemetery
 %0A     */
@@ -2690,24 +2690,97 @@
 ss);%0A    %7D%0A%0A
+    /**%0A     * %7B@inheritDoc%7D%0A     *%0A     * @return %7B@inheritDoc%7D%0A     */%0A
     @Overrid

Update Cemetery.java