Search in sources :

Example 6 with UserDbo

use of WEBPIECESxPACKAGE.base.libs.UserDbo in project webpieces by deanhiller.

the class AjaxCrudUserController method userList.

public Action userList() {
    EntityManager mgr = Em.get();
    Query query = mgr.createNamedQuery("findAllUsers");
    @SuppressWarnings("unchecked") List<UserDbo> users = query.getResultList();
    boolean showEditPopup = Current.flash().isShowEditPopup();
    return Actions.renderThis("users", users, "showPopup", showEditPopup);
}
Also used : EntityManager(javax.persistence.EntityManager) Query(javax.persistence.Query) UserDbo(WEBPIECESxPACKAGE.base.libs.UserDbo)

Aggregations

UserDbo (WEBPIECESxPACKAGE.base.libs.UserDbo)6 UserRole (WEBPIECESxPACKAGE.base.libs.UserRole)4 EntityManager (javax.persistence.EntityManager)4 Query (javax.persistence.Query)3 UseQuery (org.webpieces.plugins.hibernate.UseQuery)2 GET_ADD_USER_FORM (WEBPIECESxPACKAGE.base.crud.CrudUserRouteId.GET_ADD_USER_FORM)1 GET_EDIT_USER_FORM (WEBPIECESxPACKAGE.base.crud.CrudUserRouteId.GET_EDIT_USER_FORM)1 EducationEnum (WEBPIECESxPACKAGE.base.libs.EducationEnum)1 RoleEnum (WEBPIECESxPACKAGE.base.libs.RoleEnum)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 Singleton (javax.inject.Singleton)1 EntityTransaction (javax.persistence.EntityTransaction)1 Current (org.webpieces.ctx.api.Current)1 Em (org.webpieces.plugins.hibernate.Em)1 Action (org.webpieces.router.api.actions.Action)1 Actions (org.webpieces.router.api.actions.Actions)1 FlashAndRedirect (org.webpieces.router.api.actions.FlashAndRedirect)1 Redirect (org.webpieces.router.api.actions.Redirect)1 Render (org.webpieces.router.api.actions.Render)1