Package com.centraview.contact.entity

Examples of com.centraview.contact.entity.EntityVO


        ItemVO itemVO = inventoryVO.getItemVO();
        cvdl.setInt(5,itemVO.getItemId());

        cvdl.setInt(6, inventoryVO.getIntStatusID());

        EntityVO soldToVO = inventoryVO.getSoldToVO();
        cvdl.setInt(7,soldToVO.getContactID());

        EntityVO vendorVO = inventoryVO.getVendorVO();

        cvdl.setInt(8,vendorVO.getContactID());
        cvdl.setInt(9,individualID);

        cvdl.executeUpdate();

        pKey  = cvdl.getAutoGeneratedKey();
View Full Code Here


        if(hm.get("locationid") != null)
        inventoryVO.setIntLocationID(((Long)hm.get("locationid")).intValue());

        if (hm.get("manufacturer") != null)
        {
          EntityVO entityVO = new EntityVO();
          entityVO.setName((String)hm.get("manufacturer"));
          entityVO.setContactID(((Long)hm.get("manid")).intValue());
          inventoryVO.setManufacturerVO(entityVO);
        }

        if (hm.get("vendor") != null)
        {
          EntityVO entityVO = new EntityVO();
          entityVO.setName((String)hm.get("vendor"));

          if (hm.get("vendorid") != null)
          entityVO.setContactID(((Long)hm.get("vendorid")).intValue());

          inventoryVO.setVendorVO(entityVO);
        }

        if(hm.get("description") != null)
        inventoryVO.setStrDescription((String)hm.get("description"));

        if(hm.get("created") != null)
        inventoryVO.setCreated((java.sql.Date)hm.get("created"));

        if(hm.get("modified") != null)
        inventoryVO.setModified((java.sql.Timestamp)hm.get("modified"));

        if(hm.get("status") != null)
        inventoryVO.setStrStatus((String)hm.get("status"));

        if(hm.get("statusid") != null)
        inventoryVO.setIntStatusID(((Long)hm.get("statusid")).intValue());

        if (hm.get("soldto") != null)
        {
          EntityVO entityVO = new EntityVO();
          entityVO.setName((String)hm.get("soldto"));

          if (hm.get("soldtoid") != null)
          entityVO.setContactID(((Long)hm.get("soldtoid")).intValue());

          inventoryVO.setSoldToVO(entityVO);
        }

      }
View Full Code Here

        ItemVO itemVO = inventoryVO.getItemVO();
        cvdl.setInt(5,itemVO.getItemId());

        cvdl.setInt(6, inventoryVO.getIntStatusID());

        EntityVO soldToVO = inventoryVO.getSoldToVO();
        cvdl.setInt(7,soldToVO.getContactID());

        cvdl.setInt(9,inventoryVO.getInventoryID());

      EntityVO vendorVO = inventoryVO.getVendorVO();

      cvdl.setInt(8,vendorVO.getContactID());

      cvdl.executeUpdate();

      int pKey  = inventoryVO.getInventoryID();
View Full Code Here

        InitialContext ic = CVUtility.getInitialContext();
        ContactFacadeLocalHome home = (ContactFacadeLocalHome) ic.lookup("local/ContactFacade");
        ContactFacadeLocal remote = home.create();
        remote.setDataSource(this.dataSource);
        int entityID = remote.getEntityIDForIndividual(individualId);
        EntityVO entityVO = remote.getEntity(entityID);
        AddressVO primaryAdd = entityVO.getPrimaryAddress();
        userObj.setEntityName(entityVO.getName());
        userObj.setEntityId(entityID);
        userObj.setAddressVO(primaryAdd);
      } catch (Exception e) {
        logger.error("[getUserObject]: Exception", e);
      }
View Full Code Here

      itemVO.setCost(Double.parseDouble(hm.get("cost").toString()));
      itemVO.setSku((String) hm.get("sku"));
      itemVO.setGlAccountId(((Long)hm.get("glaccountid")).intValue());

      itemVO.setManufacturerid(((Long)hm.get("manufacturerid")).intValue());
      EntityVO entityVO = new EntityVO();
      entityVO.setName((String)hm.get("manufacturername"));
      itemVO.setManufacturerVO(entityVO);

      itemVO.setVendorid(((Long)hm.get("vendorid")).intValue());
      entityVO = new EntityVO();
      entityVO.setName((String)hm.get("vendorname"));
      itemVO.setVendorVO(entityVO);

      itemVO.setQtyOnBackOrder(((Long)hm.get("qtyonbackorder")).intValue());
      itemVO.setQtyOnOrder(((Long)hm.get("qtyonorder")).intValue());
      itemVO.setQtyOnHand(((Integer)hm.get("qtyonhand")).intValue());
View Full Code Here

   * @param  int  EntityID to fetch
   * return  EntityVO
  */
  public EntityVO getEntity(int entId)
  {
    EntityVO ev = null;
    try
    {
      InitialContext ic = CVUtility.getInitialContext();
      EntityLocalHome home = (EntityLocalHome)ic.lookup("local/Entity");
      EntityLocal remote =  home.findByPrimaryKey(new EntityPK(entId,this.dataSource));
      CommonHelperLocalHome chhome= (CommonHelperLocalHome)ic.lookup("local/CommonHelper");
      CommonHelperLocal commonhelper= chhome.create();
      // Explicitly set the dataSource on the stateless Session Bean.
      commonhelper.setDataSource(this.dataSource);
      ev = remote.getEntityVOWithBasicReferences();
      ev.setSourceName(commonhelper.getSourceName(ev.getSource()));
    } catch(Exception e)
    {
      System.out.println("[Exception][ContactFacadeEJB.getEntity] Exception Thrown: "+e);
      //e.printStackTrace();
    }
View Full Code Here

    try {
      InitialContext ic = CVUtility.getInitialContext();
      EntityLocalHome home = (EntityLocalHome)ic.lookup("local/Entity");
      ctx.getUserTransaction().begin();
      EntityLocal remote =  home.create(entityDetails, ActionUserId, this.dataSource);
      EntityVO evo = remote.getEntityVOBasic();
      ctx.getUserTransaction().commit();

      entityID = evo.getContactID();

      HashMap historyInfo = new HashMap();
      historyInfo.put("recordID",new Integer(entityID));
      historyInfo.put("recordTypeID", new Integer(Constants.EntityModuleID));
      historyInfo.put("operation", new Integer(Constants.CREATED));
View Full Code Here

    try{
      InitialContext ic = CVUtility.getInitialContext();
      EntityLocalHome home = (EntityLocalHome)ic.lookup("local/Entity");
      EntityLocal remote =  home.findByPrimaryKey(new EntityPK(entityId,this.dataSource));

      EntityVO ev = remote.getEntityVOWithBasicReferences();

      HashMap hmDetails=new HashMap();
      hmDetails.put("title",ev.getName());
      hmDetails.put("owner",new Integer(ev.getOwner()));
      hmDetails.put("module",new Integer(1));
      hmDetails.put("recordtype",new Integer(1));

      InitialContext ctxl=CVUtility.getInitialContext();
      CvAtticLocalHome cahome=(CvAtticLocalHome)ctxl.lookup("local/CvAttic");

      CvAtticLocal caremote =cahome.create();
      caremote.setDataSource(this.dataSource);

      int transactionID=caremote.getAtticTransactionID(individualID,Constants.CV_GARBAGE,hmDetails);

      HashMap hmentity=new HashMap();
      hmentity.put("EntityID",(new Integer(ev.getContactID())).toString());
      caremote.dumpData(individualID,transactionID,"entity",hmentity);

      AddressVO adv = ev.getPrimaryAddress();

      if (adv != null)
      {
        HashMap hmaddr=new HashMap();
        hmaddr.put("AddressID",(new Integer(adv.getAddressID())).toString());
        caremote.dumpData(individualID,transactionID,"address",hmaddr);
      }

      Vector vec = ev.getCustomField();

      if (vec != null)
      {
        Iterator it = vec.iterator();
        while (it.hasNext())
        {
          CustomFieldVO cfv = (CustomFieldVO)it.next();
          String cftablename = "customfieldscalar";
          if (cfv.getFieldType() == CustomFieldVO.MULTIPLE)
          {
            cftablename = "customfieldmultiple";
          }

          HashMap hmcfv=new HashMap();
          hmcfv.put("CustomFieldID", (new Integer(cfv.getFieldID())).toString());
          caremote.dumpData(individualID, transactionID, cftablename, hmcfv);
        }
      }

      Vector mocvec = ev.getMOC();
      if (mocvec != null)
      {
        Iterator it = mocvec.iterator();
        while (it.hasNext())
        {
          MethodOfContactVO mocv = (MethodOfContactVO)it.next();

          HashMap hmmocr=new HashMap();
          hmmocr.put("MOCID",(new Integer(mocv.getMocID())).toString());
          hmmocr.put("ContactType",(new Integer(1)).toString());
          hmmocr.put("ContactID",(new Integer(entityId)).toString());
          caremote.dumpData(individualID,transactionID,"mocrelate",hmmocr);

          HashMap hmmoc=new HashMap();
          hmmoc.put("methodofcontact",(new Integer(mocv.getMocID())).toString());
          caremote.dumpData(individualID,transactionID,"methodofcontact",hmmoc);
        }
      }

      ctx.getUserTransaction().begin();
      remote.remove();
      ctx.getUserTransaction().commit();

      HashMap historyInfo = new HashMap();
      historyInfo.put("recordID",new Integer(entityId));
      historyInfo.put("recordTypeID", new Integer(Constants.EntityModuleID));
      historyInfo.put("operation", new Integer(Constants.DELETED));
      historyInfo.put("individualID", new Integer(individualID));
      historyInfo.put("referenceActivityID", new Integer(0));
      historyInfo.put("recordName", ev.getName());
      CVUtility.addHistoryRecord(historyInfo , this.dataSource);
    }catch(CreateException ce){
      throw new EJBException(ce);
    }catch(NamingException re){
      throw new EJBException(re);
View Full Code Here

        * @param params HashMap operation type + last synchronization date
        * @return ArrayList with entities
        */
       public ArrayList getEntities(HashMap params)
       {
         EntityVO entityVO = null;
         ArrayList entities = new ArrayList();
         ContactFacadeLocal entL = null;

         try
         {
View Full Code Here

        * @param indId int individual id
        * @return boolean stetus of operation
        */
       public boolean addEntities(ArrayList EVOs,int indId)
       {
         EntityVO evo = null;
         ContactFacadeLocal entL = null;
         int newId = 0;

         try
         {
View Full Code Here

TOP

Related Classes of com.centraview.contact.entity.EntityVO

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.