Commit 7929f1b81d753a1d13ea69e7a508c8a47d99209c
1 parent
fa0b0a16
Ajout clss MapService chargé de gérer le back-office des servlets MapScale et MapBytes
Showing
1 changed file
with
24 additions
and
0 deletions
Show diff stats
project/server_core/src/main/java/service/MapService.java
0 → 100644
1 | +package service; | ||
2 | + | ||
3 | +import dao.HibernateDao; | ||
4 | +import repository.Map; | ||
5 | + | ||
6 | +/** | ||
7 | + * Created by Guillaume on 29/05/2017. | ||
8 | + */ | ||
9 | +public class MapService { | ||
10 | + | ||
11 | + private HibernateDao dao; | ||
12 | + | ||
13 | + public MapService(){ | ||
14 | + dao = new HibernateDao(); | ||
15 | + } | ||
16 | + | ||
17 | + public Byte[] getMapContent(int mapId){ | ||
18 | + return dao.getMap(mapId).getContent(); | ||
19 | + } | ||
20 | + | ||
21 | + public Map getMap(int mapId){ | ||
22 | + return dao.getMap(mapId); | ||
23 | + } | ||
24 | +} |