|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CountryService
Service class for country-related operations.
Method Summary | |
---|---|
ProvinceState |
createProvinceState(Country country,
java.lang.String value)
Creates a ProvinceState object for a particular Country . |
java.util.List<City> |
findCitiesByState(ProvinceState provinceState)
Finds a list of City objects for the given ProvinceState . |
City |
findCity(java.lang.String name,
ProvinceState provinceState)
Finds a City by name in the ProvinceState . |
City |
findCityById(java.lang.Integer id)
Finds a City object by ID. |
Country |
findCountryById(java.lang.Integer id)
Finds a Country object by ID. |
java.util.List<ProvinceState> |
findProvinceStatesByCountry(Country country)
Finds a List of ProvinceState objects for a particular
Country . |
ProvinceState |
findStateById(java.lang.Integer id)
Finds a ProvinceState object by ID. |
ProvinceState |
findStateByName(Country country,
java.lang.String name)
Finds a ProvinceState object by name within a particular
Country . |
java.util.List<Country> |
getCountries()
Returns all Country objects. |
java.util.List<ProvinceState> |
getProvinceStates()
Returns all ProvinceState objects. |
void |
init(javax.servlet.ServletContext context)
Invoked during the ServletContext initialization to populate the
database with sample data. |
Method Detail |
---|
ProvinceState createProvinceState(Country country, java.lang.String value)
ProvinceState
object for a particular Country
.
country
- The Country in which the ProvinceState is located.value
- The name of the ProvinceState.
java.util.List<City> findCitiesByState(ProvinceState provinceState)
City
objects for the given ProvinceState
.
provinceState
- The ProvinceState object for which to find cities.
City findCity(java.lang.String name, ProvinceState provinceState)
City
by name in the ProvinceState
.
name
- The name of the city.provinceState
- The province/state in which to find the city.
City findCityById(java.lang.Integer id)
City
object by ID.
id
- The ID of the city.
Country findCountryById(java.lang.Integer id)
Country
object by ID.
id
- The ID of the country.
java.util.List<ProvinceState> findProvinceStatesByCountry(Country country)
List
of ProvinceState
objects for a particular
Country
.
country
- The Country object.
ProvinceState findStateById(java.lang.Integer id)
ProvinceState
object by ID.
id
- The ID of the ProvinceState object.
ProvinceState findStateByName(Country country, java.lang.String name)
ProvinceState
object by name within a particular
Country
.
country
- The Country object.name
- The name of the ProvinceState to find.
java.util.List<Country> getCountries()
Country
objects.
java.util.List<ProvinceState> getProvinceStates()
ProvinceState
objects.
void init(@Observes javax.servlet.ServletContext context) throws java.lang.Exception
ServletContext
initialization to populate the
database with sample data.
context
- The ServletContext
object.
java.lang.Exception
- If something goes wrong.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |