1 /*
2 * MapDAOImpl.java
3 *
4 * Created on February 11, 2003, 10:36 AM
5 */
6
7 package com.mlw.fps.model.business.dao.memmory;
8
9 import java.util.Collection;
10
11 import com.mlw.fps.model.business.dao.MapDAO;
12 import com.mlw.fps.model.business.vo.Map;
13 /***
14 *
15 * @author Matthew Wilson
16 */
17 public class MapDAOImpl implements MapDAO
18 {
19
20 /*** Creates a new instance of MapDAOImpl
21 */
22 public MapDAOImpl()
23 {
24 }
25
26 public Map getMapByPk(String mapPk)
27 {
28 return (Map)StaticData.instance().getMaps().get(mapPk);
29 }
30
31 public Map getMapByName(String name)
32 {
33 return (Map)StaticData.instance().getMapsByName().get(name);
34 }
35
36
37 public Collection getMaps()
38 {
39 return StaticData.instance().getMapsByName().values();
40 }
41
42 public void insert(Map map)
43 {
44 if( map.getPk()==null) map.setPk(StaticData.instance().next());
45
46 StaticData.instance().getMaps().put(map.getPk(),map);
47 StaticData.instance().getMapsByName().put(map.getName(),map);
48 }
49 }
This page was automatically generated by Maven