(int id)
| 135 | } |
| 136 | |
| 137 | public Server query(int id) throws Exception { |
| 138 | List<Server> ret = cache.query("query", id); |
| 139 | if (ret != null) { |
| 140 | |
| 141 | return ret.get(0); |
| 142 | } |
| 143 | |
| 144 | Server server = dao.queryForId(id); |
| 145 | |
| 146 | cache.set("query", id, server); |
| 147 | return server; |
| 148 | } |
| 149 | |
| 150 | public List<Server> queryAll() throws Exception { |
| 151 | List<Server> ret = cache.query("queryAll", 0); |
no test coverage detected