Package java.util

Examples of java.util.HashMap.containsKey()


      remote.setDataSource(dataSource);
      usrResult = remote.authenticateUser(username, password);
      // Check to make sure the usrResult has all the fields we expect of it.
      // if so then it was a valid login, if not, then we will fail with a general
      // authentication error.
      if (usrResult.containsKey("individualid") && usrResult.containsKey("firstName") && usrResult.containsKey("lastName") && usrResult.containsKey("type")) {
        int individualId = Integer.parseInt((String)usrResult.get("individualid"));
        userType = (String)usrResult.get("type");
        String firstName = (String)usrResult.get("firstName");
        String lastName = (String)usrResult.get("lastName");
View Full Code Here


      remote.setDataSource(dataSource);
      usrResult = remote.authenticateUser(username, password);
      // Check to make sure the usrResult has all the fields we expect of it.
      // if so then it was a valid login, if not, then we will fail with a general
      // authentication error.
      if (usrResult.containsKey("individualid") && usrResult.containsKey("firstName") && usrResult.containsKey("lastName") && usrResult.containsKey("type")) {
        int individualId = Integer.parseInt((String)usrResult.get("individualid"));
        userType = (String)usrResult.get("type");
        String firstName = (String)usrResult.get("firstName");
        String lastName = (String)usrResult.get("lastName");
View Full Code Here

      if (lookupType != null && lookupType.equals("lookupSubItem")) {
        lookupDecorationFlag = false;
      }
    }

    if (decoratorMap != null && decoratorMap.containsKey(indexInteger) && lookupDecorationFlag) {
      FieldDecoration decoration = null;
      if (folderName != null && folderName.equals(MailFolderVO.DRAFTS_FOLDER_NAME)) {
        decoration = (FieldDecoration) decoratorMap.get(new Integer(ValueListConstants.ICON_INDEX_FOLDER));
      } else if (folderName != null && folderName.equals(MailFolderVO.TEMPLATES_FOLDER_NAME)) {
        decoration = (FieldDecoration) decoratorMap.get(new Integer(ValueListConstants.ICON_INDEX_EMAIL_TEMPLATES));
View Full Code Here

          HashMap fieldMap = new HashMap();
          fieldMap.put("key", parts[0].trim());
          fieldMap.put("value", parts[1].trim());
         
          HashMap validField = this.isValidField((String)fieldMap.get("key"), type);
          if (validField != null && validField.containsKey("name"))
          {
            fieldMap.put("fieldName", validField.get("fieldName"));
            fields.add(fieldMap);
          }
        }
View Full Code Here

      String gtnGroupName = getGtnGroupName(jbidGroup.getName());

      ExtGroup exoGroup = new ExtGroup(gtnGroupName);

      if (attrs.containsKey(GROUP_DESCRIPTION) && attrs.get(GROUP_DESCRIPTION).getValue() != null)
      {
         exoGroup.setDescription(attrs.get(GROUP_DESCRIPTION).getValue().toString());
      }
      if (attrs.containsKey(GROUP_LABEL) && attrs.get(GROUP_LABEL).getValue() != null)
      {
View Full Code Here

      if (attrs.containsKey(GROUP_DESCRIPTION) && attrs.get(GROUP_DESCRIPTION).getValue() != null)
      {
         exoGroup.setDescription(attrs.get(GROUP_DESCRIPTION).getValue().toString());
      }
      if (attrs.containsKey(GROUP_LABEL) && attrs.get(GROUP_LABEL).getValue() != null)
      {
         exoGroup.setLabel(attrs.get(GROUP_LABEL).getValue().toString());
      }
      // UI requires that group has label
      else
View Full Code Here

    Integer obj = new Integer(1);
    HashMap test = new HashMap();
    int collisions = 0;
    for(int i = 0 ; i < 1000000 ; i++) {
      String id = RandomUtils.generateRandomAlphanumerics( 20 );
      if(test.containsKey(id)) {
        collisions++;
      } else {
        test.put(id,obj);
      }
      if(i%1000 == 0) {
View Full Code Here

  public boolean hasProperty(String key) {
    for (int k = chain.size() - 1; k >= 0; --k) {
      Object obj[] = (Object[]) chain.get(k);
      HashMap prop = (HashMap) obj[1];
      if (prop.containsKey(key))
        return true;
    }
    return false;
  }
View Full Code Here

        String column  = (String)hm.get("column");               

        if (map.containsKey(module)) // if allready exist
        {
          HashMap presentMap = (HashMap)map.get(module);
          if (presentMap.containsKey(table))
          {
            Vector colvec = (Vector)presentMap.get(table);
            colvec.add(column);
            presentMap.put(table,colvec);
            map.put(module,presentMap);
View Full Code Here

            {
              hm = (HashMap) it.next();
            }
            if (hm != null)
            {
              if(hm.containsKey("cvid"))
              {
                cvid = ( (Long) hm.get("cvid")).intValue();
              }
            }
          }catch(Exception e)
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.