public void delete(Pagelet pagelet) {
    Session session = HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();

    session.delete(pagelet);
    session.getTransaction().commit();
  }
  public Long create(Pagelet pagelet) {
    Session session = HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();

    Long pageletId = (Long) session.save(pagelet);

    session.getTransaction().commit();
    return pageletId;
  }
  public Pagelet read(Long Id) {
    Session session = HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();

    Pagelet pagelet = (Pagelet) session.load(Pagelet.class, Id);
    session.getTransaction().commit();

    return pagelet;
  }