Package rs.etf.sab.operations
Interface CityOperations
public interface CityOperations
-
Method Summary
Modifier and TypeMethodDescriptionboolean
deleteCity
(int idCity) Delete city by primary key.int
deleteCity
(String... names) Delete cities by name.Get primary keys of all cities in the system.int
insertCity
(String name, String postalCode) Insert new city.
-
Method Details
-
insertCity
Insert new city.- Parameters:
name
- - the name of the city.postalCode
- - postal code for the city.- Returns:
- new row's primary key on success, or -1 on failure.
-
deleteCity
Delete cities by name.- Parameters:
names
- - names of the cities to be deleted.- Returns:
- number of deleted records.
-
deleteCity
boolean deleteCity(int idCity) Delete city by primary key.- Parameters:
idCity
- - primary key of the city to be deleted.- Returns:
- success of operation.
-
getAllCities
Get primary keys of all cities in the system.
-