@Override
    public List<Vector> getModules() {
        Query q = em.createQuery("SELECT m FROM Module m");
        List<Vector> entityList = new ArrayList();
        for (Object o : q.getResultList()) {
            ModuleEntity m = (ModuleEntity) o;
            Vector entity = new Vector();
            entity.add(m.getId());
            entity.add(m.getModuleCode());
            entity.add(m.getModuleTitle());
            entity.add(m.getTime());
            entity.add(m.getVenue());
            entity.add(m.getSynopsis().getContent());
            entity.add(m.getLecturer().getTitle() + " " + m.getLecturer().getName());
            entity.add(m.getTutorials());
            //students
            entityList.add(entity);
        }
        return entityList;
    }