/*
 *  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 = "3")
@NamedQueries({
                      @NamedQuery(name = County.FIND_BY_NAME, query = "SELECT p FROM County p WHERE p.name = :name"),
                      @NamedQuery(name = County.FIND_ALL, query = "SELECT p FROM County p")
              })
public class County extends Place
{

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

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

    /**
     * @return
     */
    public Country getCountry()
    {
        return (Country) getRegionByClass(Country.class);
    }

    /**
     * @return
     */
    public State getState()
    {
        return (State) getRegionByClass(State.class);
    }

    /**
     * @return
     */
    @Override
    public String getLink()
    {
        StringBuilder sb = new StringBuilder(getName());

        State state = getState();

        if ( state != null )
        {
            sb.append(", ").append(state.getName());
        }

        return sb.toString();
    }
}

@@ -799,17 +799,16 @@
 Place%0A%7B%0A
-%0A
     /**%0A
@@ -817,190 +817,709 @@
    *
-%0A     */%0A    public static final String FIND_ALL = %22County.findAll%22;%0A%0A    /**%0A     *%0A     */%0A    public static final String FIND_BY_NAME = %22County.findByName%22;%0A%0A    /**%0A     * @retur
+ Specifies the %7B@link String%7D that represents the %7B@link javax.persistence.NamedQuery%7D to create a %7B@link%0A     * javax.persistence.TypedQuery%7D to get all counties.%0A     */%0A    public static final String FIND_ALL = %22County.findAll%22;%0A%0A    /**%0A     * Specifies the %7B@link String%7D that represents the %7B@link javax.persistence.NamedQuery%7D to create a %7B@link%0A     * javax.persistence.TypedQuery%7D to get all counties by name.%0A     */%0A    public static final String FIND_BY_NAME = %22County.findByName%22;%0A%0A    /**%0A     * Returns the country that the county is in. Since most, if not all, counties are in the US, this will%0A     * most likely return the USA.%0A     * %0A     * @return the country that the county is i
 n%0A  
@@ -1634,38 +1634,126 @@
 %0A    /**%0A     * 
-@retur
+Returns the state that the county is in.%0A     * %0A     * @return the state that the county is i
 n%0A     */%0A    pu
@@ -1856,23 +1856,66 @@
 %0A     * 
-@return
+%7B@inheritDoc%7D%0A     * %0A     * @return %7B@inheritDoc%7D
 %0A     */

Update County.java