February 2019
Intermediate to advanced
446 pages
10h 55m
English
The RestaurantRepository interface defines two new methods: the containsName and findByName methods. It also extends the Repository interface:
public interface RestaurantRepository<Restaurant, String> extends Repository<Restaurant, String> {
boolean containsName(String name) throws Exception;
public Collection<Restaurant> findByName(String name) throws Exception;
}
The Repository interface defines three methods: add, remove, and update. It also extends the ReadOnlyRepository interface:
public interface Repository<TE, T> extends ReadOnlyRepository<TE, T> {
void add(TE entity);
void remove(T id);
void update(TE entity);
}
The ReadOnlyRepository interface definition contains the get and getAll methods, which return Boolean ...
Read now
Unlock full access