-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeviceController.java
More file actions
37 lines (29 loc) · 921 Bytes
/
DeviceController.java
File metadata and controls
37 lines (29 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.mkruchok.controller.implementation;
import com.mkruchok.controller.AbstractController;
import com.mkruchok.model.entity.Device;
import com.mkruchok.service.implementation.DeviceService;
import java.sql.SQLException;
import java.util.List;
public final class DeviceController implements AbstractController<Device> {
private final DeviceService service = new DeviceService();
@Override
public List<Device> findAll() throws SQLException {
return service.findAll();
}
@Override
public Device findById(Integer id) throws SQLException {
return service.findById(id);
}
@Override
public void create(Device entity) throws SQLException {
service.create(entity);
}
@Override
public void update(Integer id, Device entity) throws SQLException {
service.update(id, entity);
}
@Override
public void delete(Integer id) throws SQLException {
service.delete(id);
}
}