Package java.util

Examples of java.util.HashMap$EntrySet


        wrapped.putAll(t);
    }

    public synchronized void clear() {
        if (!modified) {
            wrapped = new HashMap(wrapped);
            modified = true;
        }
        wrapped.clear();
    }
View Full Code Here


     * @param start ...
     * @param value ...
     */
    public void put(String name, Scriptable start, Object value) {
        if (map == null) {
            map = new HashMap();
        }

        if (value == null || value == Undefined.instance) {
            map.remove(name);
        } else if (value instanceof Wrapper) {
View Full Code Here

     * @param start ...
     * @param value ...
     */
    public void put(int idx, Scriptable start, Object value) {
        if (map == null) {
            map = new HashMap();
        }

        if (value == null || value == Undefined.instance) {
            map.remove(Integer.toString(idx));
        } else if (value instanceof Wrapper) {
View Full Code Here

    /**
     * Return the wrapped Map object.
     */
    public Object unwrap() {
        if (map == null) {
            map = new HashMap();
        }
        return map;
    }
View Full Code Here

  getBrowserHeaders(
    String          referer )
  {
    String  headers_to_use = getBrowserHeadersToUse( null );
   
    Map  result = new HashMap();
   
    try{
   
      String header_string = new String( Base64.decode( headers_to_use ), "UTF-8" );
   
      String[]  headers = header_string.split( "\n" );
     
      for (int i=0;i<headers.length;i++ ){
     
        String  header = headers[i];
       
        int  pos = header.indexOf( ':' );
       
        if ( pos != -1 ){
         
          String  lhs = header.substring(0,pos).trim();
          String  rhs  = header.substring(pos+1).trim();
         
          if ( !( lhs.equalsIgnoreCase( "Host") ||
              lhs.equalsIgnoreCase( "Referer" ))){
           
            result.put( lhs, rhs );
          }
        }
      }
     
      if ( referer != null && referer.length() > 0){
       
        result.put( "Referer", referer );
      }
    }catch( Throwable e ){   
    }
   
    return( result );
View Full Code Here

        // in other words, make sure our threshold for table rotation is lower
        // than that of the underlying HashMap for table rehashing.
        eachCapacity = (int) (threshold / loadFactor) + 2;
        // create tables - we'll never insert into the initial oldTable,
        // it's a dummy that will be lost on the first cache rotation.
        oldTable = new HashMap();
        newTable = createTable(eachCapacity, loadFactor);
    }
View Full Code Here

     * @param capacity the initial capacity
     * @param loadFactor the load factor
     * @return a new Map used for internal caching
     */
    protected Map createTable(int capacity, float loadFactor) {
        return new HashMap(capacity, loadFactor);
    }
View Full Code Here

  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();

    try {
      HashMap hm = new HashMap();

      Vector vecView = new Vector();
      Vector vecAll = new Vector();
      Vector vecSchedule = new Vector();
      Vector vecSend = new Vector();

      Collection colview = new ArrayList();
      Collection colAll = new ArrayList();
      Collection colschedule = new ArrayList();
      Collection colsend = new ArrayList();

      String typeofModule = "";

      HttpSession session = request.getSession(true);
      com.centraview.common.UserObject userobjectd = (com.centraview.common.UserObject)session.getAttribute("userobject"); //get the user object
      int individualId = userobjectd.getIndividualID();

      ListGenerator lg = ListGenerator.getListGenerator(dataSource);

      String moduleName = "";
      typeofModule = (String)request.getParameter("TYPEOFMODULE");

      if (typeofModule == null) {
        typeofModule = (String)request.getAttribute("TYPEOFMODULE");
      }
      if (typeofModule == null) {
          typeofModule = Constants.EMAILMODULE;
      }     

      if (typeofModule != null) {
        if (typeofModule.equals(Constants.ACTIVITYMODULE)) {
          moduleName = Constants.ACTIVITYMODULE;
        } else if (typeofModule.equals(Constants.EMAILMODULE)) {
          moduleName = Constants.EMAILMODULE;
        }
      }
     
      PreferenceHome prefHome = (PreferenceHome)CVUtility.getHomeObject("com.centraview.preference.PreferenceHome", "Preference");
      Preference prefRemote = (Preference)prefHome.create();
      prefRemote.setDataSource(dataSource);
     
      if (moduleName.equals(Constants.ACTIVITYMODULE)) {
      hm = prefRemote.getUserDelegation(individualId, moduleName);
        vecView = (Vector)hm.get(Constants.VIEW);
        vecSchedule = (Vector)hm.get(Constants.SCHEDULEACTIVITY);
        vecAll = (Vector)hm.get(Constants.VIEWSCHEDULEACTIVITY);
      } else if (moduleName.equals(Constants.EMAILMODULE)) {
      Vector emailVecSend = prefRemote.getEmailDelegation(individualId);
        vecView = (Vector)hm.get(Constants.VIEW);
        vecSend = emailVecSend;
        vecAll = (Vector)hm.get(Constants.VIEWSENDEMAIL);
      }

      ContactFacadeHome facadeHome = (ContactFacadeHome)CVUtility.getHomeObject("com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
      ContactFacade cfremote = (ContactFacade) facadeHome.create();
      cfremote.setDataSource(dataSource);

      // get the records from the database
      Collection sqlResults = cfremote.getEmployeeListCollection(individualId);

      // now create a DisplayList out of those records
      IndividualList employeeList = new IndividualList();

      // ok, now that we have the results from the database,
      // we need to generate a DisplayList object to pass
      // to the List View code (List.jsp)
      Iterator iter = sqlResults.iterator();

      while (iter.hasNext()) {
        HashMap sqlRow = (HashMap)iter.next();

        String individualName = (String)sqlRow.get("Name");
        int individualID = ((Number)sqlRow.get("IndividualID")).intValue();

        IntMember individualIDfield = new IntMember("IndividualID", individualID, 10, "", 'T', false, 10);

        StringMember nameField = new StringMember("Name", individualName, 10, "/centraview/ViewHandler.do?" + Constants.TYPEOFCONTACT + "=" + Constants.INDIVIDUAL + "&rowId=" + individualID, 'T', true);
View Full Code Here

      int individualId = ((UserObject)session.getAttribute("userobject")).getIndividualID();
      MarketingFacadeHome cfh = (MarketingFacadeHome)CVUtility.getHomeObject("com.centraview.marketing.marketingfacade.MarketingFacadeHome", "MarketingFacade");
      MarketingFacade remote = (MarketingFacade)cfh.create();
      remote.setDataSource(dataSource);
      int promotionid = Integer.parseInt(request.getParameter("promotionid").toString());
      HashMap mapPromotion = new HashMap();
      mapPromotion.put("PromotionID", "" + promotionid);
      remote.deletePromotion(individualId, promotionid);
    }
    catch (Exception e)
    {
      resultPage = "failure";
View Full Code Here

  {
 
    primaryTable ="purchaseorder";
    PrimaryMemberType="PurchaseOrderID";
 
    columnMap=new HashMap();
    columnMap.put("PurchaseOrderID",new Integer(15));
    columnMap.put("Created",new Integer(25));
    columnMap.put("Creator",new Integer(50));
    columnMap.put("Entity",new Integer(50));
    columnMap.put("SubTotal",new Integer(50));
View Full Code Here

TOP

Related Classes of java.util.HashMap$EntrySet

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.