public class Country
extends java.lang.Object
implements java.io.Serializable
SELECT country.code as Code, country.name as Name, country.continent as Continent, city.name as Capital FROM jearl.countries AS country JOIN jearl.cities AS city ON country.capital = city.id WHERE country.continent = ? ORDER BY Name
Constructor and Description |
---|
Country()
Constructing a default Country.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
This is the equals method for the Country class.
|
java.lang.String |
getCapital()
This return the Country Capital.
|
java.lang.String |
getCode()
This return the Country Code.
|
java.lang.String |
getContinent()
This return the Country Continent.
|
java.lang.String |
getName()
This return the Country Name.
|
int |
hashCode()
This is the hashCode method for the Country class.
|
void |
setCapital(java.lang.String capital)
This set the Country Capital.
|
void |
setCode(java.lang.String code)
This set the Country Code.
|
void |
setContinent(java.lang.String continent)
This set the Country Continent.
|
void |
setName(java.lang.String name)
This set the Country Name.
|
java.lang.String |
toString()
This is the toString for the Country class.
|
public Country()
public java.lang.String getCode()
public void setCode(java.lang.String code)
code
- the code input valuejava.lang.IllegalArgumentException
- if the input code is invalidpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- input value to setjava.lang.IllegalArgumentException
- if the input name is invalidpublic java.lang.String getCapital()
public void setCapital(java.lang.String capital)
capital
- input value to setjava.lang.IllegalArgumentException
- if the input capital is invalidpublic java.lang.String getContinent()
public void setContinent(java.lang.String continent)
continent
- input value to setjava.lang.IllegalArgumentException
- if the input continent is invalidpublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object