@SuppressWarnings("unchecked")
 @Override
 public Map<String, String> getProperties() {
   Session s = sessionFactory.openSession();
   s.beginTransaction();
   List<AgentState> propertyList =
       s.createQuery("from AgentState where agentId = ? and timestep = ?")
           .setParameter(0, agent.getID().toString())
           .setParameter(1, time)
           .list();
   Map<String, String> properties = new HashMap<String, String>();
   for (AgentState p : propertyList) {
     properties.put(p.getName(), p.getValue());
   }
   s.close();
   return properties;
 }