Examples of UserDao


Examples of com.tapestry5book.services.UserDao

        }
    }

    @Test
    public void findByNonExistingName() {
        UserDao dao = registry.getService(UserDao.class);

        User user = dao.findByName("igor");

        assertNull(user);
    }
View Full Code Here

Examples of com.tcs.hrr.dao.UserDAO

    System.out.println("After setUpBeforeClass");
  }

  @Test
  public void testSave() {
    UserDAO ud = (UserDAO)ctx.getBean("userDaO");
    User t_User = new User("test2","test2");
    ud.save(t_User);
    System.out.println("testSave getIdUser="+t_User.getUserId());
  }
View Full Code Here

Examples of com.ursu.server.dao.UserDao

  @Override
  public CreateUserResult execute(CreateUser action, ExecutionContext context)
      throws ActionException {
    //This should reeeeaaaaaly be cleaned out
    UserDao dao = new UserDao();
   
    log.severe("\nReceived user:"+
          "\n Username: "+ action.getUserToCreate().getUsername()+
          "\n Recieved password: "+ action.getUserToCreate().getHashedPassword()+
          "\n Email: " +action.getUserToCreate().getEmail());
    String sessionId = null;
    String dataStoreId = null;
    User userToCreate = action.getUserToCreate();
   
    if(userToCreate == null )
    {
      log.severe("\nreturned because userToCreate was null!!!");
      return new CreateUserResult(sessionId, dataStoreId);
    }
    else {
      dataStoreId =  dao.createUser(userToCreate);
      log.severe("\n From dao.CreateUser(), the datastoreId is: " +dataStoreId);
      if (dataStoreId != null) {
        HttpSession session = requestProvider.get().getSession();
        session.setAttribute("login.authenticated", userToCreate.getUsername());
        sessionId = session.getId();
View Full Code Here

Examples of com.vsked.dao.UserDAO

    String username=request.getParameter("username");
    String userpwd=request.getParameter("userpwd");
    Usert user=new Usert(username,userpwd);
    HttpSession session=request.getSession(true);
   
    if(new UserDAO().CheckLogin(user)){
      session.setAttribute("user","登陆成功!")
      response.sendRedirect("loginok.jsp");
    }else{
      session.setAttribute("err", "登陆失败!")
      response.sendRedirect("index.jsp");     
View Full Code Here

Examples of com.vst.dao.UserDao

    public static void setupContext(ServletContext context) {
        ApplicationContext ctx =
            WebApplicationContextUtils.getRequiredWebApplicationContext(context);

        UserDao udao = (UserDao) ctx.getBean("userDao");
        udao.refreshUsersCache();


        LookupManager mgr = (LookupManager) ctx.getBean("lookupManager");

View Full Code Here

Examples of com.wesabe.grendel.entities.dao.UserDAO

    protected Session session;
    protected UserDAO dao;
   
    public void setup() throws Exception {
      this.session = mock(Session.class);
      this.dao = new UserDAO(new Provider<Session>() {
        @Override
        public Session get() {
          return session;
        }
      });
View Full Code Here

Examples of dao.UserDAO

    prepareData(model, request);
    String page = "login";
    if (request.getParameter("Login") != null) {
      String taikhoan = request.getParameter("taikhoan");
      String matkhau = request.getParameter("matkhau");
      UserDAO khDAO = new UserDAOImpl();
      User kh = khDAO.getUserInfo(taikhoan);
      if (kh != null && matkhau.equals(kh.getPassword())) {

        request.setAttribute("TaiKhoan", taikhoan,
            WebRequest.SCOPE_SESSION);
        request.setAttribute("HoTen", kh.getName(),
View Full Code Here

Examples of daos.UserDao

        ElasticSearchManager esManager = new ElasticSearchManager(configuration.datadir);
        environment.manage(esManager);

        // Create daos
        ArticleDao articleDao = new ArticleDaoImpl(esManager.getNode(), getJson());
        UserDao userDao = new UserDaoImpl(esManager.getNode(), getJson());

        // Create caching authenticator
        CachingAuthenticator<BasicCredentials, User> authenticator = CachingAuthenticator.wrap(new ElasticSearchAuthenticator(userDao),
                CacheBuilderSpec.parse("maximumSize=5,expireAfterAccess=5m"));
        environment.addProvider(new BasicAuthProvider<User>(authenticator, "Admin stuff"));
View Full Code Here

Examples of de.iritgo.aktera.authentication.defaultauth.entity.UserDAO

    refreshAktarioJournalList(journalEntry);
  }

  private void refreshAktarioJournalList(JournalEntry journalEntry)
  {
    UserDAO userDAO = (UserDAO) SpringTools.getBean(UserDAO.ID);
    de.iritgo.aktera.authentication.defaultauth.entity.AkteraUser userAktera = userDAO.findUserById(journalEntry
            .getOwnerId());

    Properties props = new Properties();

    props.setProperty("akteraUserName", userAktera.getName());
View Full Code Here

Examples of de.peacei.gae.foodsupplier.data.dao.UserDAO

      final Key key = KeyFactory.stringToKey(menuKey);
     
      if(menuDAO.isMenuKey(key)) {
        final Comment comment = new Comment();
       
        final UserDAO userDAO = new UserDAO();
        User user = userDAO.getUserViaMail(email);
        if(user == null) {
          user = new User();
          user.setEmail(email);
          user.setName(name);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.