Examples of HashMap


Examples of java.util.HashMap

  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

Examples of java.util.HashMap

      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

Examples of java.util.HashMap

  {
 
    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

Examples of java.util.HashMap

  public String paymentID;

  public PaymentLines()
  {
    viewVector = new Vector();
    this.columnMap = new HashMap();

    columnMap.put("InvoiceId", new Integer(50) );
    columnMap.put("InvoiceNum", new Integer(200) );
    columnMap.put("Date", new Integer(200) );
    columnMap.put("Total", new Integer(150) ) ;
View Full Code Here

Examples of java.util.HashMap

  // constructor
  public  EmailList()
  {

    columnMap = new HashMap();
    columnMap.put( "Subject" , new Integer(100) );
    columnMap.put( "From" , new Integer(120) );
    columnMap.put( "To" , new Integer(120) ) ;
    columnMap.put( "Received" , new Integer(150) ) ;
    columnMap.put( "Size" , new Integer(50)) ;
View Full Code Here

Examples of java.util.HashMap

  private String lpName;

  public ListPreference(String value)
  {
    this.lpName = value;
    this.viewHashMap = new HashMap();
  }
View Full Code Here

Examples of java.util.HashMap

 
    
  public InvoiceLines()
  { 
      viewVector = new Vector();
    this.columnMap = new HashMap();

    columnMap.put( "LineId" , new Integer(100) );
    columnMap.put( "ItemId" , new Integer(100) );       
    columnMap.put( "SKU" , new Integer(110) );
    columnMap.put( "Description" , new Integer(139) );
View Full Code Here

Examples of java.util.HashMap

    String messageid    = (String) request.getParameter( "messageid" );
   
    mailMessage.setMessageID( Integer.parseInt( messageid ) );
         

    HashMap attchmentids =( HashMap) session.getAttribute( "AttachfileList" );


    int id = Integer.parseInt( accountid );

    /** code added for query change **/
 
View Full Code Here

Examples of java.util.HashMap

      // first, get the list of valid fields from the database.
      // loop through that list, and get the form parameter value
      // for each valid field. Stick that value in a hashmap for
      // use in the rest of this handler...
      ArrayList validFields = mailRemote.getValidFields("Contact");
      HashMap contactForm = new HashMap();
      if (validFields != null && validFields.size() > 0)
      {
        Iterator iter = validFields.iterator();
        while (iter.hasNext())
        {
          HashMap validFieldMap = (HashMap)iter.next();
          String name = (String)validFieldMap.get("name");
          String fieldName = (String)validFieldMap.get("fieldName");
          String value = request.getParameter(fieldName);
          if (value == null){ value = ""; }
          contactForm.put(fieldName, value);
        }
      }
View Full Code Here

Examples of java.util.HashMap

    {
      Iterator cfIter = validCustomFields.iterator();
      // loop through valid CF's...
      while (cfIter.hasNext())
      {
        HashMap fieldInfo = (HashMap)cfIter.next();
        Number fieldID = (Number)fieldInfo.get("fieldID");
        String fieldName = (String)fieldInfo.get("fieldName");
       
        // now that we have the field name, we can get the form
        // value for each valid custom field...
        String formValue = (String)contactForm.get(fieldName);
        if (formValue != null && formValue.length() > 0)
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.