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. |
Constructor and Description |
---|
Country()
No-argument constructor for JPA.
|
Country(String name)
Creates a new country with the specified name.
|
Modifier and Type | Method and Description |
---|---|
String |
getLink()
Returns a URL String, typically either a Google query or Google map link.
|
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<Country> query = em.createNamedQuery(Country.FIND_BY_NAME, Country.class); query.setParameter("name", name);
public Country()
public Country(String name)
name
- the name of the countrypublic 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