@RequiresSession
  public WidgetEntity findById(Long id) {
    return entityManagerProvider.get().find(WidgetEntity.class, id);
  }
DAO utilities for dealing mostly with {@link TypedQuery} results.
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/WidgetDAO.java