Package com.centraview.contact.contactfacade

Examples of com.centraview.contact.contactfacade.ContactFacadeHome


      int contactType, int contactID) throws CommunicationException, NamingException
  {
    AddressList DL = new AddressList();
    long currentListID = this.getNextListID();
    int tnorec;
    ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
    try {

      ContactFacade remote = (ContactFacade)aa.create();
      remote.setDataSource(this.dataSource);
      DL = remote.getAllAddresses(contactID, contactType);

      tnorec = DL.size();
      DL.setListID(currentListID);
View Full Code Here


    char sortType = DL2.getSortType();
    int contactType = DL2.getContactType();
    int contactID = DL2.getContactId();
    long currentListID = DL2.getListID();

    ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");

    AddressList DL = null;
    AddressList toReturn = new AddressList();
    toReturn.setListID(DL2.getListID());
    toReturn.setContactId(contactID);
    toReturn.setContactType(contactType);
    toReturn.setSortMember(sortColumn);
    toReturn.setSortType(sortType);
    toReturn.setListType("Address");
    toReturn.setDirtyFlag(false);
    toReturn.setStartAT(startAT);
    toReturn.setEndAT(EndAt);

    // long currentListID = this.getNextListID();
    int tnorec;
    try {
      ContactFacade remote = (ContactFacade)aa.create();
      remote.setDataSource(this.dataSource);
      DL = remote.getAllAddresses(contactID, contactType);

      tnorec = DL.size();
View Full Code Here

  }// end of public AddressList getAddressList(DisplayList DLParam )

  public MOCList getMOCList(int userID, int startAT, int EndAt, String sortColumn, int contactType,
      int contactID) throws CommunicationException, NamingException
  {
    ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
    MOCList DL = null;
    long currentListID = this.getNextListID();
    int tnorec;
    try {
      ContactFacade remote = (ContactFacade)aa.create();
      remote.setDataSource(this.dataSource);
      DL = remote.getAllMOC(contactID, contactType);

      tnorec = DL.size();
View Full Code Here

    char sortType = DL2.getSortType();
    int contactType = DL2.getContactType();
    int contactID = DL2.getContactId();
    long currentListID = DL2.getListID();

    ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
    MOCList DL = null;
    MOCList toReturn = new MOCList();
    toReturn.setListID(DL2.getListID());
    toReturn.setContactId(contactID);
    toReturn.setContactType(contactType);
    toReturn.setSortMember(sortColumn);
    toReturn.setSortType(sortType);
    toReturn.setListType("MOC");
    toReturn.setDirtyFlag(false);
    toReturn.setStartAT(startAT);
    toReturn.setEndAT(EndAT);

    int tnorec;
    try {
      ContactFacade remote = (ContactFacade)aa.create();
      remote.setDataSource(this.dataSource);
      DL = remote.getAllMOC(contactID, contactType);

      tnorec = DL.size();
View Full Code Here

      }
    }

    if (flag == false) {
      try {
        ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
            "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
        HashMap hm = new HashMap();
        if (DLParam1.getSortMember() != null) {
          hm.put("sortColumn", DLParam1.getSortMember());
        }
        hm.put("sortDirection", DLParam1.getSortType() + "");

        hm.put("dbID", new Integer(dbID));
        ContactFacade remote = (ContactFacade)aa.create();
        remote.setDataSource(this.dataSource);

        DL = remote.getAllIndividualList(userID, hm);
        DL.setSortMember(DLParam.getSortMember());
        DL.setListType("Individual");
View Full Code Here

      }
    }

    if (flag == false) {
      try {
        ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
            "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
        HashMap hm = new HashMap();
        ContactFacade remote = (ContactFacade)aa.create();
        remote.setDataSource(this.dataSource);

        DL = remote.getAllIndividualList(individualID, hm);

        DL.setIndividualId(individualID);
View Full Code Here

    // This will hold the parameters being passed to the EJB
    // primarily just the searchString if any.
    HashMap parameters = new HashMap();
    // Get the EJB stuff ready
    ContactFacade contactFacade = null;
    ContactFacadeHome contactFacadeHome = (ContactFacadeHome)CVUtility.getHomeObject(
        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
    try {
      contactFacade = (ContactFacade)contactFacadeHome.create();
      contactFacade.setDataSource(this.dataSource);
    } catch (Exception e) {
      logger.error("[getIndividualList] Exception thrown.", e);
    }
    // This will do Simple search
View Full Code Here

      searchString = "";
    }

    // This will do Simple search
    if (searchString.equals("") || searchString.startsWith("SIMPLE :")) {
      ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
          "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
      try {

        ContactFacade remote = (ContactFacade)aa.create();
        remote.setDataSource(this.dataSource);

        HashMap hm = new HashMap();

        if (DLparam.getSortMember() != null) {
          hm.put("sortColumn", DLparam.getSortMember());
        }
        hm.put("sortDirection", DLparam.getSortType() + "");

        if (dbID != 0) {
          hm.put("ListID", new Integer(dbID));
        }
        hm.put("dbID", new Integer(dbID));

        DL = remote.getAllIndividualList(DLparam.getIndividualId(), hm);

        DL.setTotalNoOfRecords(DL.size());
        DL.setListType("Individual");
        DL.setSortMember(DL2.getSortMember());
        DL.setDirtyFlag(false);
        DL.setDbID(dbID);

        if (DL.getTotalNoOfRecords() == DL.getEndIndex()) {
          globalLists.put("Individual", DL);
        }
      } catch (Exception e) {
        System.out
            .println("[Exception][ListGenerator] Exception thrown in getIndividualList(DisplayList, int):2304 :"
                + e);
        e.printStackTrace();
      }

      DL.setSortType(DL2.getSortType());
      DL.setStartAT(DL2.getStartAT());
      DL.setEndAT(DL2.getEndAT());
      DL.setDbID(DL2.getDbID());
      DL.setSearchString(searchString);
      DL.setListType("Individual");

      int beginIndex = 0;
      int endIndex = 0;
      int startAT = DL2.getStartAT();
      int EndAt = DL2.getEndAT();
      int tnorec = DL.size();

      if (tnorec > EndAt) {
        if (tnorec > EndAt + 100) {
          beginIndex = startAT - 100;
        }
        if (beginIndex < 1) {
          beginIndex = 1;

        }
        endIndex = EndAt + 100;
      } else {
        beginIndex = 1;
        endIndex = EndAt;
      }

      DL.setBeginIndex(beginIndex);
      DL.setEndIndex(endIndex);

      DL2.setBeginIndex(0);
      DL2.setEndIndex(0);

      DL.setSearchString(searchString);
      if (!searchString.equals("")) {
        DL.search("Name");
      }

      DL.setTotalNoOfRecords(DL.size());
      DL.setListID(DLparam.getListID());

      return DL;
    }// end of if SIMPLE :
    else // for ADVANCE:
    {
      String powerString = DLparam.getPowerString();
      try {
        ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
            "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
        HashMap hm = new HashMap();

        if (DLparam.getSortMember() != null) {
          hm.put("sortColumn", DLparam.getSortMember());
        }
        hm.put("sortDirection", DLparam.getSortType() + "");

        hm.put("ADVANCESEARCHSTRING", searchString);
        ContactFacade remote = (ContactFacade)aa.create();
        remote.setDataSource(this.dataSource);

        DL = remote.getAllIndividualList(DLparam.getIndividualId(), hm);

        DL.setTotalNoOfRecords(DL.size());
View Full Code Here

          flag = false;
        }
      }

      if (flag == false) {
        ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
            "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
        try {
          HashMap hm = new HashMap();
          ContactFacade remote = (ContactFacade)aa.create();
          remote.setDataSource(this.dataSource);
          DL = remote.getAllGroupList(DLparam.getIndividualId(), hm);
          DL.setListType("Group");
          DL.setTotalNoOfRecords(DL.size());

          if (DL.getTotalNoOfRecords() == DL.getEndIndex()) {

            globalLists.put("Group", DL);
          }
        } catch (Exception e) {
          System.out.println("[Exception] ListGenerator.getGroupList: " + e.toString());
        }
        flag = true;
      }

      // end synchronized

      GroupList DL1 = new GroupList();
      DL1.setSortMember(DL2.getSortMember());
      DL1.setSortType(DL2.getSortType());
      DL1.setStartAT(DL2.getStartAT());
      DL1.setEndAT(DL2.getEndAT());
      DL1.setSearchString(searchString);
      DL1.setListType("Group");

      // write the logic for begin index, endindex for this specific list type
      // here

      int beginIndex = 0;
      int endIndex = 0;
      int startAT = DL2.getStartAT();
      int EndAt = DL2.getEndAT();

      int tnorec = DL.size();

      if (tnorec > EndAt) {
        if (tnorec > EndAt + 100)
          beginIndex = startAT - 100;
        if (beginIndex < 1)
          beginIndex = 1;
        endIndex = EndAt + 100;
      } else {

        beginIndex = 1;
        endIndex = EndAt;
      }

      DL1.setBeginIndex(beginIndex);
      DL1.setEndIndex(endIndex);

      DL2.setBeginIndex(0);
      DL2.setEndIndex(0);

      // search String

      // check for serach string simple or in multiple tables
      // and if the global list is complete
      // if simple search in same GL and make DL1
      // sort

      DL1 = (GroupList)Sort(DL1, DL);

      DL1.setSearchString(searchString);
      if (!searchString.equals(""))
        DL1.search();

      DL1.setTotalNoOfRecords(DL1.size());
      DL1.setListID(DLparam.getListID());

      return DL1;
    }// end of else SIMPLE :
    else // for ADVANCE:
    {
      String powerString = DLparam.getPowerString();
      try {
        ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
            "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
        HashMap hm = new HashMap();
        hm.put("ADVANCESEARCHSTRING", searchString);
        ContactFacade remote = (ContactFacade)aa.create();
        remote.setDataSource(this.dataSource);

        DL = remote.getAllGroupList(DLparam.getIndividualId(), hm);
        DL.setTotalNoOfRecords(DL.size());
        DL.setListType("Group");
View Full Code Here

    int marketingListId = DL2.getDbID();
    String searchString = DL2.getSearchString();
    if (searchString == null) {
      searchString = "";
    }
    ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
    ContactFacade remote = null;
    try {
      remote = (ContactFacade)aa.create();
      remote.setDataSource(this.dataSource);
    } catch (Exception e) {
      logger.error("[getEntityList] Exception thrown.", e);
    }
    HashMap hm = new HashMap();
View Full Code Here

TOP

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

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.