<commit_before>/*
 *  The MIT License (MIT)
 *
 *  View the full license at:
 *  https://github.com/hendrixjoseph/FamilyTree/blob/master/LICENSE.md
 *
 *  Copyright (c) 2015 <NAME>
 *
 *  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 = "state")
@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
{
    /**
     * Specifies the {@link String} that represents the {@link NamedQuery} to create a {@link
     * javax.persistence.TypedQuery} to get all states.
     * <p>
     * For example: {@code TypedQuery<State> query = em.createNamedQuery(State.FIND_ALL, State.class);}
     */
    public static final String FIND_ALL = "State.findAll";

    /**
     * Specifies the {@link String} that represents the {@link NamedQuery} to create a {@link
     * javax.persistence.TypedQuery} to get all states by name. It is expected, but not required, that only one state
     * exists per name.
     * <p>
     * For example: {@code TypedQuery<State> query = em.createNamedQuery(State.FIND_BY_NAME, State.class);} {@code
     * query..setParameter("name", name);
     */
    public static final String FIND_BY_NAME = "State.findByName";

    /**
     * Specifies the {@link String} that represents the {@link NamedQuery} to create a {@link
     * javax.persistence.TypedQuery} to get all states by name. It is expected, but not required, that only one state
     * exists per name and region.
     */
    public static final String FIND_BY_NAME_AND_REGION = "State.findByNameAndRegion";

    /**
     *
     */
    public State()
    {
    }

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

    /**
     * Returns the country that the state is in. Since most, if not all, states are US states, this will most likely
     * return USA.
     *
     * @return the country that the state is in
     */<commit_msg>Update State.java<commit_after>/*
 *  The MIT License (MIT)
 *
 *  View the full license at:
 *  https://github.com/hendrixjoseph/FamilyTree/blob/master/LICENSE.md
 *
 *  Copyright (c) 2015 <NAME>
 *
 *  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 = "state")
@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
{
    /**
     * Specifies the {@link String} that represents the {@link NamedQuery} to create a {@link
     * javax.persistence.TypedQuery} to get all states.
     * <p>
     * For example: {@code TypedQuery<State> query = em.createNamedQuery(State.FIND_ALL, State.class);}
     */
    public static final String FIND_ALL = "State.findAll";

    /**
     * Specifies the {@link String} that represents the {@link NamedQuery} to create a {@link
     * javax.persistence.TypedQuery} to get all states by name. It is expected, but not required, that only one state
     * exists per name.
     * <p>
     * For example: {@code TypedQuery<State> query = em.createNamedQuery(State.FIND_BY_NAME, State.class);} {@code
     * query..setParameter("name", name);
     */
    public static final String FIND_BY_NAME = "State.findByName";

    /**
     * Specifies the {@link String} that represents the {@link NamedQuery} to create a {@link
     * javax.persistence.TypedQuery} to get all states by name. It is expected, but not required, that only one state
     * exists per name and region.
     */
    public static final String FIND_BY_NAME_AND_REGION = "State.findByNameAndRegion";

    /**
     * No-argument constructor for JPA.
     */
    public State()
    {
    }

    /**
     * @param name the name of the state
     */
    public State(String name)
    {
        super(name);
    }

    /**
     * Returns the country that the state is in. Since most, if not all, states are US states, this will most likely
     * return USA.
     *
     * @return the country that the state is in
     */
{'fraction_non_alphanumeric': 0.10968743933216851, 'fraction_numerical': 0.0023296447291788003, 'mean_word_length': 2.6179775280898876, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '830277', 'n_tokens_mistral': 1531, 'n_tokens_neox': 1528, 'n_words': 482}