Examples of Users


Examples of Database.Users

        }

        @Override
        public void map(Object key, Text chunkURI, Context context) throws IOException, InterruptedException {

            Users otherUsers = new Users();
            Songs otherSongs = new Songs();
            KDDParser parser = new KDDParser(chunkURI.toString(), context.getConfiguration());
            parser.parse(otherSongs, otherUsers);


            //forall items i  //ith iteration
            for (Song i : mySongs) {

                //    forall items j  //split this into N parts
                for (Song j : otherSongs) {
                    double numerator = 0, denominator_left = 0, denominator_right = 0;

                    if (j.equals(i)) {
                        continue;
                    }

                    //        forall users user
                    int userCount = 0;
                    for (User user : myUsers) {
                        double num = 0, den_l = 0, den_r = 0;
//                        System.out.println("comparing! song: " + i.getID() + " and " + j.getID());
                        User other = otherUsers.getUser(user.getID());
                        if (other == null) {
                            continue;
                        }
                        if (user.rated(i) && other.rated(j)) {
//                            System.out.println("if (user.rated(i) && user.rated(j))! song: " + i.getID() + " and " + j.getID());
View Full Code Here

Examples of EntityBean.Users

    public void RegisteEvent() {
        try {
            if (user == null) {
                messages.taoTB(FacesMessage.SEVERITY_ERROR, "User null !", "");
            } else {
                Users login = this.loginFacade.getUserID(user);
                String title = (String) operationSession.layGTSession("title");
                int userID = login.getUserID();
                Enroll involve = this.involveFacade.getAllEnroll(userID, title);
                //involve.setMember1(this.member1Facade.find(memberID));
                involve.setPaymentStatus(true);
                if (involve != null) {
                    if (getQuantity() > 0) {
View Full Code Here

Examples of com.barsoft.memepost.entities.Users

            final File dataFile = new File(ctx.getRealPath(ctx.getInitParameter("data.file"))).getCanonicalFile();
            if (dataFile.isFile()) {
                ctx.log(String.format("Loading ChatUsers from: %s", dataFile.getAbsolutePath()));
                final ObjectInputStream in = new ObjectInputStream(new FileInputStream(dataFile));
                try {
                    final Users users = (Users) in.readObject();
                    ctx.setAttribute("users", users);
                } finally {
                    in.close();
                }
            }
View Full Code Here

Examples of com.esri.gpt.framework.security.principal.Users

*/
@Override
public Users readGroupMembers(String groupDN)
  throws IdentityException, NamingException, SQLException {
  LdapClient client = null;
  Users users = new Users();
  try {
    client = newServiceConnection();
    DirContext dirContext = client.getConnectedContext();
    LdapQueryFunctions queryF = client.getQueryFunctions();
    StringSet ssDNs = queryF.readGroupMembers(dirContext,groupDN);
    for (String sDN: ssDNs) {
      String sName = queryF.readUsername(dirContext,sDN);
      User user = new User();
      user.setDistinguishedName(sDN);
      user.setKey(user.getDistinguishedName());
      user.setName(sName);
      users.add(user);
    }
  } finally {
    if (client != null) client.close();
  }
  return users;
View Full Code Here

Examples of com.hdfs.user.bean.Users

  @Override
  public Users find(Users user) {
    Session session = this.getSession();
    Criteria crit = session.createCriteria(Users.class);
    crit.add(Restrictions.eq("userId", user.getUserId()));
    Users newuser = null;
    try {
      newuser = (Users) crit.uniqueResult();
    } catch (Exception e) {
      return null;
    } finally {
View Full Code Here

Examples of com.impetus.client.entity.Users

     *             the exception
     */
    @Test
    public void onInsertUsers() throws Exception
    {
        Users u = new Users();
        u.setFirstName("firstname");
        u.setLastName("lastname");
        u.setUserId("1_u");

        PromoCode promoCode1 = new PromoCode();
        promoCode1.setPromoCodeId("1_p");
        promoCode1.setPromoCodeName("promoname1");

        u.getPromoCodes().add(promoCode1);

        em.persist(u);

        em.clear(); // to avoid fetch from cache and get from DB.

        Users found = em.find(Users.class, "1_u");

        Assert.assertNotNull(found);
        Assert.assertEquals("firstname", found.getFirstName());
        Assert.assertEquals(1, found.getPromoCodes().size());

        // add 1 more promo code.

        PromoCode promoCode = new PromoCode();
        promoCode.setPromoCodeId("2_p");
        promoCode.setPromoCodeName("promoname2");

        found.getPromoCodes().add(promoCode);
        em.merge(found);

        em.clear(); // to avoid fetch from cache get from DB.

        found = em.find(Users.class, "1_u");

        Assert.assertNotNull(found);
        Assert.assertEquals("firstname", found.getFirstName());
        Assert.assertEquals(2, found.getPromoCodes().size());

        // Delete
        em.remove(found);

        found = em.find(Users.class, "1_u");
View Full Code Here

Examples of com.loc.pojo.Users

  private BaseDao baseDao;
 
  @SuppressWarnings("unchecked")
  public Users findByName(String account) throws Exception {
    String sql = "select * from loc_user where user_account='"+account+"'";
    Users user = baseDao.queryForObject(sql, Users.mapRow(Users.class));
    return user;
  }
View Full Code Here

Examples of com.narirelays.ems.persistence.orm.Users

    if(id==null)
    {
      result.setFailed(USER_ID_IS_NULL);
      return result;
    }
    Users user = usersDAO.findById(id);
    String oldName = user.getName();
    Object nameObject = properties.get("name");
    if(nameObject!=null&&!stringValue(nameObject).equals(oldName))
    {
      //名称发生改变了,返回错误提示前台
      result.setFailed(CANNOT_MODIFY_USER_NAME);
View Full Code Here

Examples of com.nevernote.domain.Users

    ctx.refresh();

    PreferencesService prefService = ctx.getBean("preferencesService", PreferencesService.class);
    ClientService cs = ctx.getBean("clientService", ClientService.class);
   
    Users user = (Users) session.getAttribute("userSession");
    if (user == null){
      response.sendRedirect("Login.jsp");
    }
    if (!user.getEnabled()) {
      response.sendRedirect("Login.jsp");
    }
   
    //Test that we got the user
    System.out.println("********Users object passed from Login**************");
    System.out.println( user.getId() );
    System.out.println("********************");
   
    // Obtain Collection of all Nodes (Folders + Notes )
    List<Notes> userNotes = new ArrayList<Notes>();
   
    userNotes = cs.findAllForUser(user.getId());
   
    if (userNotes == null || !userNotes.isEmpty()) {
      //Test Notes results on console
      for (Notes note : userNotes) {
        System.out.println("Here is a file name: " + note.getFileName());
      }
     
      String sortMethod = prefService.findOne(user.getId()).getSort();
      if (sortMethod.equals("ALPHA_ASCENDING")) {
        Collections.sort(userNotes);
      } else if (sortMethod.equals("ALPHA_DESCENDING")) {
        Collections.sort(userNotes, Collections.reverseOrder());
      }

      session.setAttribute("userNotes", userNotes);
     
    } else {
      session.setAttribute("userNotes", new ArrayList<Notes>());
    }
    System.out.println("No More notes for this user");
   
    Preferences userPref = prefService.findOne(user.getId());

    session.setAttribute("fontColor", ColorScheme.valueOf(userPref.getColors()).getFontColor());
    session.setAttribute("backColor", ColorScheme.valueOf(userPref.getColors()).getBackColor());

    response.sendRedirect("ClientDash.jsp");
View Full Code Here

Examples of com.vmware.bdd.entity.Users

         throws UsernameNotFoundException {
      JAXBContext jaxbContext;
      try {
         jaxbContext = JAXBContext.newInstance(Users.class);
         Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
         Users users =
               (Users) jaxbUnmarshaller.unmarshal(FileUtils.getConfigFile(
                     UserService.UsersFile, "Users"));
         User userDTO = null;
         boolean exsiting = false;
         boolean anonymous = false;
         if (users != null) {
            for (User user : users.getUsers()) {
               if (user.getName().equals(username)) {
                  exsiting = true;
                  userDTO = user;
                  break;
               } else if (user.getName().trim().equals("*")) {
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.