- Create class
Driver
.
public class Driver {
private Long id;
private String name;
private String licenseNumber;
}
- Create
ManufacturerService
and its implementation. Annotations@Service
and@Inject
have already been given to you.
- Manufacturer create(Manufacturer manufacturer);
- Manufacturer get(Long id);
- List<Manufacturer> getAll();
- Manufacturer update(Manufacturer manufacturer);
- boolean delete(Long id);
- Create Dao and Service layers for
Driver
and their implementations.
- Driver create(Driver driver);
- Driver get(Long id);
- List<Driver> getAll();
- Driver update(Driver driver);
- boolean delete(Long id);
- Do not forget about DB naming rules mentioned in previous homework.
- Test your code in
main
. - Main should only contain invocation of
Service
methods, no Dao methods allowed inmain
. - Do not forget about Dependency Injection. Use your annotations.
You can check yourself using this checklist