@Override
    public Defi getDefi(long id) {
        Query query = em.createNamedQuery("getDefi").setParameter("id", id);
        try {
            return (Defi) query.getSingleResult();
        } catch(Exception e) {
            return null;
        }
    }