Examples of UserDao


Examples of org.onebusaway.users.services.UserDao

    User userA = createUser(1234);

    UserIndexKey key = new UserIndexKey(UserIndexTypes.PHONE_NUMBER,
        "12065551234");

    UserDao userDao = Mockito.mock(UserDao.class);
    _service.setUserDao(userDao);

    Mockito.when(userDao.getUserForId(1234)).thenReturn(userA);

    UserIndex migratedIndex = new UserIndex();
    migratedIndex.setId(key);
    migratedIndex.setUser(userA);
    migratedIndex.setCredentials("");
    Mockito.when(userDao.getUserIndexForId(key)).thenReturn(migratedIndex);

    UserIndexRegistrationService registrationService = Mockito.mock(UserIndexRegistrationService.class);
    _service.setUserIndexRegistrationService(registrationService);

    UserRegistration registration = new UserRegistration(1234, "5555");
View Full Code Here

Examples of org.opencustomer.db.dao.system.UserDAO

    protected void chooseEntity(EntityPanel panel, AddUserForm form, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        if (log.isDebugEnabled())
            log.debug("add user with ID: " + form.getId());

        UserVO user = new UserDAO().getById(form.getId());

        if (user == null)
        {
            errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("default.error.invalidEntity", new Integer(form.getId())));
View Full Code Here

Examples of org.openstreetmap.osmosis.pgsimple.v0_6.impl.UserDao

   
    // Create an action dao but disable it so that no records will be written.
    actionDao = new ActionDao(dbCtx, false);
   
    userSet = new HashSet<Integer>();
    userDao = new UserDao(dbCtx, actionDao);
   
    nodeBuilder = new NodeMapper();
    wayBuilder = new WayMapper(enableBboxBuilder, enableLinestringBuilder);
    relationBuilder = new RelationMapper();
    nodeTagBuilder = new TagMapper(nodeBuilder.getEntityName());
View Full Code Here

Examples of org.opentides.persistence.UserDAO

    UserServiceImpl.roles = roles;
  }

  @Override
  public void requestPasswordReset(String emailAddress) {
    UserDAO userDAO = (UserDAO) getDao();
    if (!userDAO.isRegisteredByEmail(emailAddress))
      throw new InvalidImplementationException(
          "Email ["
              + emailAddress
              + "] was not validated prior to calling this service. Please validate first.");
    PasswordReset passwd = new PasswordReset();
View Full Code Here

Examples of org.projectforge.user.UserDao

        dbUpdateTable.addAttributes("updateDate", "regionId", "versionString", "executionResult", "executedBy", "description");
        dao.createTable(dbUpdateTable);
        dao.addTableAttributes(userTable, new TableAttribute(PFUserDO.class, "dateFormat"));
        dao.addTableAttributes(userTable, new TableAttribute(PFUserDO.class, "excelDateFormat"));
        dao.addTableAttributes(userTable, new TableAttribute(PFUserDO.class, "timeNotation"));
        final UserDao userDao = Registry.instance().getDao(UserDao.class);
        dao.createMissingIndices();
        userDao.getUserGroupCache().setExpired();
        return UpdateRunningStatus.DONE;
      }
    });
    return list;
  }
View Full Code Here

Examples of org.sete.enterprise.dao.common.UserDao

  @Test
  public void testUserIdNotStudent() {
    // assemble core of test requirements
    service = new ScienceProjectServiceImpl();

    UserDao userDaoMock = createMock(UserDao.class);
    ScienceProjectDao spDaoMock = createMock(ScienceProjectDao.class);

    ((ScienceProjectServiceImpl) service).setUserDao(userDaoMock);
    ((ScienceProjectServiceImpl) service).setProjectDao(spDaoMock);

    // mock the dao's
    expect(userDaoMock.findById(sponsorId)).andReturn(sponsor);
    replay(userDaoMock);

    expect(spDaoMock.findBy(sponsor)).andReturn(null);
    replay(spDaoMock);
View Full Code Here

Examples of org.sonar.core.user.UserDao

  @Before
  public void initResourcePermissions() {
    session = getMyBatis().openSession(false);
    project = new Project("project").setId(PROJECT_ID.intValue());
    settings = new Settings();
    permissionFacade = new PermissionFacade(new RoleDao(), new UserDao(getMyBatis()), new ResourceDao(getMyBatis(), System2.INSTANCE),
      new PermissionTemplateDao(getMyBatis(), System2.INSTANCE), settings);
    permissions = new DefaultResourcePermissions(getMyBatis(), permissionFacade);
  }
View Full Code Here

Examples of org.xulfaces.rubis.admin.dao.UserDAO

    return items;
  }


  public Collection<Item> getItemsForCategory(Category category) {
    UserDAO userDAO = null;
    try {
      userDAO = new JDBCUserDAO();
    } catch (Exception e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
    }
    Collection<Item> items = new ArrayList<Item>();

    StringBuffer sqlBuffer = new StringBuffer();
    sqlBuffer.append("SELECT * FROM items WHERE CATEGORY=");
    sqlBuffer.append(category.getId());
    ResultSet resultSet = null;
    try {
      resultSet = excecuteScrollableQuery(sqlBuffer.toString());
      while (resultSet.next()) {
        Item item = new Item();
        item.setId(new Integer(resultSet.getInt("ID")));
        item.setName(resultSet.getString("NAME"));     
        try {
          item.setSeller(userDAO.loadUser(new Integer(resultSet.getInt("SELLER"))));
        } catch (UserNotFoundException e) {         
          e.printStackTrace();
        }
        item.setCategory(category);
        item.setBuyNow(resultSet.getFloat("BUY_NOW"));
View Full Code Here

Examples of oss.ngocminh.lego.persistence.UserDAO

  }

  private Entity getUser(String email) throws ServletException {
    try {
      Connection conn = getConnection();
      UserDAO userDAO = new UserDAO(conn);
      Entity user = userDAO.findByEmail(email);
      conn.close();
      return user;
    } catch (SQLException e) {
      throw new ServletException(e);
    }
View Full Code Here

Examples of ru.org.linux.user.UserDao

    String memberName = Parser.escape(txtNode.getText()).trim();
    TagNode tagNode = (TagNode)node;
    RootNode rootNode = tagNode.getRootNode();
    ToHtmlFormatter toHtmlFormatter = rootNode.getToHtmlFormatter();
    boolean secure = rootNode.isSecure();
    UserDao userDao = rootNode.getUserDao();
    String result;
    try {
      if(userDao != null && toHtmlFormatter != null){
        User user = rootNode.getUserDao().getUser(memberName);
        if (!user.isBlocked()) {
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.