Modifier and Type | Field and Description |
---|---|
static String |
FIND_ALL
|
static String |
FIND_BY_NAME
Specifies the
String that represents the NamedQuery to create a TypedQuery to get all
counties by name. |
static String |
FIND_BY_NAME_AND_REGION
Specifies the
String that represents the NamedQuery to create a TypedQuery to get all
counties by name and region. |
Constructor and Description |
---|
County()
No-argument constructor for JPA.
|
County(String name)
Creates a new county with the specified name.
|
Modifier and Type | Method and Description |
---|---|
Country |
getCountry()
Returns the country that the county is in.
|
String |
getLink()
Returns a URL String, typically either a Google query or Google map link.
|
State |
getState()
Returns the state that the county is in.
|
equals, getId, getName, getPlaces, getRegion, hashCode, iterator, setId, setName, setRegion, toString
forEach, spliterator
public static final String FIND_ALL
String
that represents the NamedQuery
to create a TypedQuery
to get all
counties.
For example:
TypedQuery<County> query = em.createNamedQuery(County.FIND_ALL, County.class);
public static final String FIND_BY_NAME
String
that represents the NamedQuery
to create a TypedQuery
to get all
counties by name.
For example:
TypedQuery<County> query = em.createNamedQuery(County.FIND_BY_NAME, County.class); query.setParameter("name", name);
public static final String FIND_BY_NAME_AND_REGION
String
that represents the NamedQuery
to create a TypedQuery
to get all
counties by name and region.
For example:
TypedQuery<County> query = em.createNamedQuery(County.FIND_BY_NAME_AND_REGION, County.class); query.setParameter("name", name); query.setParameter("region", region);
public County()
public County(String name)
name
- the name the countypublic State getState()
public Country getCountry()
public String getLink()
"https://www.google.com/search?q="
while a Google map link follows the format "https://www.google.com/maps/place/"
.Copyright © 2015 Joseph Hendrix