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

    /**
     * Contains the {@link String} to create a {@link javax.persistence.TypedQuery} to get all States.
     */
    public static final String FIND_ALL = "State.findAll";

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

    /**
     *
     */
    public static final String FIND_BY_NAME_AND_REGION = "State.findByNameAndRegion";

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

    /**
     * @return
     */
    @Override
    public String getLink()
    {
        return getName();
    }
}

@@ -998,15 +998,16 @@
   * 
-Contain
+Specifie
 s th
@@ -1022,16 +1022,73 @@
  String%7D
+ that represents the %7B@link javax.persistence.NamedQuery%7D
  to crea
@@ -1094,24 +1094,31 @@
 ate a %7B@link
+%0A     *
  javax.persi
@@ -1147,17 +1147,17 @@
 get all 
-S
+s
 tates.%0A 
@@ -1241,215 +1241,897 @@
    *
-%0A     */%0A    public static final String FIND_BY_NAME = %22State.findByName%22;%0A%0A    /**%0A     *%0A     */%0A    public static final String FIND_BY_NAME_AND_REGION = %22State.findByNameAndRegion%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 states by name. It is expected, but not required, that only one%0A     * state exists per name.%0A     */%0A    public static final String FIND_BY_NAME = %22State.findByName%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 states by name. It is expected, but not required, that only one%0A     * state exists per name and region.%0A     */%0A    public static final String FIND_BY_NAME_AND_REGION = %22State.findByNameAndRegion%22;%0A%0A    /**%0A     * Returns the country that the state is in. Since most, if not all, states are US states, this will%0A     * most likely return USA.%0A     * %0A     * @return the country that the state is i
 n%0A  
@@ -2261,16 +2261,61 @@
  @return
+ the state name%0A     * %0A     * @see getName()
 %0A     */

Update State.java