Package entidades

Examples of entidades.Usuario


                try {
                    // Llamo para validar que no esten vacios los campos
                    validarDatos();

                    Usuario user = new Usuario();
                    user.setPassword(passText.getText());
                    user.setUsername(userText.getText());

                    String usuario = userText.getText();
                    String pass = passText.getText();

                    // Ya tengo los datos...
                    // Tengo que hacer la query ...
                    Usuario todos = (Usuario) ec.createQuery("select u from Usuario u where u.username = :usuario and u.password = :pass", Usuario.class).setParameter("usuario", usuario).setParameter("pass", pass).getSingleResult();


                    if ((todos.getPassword().equals(user.getPassword())) && (todos.getUsername().equals(user.getUsername()))) {
                            user.setUsername(userText.getText());
                            user.setPassword(passText.getText());
                            UsuarioActualLogueado.setUserLogueado(user);
                            pc = new PrincipalController(user);
                            pc.verificarPermisos();
View Full Code Here


        });
       
        asignaUserBtt.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                UsuarioController uc = new UsuarioController(new Usuario(policia.getPersona(), "", ""),true);
                final WindowsCreator creator = new WindowsCreator(PrincipalController.getInstance(null), uc,false);
                uc.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        creator.dispose();
View Full Code Here

        controller.persist(deRol4);
        controller.persist(deRol5);
        controller.persist(deRol6);
   

        Usuario u =new Usuario();
        u.setUsername("admin");
        u.setPassword("admin");
        u.setPersona(per);
        controller.persist(u);
       
        RolDeUsuario rdu = new RolDeUsuario(u, r);
        controller.persist(rdu);
       
View Full Code Here

TOP

Related Classes of entidades.Usuario

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.