Commit fb27c55d4e67c2eb0f5618917a523f1ce97b2fb2
1 parent
2102c439
Modif nom classe : Mape -> Map
Showing
3 changed files
with
13 additions
and
22 deletions
Show diff stats
project/server_core/src/main/java/dao/HibernateDao.java
... | ... | @@ -127,11 +127,11 @@ public class HibernateDao { |
127 | 127 | return internal_getData(AccessPoint.class); |
128 | 128 | } |
129 | 129 | |
130 | - public boolean saveMap(final Mape mape){return internal_saveData(mape);} | |
131 | - public Mape getMap(int mapId){ | |
130 | + public boolean saveMap(final Map map){return internal_saveData(map);} | |
131 | + public Map getMap(int mapId){ | |
132 | 132 | TransactionCallBack callBack = execTransactionProcess((session)->{ |
133 | 133 | TransactionCallBack reply = new TransactionCallBack<RssiRecord>(); |
134 | - Query query = session.createQuery("from Mape m where m.id = :id"); | |
134 | + Query query = session.createQuery("from Map m where m.id = :id"); | |
135 | 135 | query.setParameter("id", mapId); |
136 | 136 | List<Object> results = query.list(); |
137 | 137 | for(Object result : results){ |
... | ... | @@ -140,7 +140,7 @@ public class HibernateDao { |
140 | 140 | } |
141 | 141 | return reply; |
142 | 142 | }); |
143 | - return (callBack.getResults().isEmpty()?null:(Mape)callBack.getResults().get(0)); | |
143 | + return (callBack.getResults().isEmpty()?null:(Map)callBack.getResults().get(0)); | |
144 | 144 | } |
145 | 145 | |
146 | 146 | private interface ITransactionProcess{ | ... | ... |
project/server_core/src/main/java/repository/Location.java
... | ... | @@ -15,7 +15,7 @@ public class Location implements Serializable { |
15 | 15 | |
16 | 16 | @OneToOne(fetch = FetchType.LAZY) |
17 | 17 | @JoinColumn(name = "id", nullable = false) |
18 | - private Mape mape; | |
18 | + private Map map; | |
19 | 19 | |
20 | 20 | public Location () { |
21 | 21 | } |
... | ... | @@ -40,11 +40,11 @@ public class Location implements Serializable { |
40 | 40 | this.y = y; |
41 | 41 | } |
42 | 42 | |
43 | - public Mape getMape () { | |
44 | - return mape; | |
43 | + public Map getMap() { | |
44 | + return map; | |
45 | 45 | } |
46 | 46 | |
47 | - public void setMape (final Mape mape) { | |
48 | - this.mape = mape; | |
47 | + public void setMap(final Map map) { | |
48 | + this.map = map; | |
49 | 49 | } |
50 | 50 | } | ... | ... |
project/server_core/src/main/java/repository/Mape.java renamed to project/server_core/src/main/java/repository/Map.java
... | ... | @@ -7,16 +7,15 @@ import java.io.Serializable; |
7 | 7 | * Created by Guillaume on 09/05/2017. |
8 | 8 | */ |
9 | 9 | @Entity |
10 | -@Table(name = "MAPE") | |
11 | -public class Mape implements Serializable{ | |
10 | +@Table(name = "MAP") | |
11 | +public class Map implements Serializable{ | |
12 | 12 | @Id @GeneratedValue |
13 | - private Integer id; | |
13 | + private int id; | |
14 | 14 | private Integer px_width, px_height; |
15 | 15 | private Byte[] content; |
16 | - private String desc; | |
17 | 16 | private Double m_width, m_height; |
18 | 17 | |
19 | - public Mape () { | |
18 | + public Map() { | |
20 | 19 | } |
21 | 20 | |
22 | 21 | public Integer getId () { |
... | ... | @@ -51,14 +50,6 @@ public class Mape implements Serializable{ |
51 | 50 | this.content = content; |
52 | 51 | } |
53 | 52 | |
54 | - public String getDesc () { | |
55 | - return desc; | |
56 | - } | |
57 | - | |
58 | - public void setDesc (final String desc) { | |
59 | - this.desc = desc; | |
60 | - } | |
61 | - | |
62 | 53 | public Double getM_width () { |
63 | 54 | return m_width; |
64 | 55 | } | ... | ... |