Package com.centraview.contact.contactfacade

Examples of com.centraview.contact.contactfacade.ContactFacadeLocal


    if (individualId != 0) {
      userObj.setIndividualID(individualId);
      try {
        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) {
View Full Code Here


      cvdal.executeUpdate();
      cvdal.clearParameters();
     
      InitialContext ic = CVUtility.getInitialContext();
      ContactFacadeLocalHome contactHome = (ContactFacadeLocalHome)ic.lookup("local/ContactFacade");
      ContactFacadeLocal contactLocal = contactHome.create();
      contactLocal.setDataSource(this.dataSource);
      contactLocal.deleteEntity(listID);
      contactLocal.deleteIndividual(listID);
     
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(this.dataSource);
      authorizationLocal.deleteMarketingMemberPublicRecords(listID);
View Full Code Here

        * @return boolean status of operation
        */
       public boolean updateEntities(ArrayList EVOs,int indID)
       {
         EntityVO evo = null;
         ContactFacadeLocal entL = null;
         ContactHelperLocal contacthelperL = null;

         try
         {
           InitialContext ic = CVUtility.getInitialContext();
           ContactFacadeLocalHome home = (ContactFacadeLocalHome)ic.lookup("local/ContactFacade");
           entL = home.create();
           entL.setDataSource(this.dataSource);
           int size = (EVOs == null)? 0 : EVOs.size();

           ContactHelperLocalHome homeHelper = (ContactHelperLocalHome)ic.lookup("local/ContactHelper");
           contacthelperL = homeHelper.create();
           contacthelperL.setDataSource(this.dataSource);


           for ( int i=0;i<size;i++)
           {
             evo = (EntityVO) EVOs.get(i);
             AddressVO adrVO = contacthelperL.getPrimaryAddressForContact(indID, evo.getContactID(), evo.getContactType());
             evo.getPrimaryAddress().setAddressID(adrVO.getAddressID());

             Collection col = contacthelperL.getPrimaryMOCForContact(indID, evo.getContactID(), evo.getContactType());
             Iterator it = col.iterator();
             Vector vec = evo.getMOC();
             int vecsize = vec.size();
             while (it.hasNext()){
               MethodOfContactVO moc = (MethodOfContactVO)it.next();
               for (int j = 0; j < vecsize; j++){
                 if(moc.getMocType() == ((MethodOfContactVO) vec.elementAt(j)).getMocType()){
                   ((MethodOfContactVO) vec.elementAt(j)).setMocID(moc.getMocID());
                   ((MethodOfContactVO) vec.elementAt(j)).added(false);
                   ((MethodOfContactVO) vec.elementAt(j)).updated(true);
                   break;
                 }
               }
             }
             entL.updateEntity(evo,indID);
             logger.info("Updated " + evo.getContactID() + " entity record");
           }
         }catch(Exception e)
         {
           logger.debug("Error in updating Entity : "+e);
View Full Code Here

         String extId = "";
         int intId = 0;

         Iterator it = arl.iterator();

         ContactFacadeLocal helperL = null;
         try
         {
           InitialContext ic = CVUtility.getInitialContext();
           ContactFacadeLocalHome home = (ContactFacadeLocalHome ) ic.lookup("local/ContactFacade");
           helperL = home.create();

           while(it.hasNext())
           {
             pvo = (EntityVO)it.next();
             extId = pvo.getExternalID();
             intId = this.getCVidForExtid(modulename,extId);
             helperL.deleteEntity(intId, indId);

             logger.info("Entity " + intId +" object deleted");
           }

         }catch(Exception e)
View Full Code Here

        */
       public ArrayList getIndividuals(HashMap params)
       {
         IndividualVO indVO = null;
         ArrayList individuals = new ArrayList();
         ContactFacadeLocal indL = null;

         try
         {
           String syncDatePrKeyField[] = {""};
           Timestamp lastSyncDate = (Timestamp)params.get("lastSyncDate");
           String operation = (String)params.get("Operation");
           InitialContext ic = CVUtility.getInitialContext();
           ContactFacadeLocalHome home = (ContactFacadeLocalHome)ic.lookup("local/ContactFacade");
           indL = home.create();
           indL.setDataSource(this.dataSource);

           Collection col = getList("Individual",lastSyncDate,operation,syncDatePrKeyField);
           Object ids[] = col.toArray();
           HashMap hm = new HashMap();
           int size = ids.length;

           for(int i=0;i<size;i++)
           {
             hm = (HashMap)ids[i];
             indVO = indL.getIndividual(((Long)hm.get(syncDatePrKeyField[0])).intValue());
             individuals.add(indVO);
           }
         }catch(Exception e)
         {
           logger.debug("Error in getting IndividualVos : "+e);
View Full Code Here

        */
       public boolean addIndividuals(ArrayList IVOs, int indId)
       {
         IndividualVO ivo = null;
         int newId = 0;
         ContactFacadeLocal indL = null;
         HrFacadeLocal empL = null;

         try
         {
           InitialContext ic = CVUtility.getInitialContext();
           ContactFacadeLocalHome home = (ContactFacadeLocalHome)ic.lookup("local/ContactFacade");
           indL = home.create();
           indL.setDataSource(this.dataSource);

           HrFacadeLocalHome emplhome = (HrFacadeLocalHome)ic.lookup("local/HrFacade");
           empL = (HrFacadeLocal)emplhome.create();
           empL.setDataSource(this.dataSource);

           int size = IVOs.size();

           for ( int i=0;i<size;i++)
           {
             ivo = (IndividualVO) IVOs.get(i);
             newId = indL.createIndividual(ivo,indId);
             empL.addEmployee(indId,newId);
             logger.info("Added " + newId + " individual record");
           }
         }catch(Exception e)
         {
View Full Code Here

        * @return boolean status of operation
        */
       public boolean updateIndividuals(ArrayList IVOs,int indID)
       {
         IndividualVO ivo = null;
         ContactFacadeLocal indL = null;
         ContactHelperLocal contacthelperL = null;

         try
         {
           InitialContext ic = CVUtility.getInitialContext();
           ContactFacadeLocalHome home = (ContactFacadeLocalHome)ic.lookup("local/ContactFacade");
           indL = home.create();
           indL.setDataSource(this.dataSource);

           int size = IVOs.size();

           ContactHelperLocalHome homeHelper = (ContactHelperLocalHome)ic.lookup("local/ContactHelper");
           contacthelperL = homeHelper.create();
           contacthelperL.setDataSource(this.dataSource);

           for ( int i=0;i<size;i++)
           {
             ivo = (IndividualVO) IVOs.get(i);
             ivo.setContactID(ivo.getIndividualID());

             AddressVO adrVO = contacthelperL.getPrimaryAddressForContact(indID, ivo.getIndividualID(), ivo.getContactType());
             ivo.getPrimaryAddress().setAddressID(adrVO.getAddressID());

             Collection col = contacthelperL.getPrimaryMOCForContact(indID, ivo.getContactID(), ivo.getContactType());
             Iterator it = col.iterator();
             Vector vec = ivo.getMOC();
             int vecsize = vec.size();
             while (it.hasNext()){
               MethodOfContactVO moc = (MethodOfContactVO)it.next();
               for (int j = 0; j < vecsize; j++){
                 if(moc.getMocType() == ((MethodOfContactVO) vec.elementAt(j)).getMocType()){
                   ((MethodOfContactVO) vec.elementAt(j)).setMocID(moc.getMocID());
                   ((MethodOfContactVO) vec.elementAt(j)).added(false);
                   ((MethodOfContactVO) vec.elementAt(j)).updated(true);
                   break;
                 }
               }
             }
             indL.updateIndividual(ivo,indID);
             logger.info("Updated " + ivo.getIndividualID() + " Individual record");
           }
         }catch(Exception e)
         {
           logger.debug("Error in updating Individual : "+e);
View Full Code Here

         String extId = "";
         int intId = 0;

         Iterator it = arl.iterator();

         ContactFacadeLocal helperL = null;
         try
         {
           InitialContext ic = CVUtility.getInitialContext();
           ContactFacadeLocalHome home = (ContactFacadeLocalHome ) ic.lookup("local/ContactFacade");
           helperL = home.create();

           while(it.hasNext())
           {
             ivo = (IndividualVO)it.next();
             extId = ivo.getExternalID();
             intId = this.getCVidForExtid(modulename,extId);
             helperL.deleteIndividual(indId, intId);
             logger.info("Individual " + intId + " object deleted");
           }

         }catch(Exception e)
         {
View Full Code Here

        */
       public ArrayList getEntities(HashMap params)
       {
         EntityVO entityVO = null;
         ArrayList entities = new ArrayList();
         ContactFacadeLocal entL = null;

         try
         {
           String syncDatePrKeyField[] = {""};
           Timestamp lastSyncDate = (Timestamp)params.get("lastSyncDate");
           String operation = (String)params.get("Operation");
           InitialContext ic = CVUtility.getInitialContext();
           ContactFacadeLocalHome home = (ContactFacadeLocalHome)ic.lookup("local/ContactFacade");
           entL = home.create();
           entL.setDataSource(this.dataSource);

           Collection col = this.getList((String)params.get("entitymodule"),lastSyncDate,operation,syncDatePrKeyField);
           Object ids [] = col.toArray();
           HashMap hm = new HashMap();
           int size = ids.length;

           for(int i=0;i<size;i++)
           {
             hm = (HashMap)ids[i];
             entityVO = entL.getEntity(((Long)hm.get(syncDatePrKeyField[0])).intValue());
             entities.add(entityVO);
           }
         }catch(Exception e)
         {
           logger.debug("Error in getting EntityVos : "+e);
View Full Code Here

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

         try
         {
           InitialContext ic = CVUtility.getInitialContext();
           ContactFacadeLocalHome home = (ContactFacadeLocalHome)ic.lookup("local/ContactFacade");
           entL = home.create();
           entL.setDataSource(this.dataSource);

           int size = (EVOs == null)? 0 : EVOs.size();
           for ( int i=0;i<size;i++)
           {
             evo = (EntityVO) EVOs.get(i);
             newId = entL.createEntity(evo,indId);
             logger.info("Added " + newId + " entity record");
           }
         }catch(Exception e)
         {
           logger.debug("Error in adding Entities : "+e);
View Full Code Here

TOP

Related Classes of com.centraview.contact.contactfacade.ContactFacadeLocal

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.