Package org.apache.webbeans.reservation.entity

Examples of org.apache.webbeans.reservation.entity.Users


        String pathInfo = context.getExternalContext().getRequestServletPath();
        System.out.println("pathInfo:"+pathInfo);
        if(pathInfo.startsWith("/admin") || pathInfo.startsWith("/user"))
        {
            SessionTracker tracker = null;
            Users user = null;
            try
            {
                tracker = (SessionTracker)context.getApplication().evaluateExpressionGet(context, "#{sessionTracker}", SessionTracker.class);
                user = tracker.getUser();
               
View Full Code Here


     * Register the user.
     */
    @Transactional
    public Users registerUser(String userName, String password, String name, String surname , int age, boolean admin)
    {       
        Users user = new Users();
       
        user.setUserName(userName);
        user.setPassword(password);
        user.setName(name);
        user.setSurname(surname);
        user.setAge(age);
        user.setRegisterDate(CalendarUtil.getCurrentDate());
        user.setAdmin(admin);
       
        entityManager.persist(user);
       
       
        return user;
View Full Code Here

TOP

Related Classes of org.apache.webbeans.reservation.entity.Users

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.