Package com.centraview.administration.user

Examples of com.centraview.administration.user.UserList


   */
  public UserList getUserList(int userID, int startATparam, int EndAtparam, String searchString,
      String sortColumn)
  {
    if ((searchString != null) && ((searchString.trim()).length() > 0)) {
      UserList dl = new UserList();
      dl.setStartAT(startATparam);
      dl.setEndAT(EndAtparam);
      dl.setSortMember(sortColumn);
      dl.setSortType('A');
      dl.setSearchString(searchString);
      dl.setListType("USER");

      long currentListID = this.getNextListID();
      dl.setListID(currentListID);

      displayLists.put(new Long(currentListID), dl);

      return this.getUserList(userID, dl);

    } else {
      UserList returnDL = null;
      try {
        HashMap hm = new HashMap();
        hm.put("startATparam", new Integer(startATparam));
        hm.put("EndAtparam", new Integer(EndAtparam));
        hm.put("searchString", searchString);
        hm.put("sortmem", sortColumn);
        hm.put("sortType", new Character('A'));

        HashMap listMap = null;

        try {
          UserHome aa = (UserHome)CVUtility.getHomeObject(
              "com.centraview.administration.user.UserHome", "User");
          User remote = (User)aa.create();
          remote.setDataSource(this.dataSource);

          returnDL = remote.getUserList(userID, hm);
        } catch (Exception e) {
          System.out.println("[Exception][MarketingListEJB] Exception thrown in x: " + e);
        }

        returnDL.setListType("USER");
        returnDL.setTotalNoOfRecords(returnDL.size());

        long currentListID = this.getNextListID();
        returnDL.setListID(currentListID);
        returnDL.setStartAT(startATparam);
        returnDL.setEndAT(EndAtparam);

        UserList emptyDL = createEmptyObject(returnDL);
        emptyDL.setTotalNoOfRecords(returnDL.getTotalNoOfRecords());
        emptyDL.setListID(currentListID);
        emptyDL.setListType("USER");
        emptyDL.setStartAT(returnDL.getStartAT());
        emptyDL.setEndAT(returnDL.getEndAT());

        displayLists.put(new Long(currentListID), emptyDL);
      } catch (Exception e) {
        e.printStackTrace();
      }
View Full Code Here


   * @return UserList
   */
  public UserList getUserList(int userid, DisplayList DLparam)
  {

    UserList returnDL = null;
    UserList paramDL = (UserList)DLparam;

    int listSize = paramDL.getTotalNoOfRecords();
    int startAT = paramDL.getStartAT();
    int EndAt = paramDL.getEndAT();

    String powerString = paramDL.getPowerString();
    String searchString = paramDL.getSearchString();
    String sortColumn = paramDL.getSortMember();

    HashMap hm = new HashMap();
    hm.put("startATparam", new Integer(Math.max(startAT - 100, 1)));
    hm.put("EndAtparam", new Integer(Math.min(EndAt + 100, listSize)));
    hm.put("searchString", searchString);
    hm.put("sortmem", paramDL.getSortMember());
    hm.put("sortType", new Character(paramDL.getSortType()));

    try {
      UserHome aa = (UserHome)CVUtility.getHomeObject(
          "com.centraview.administration.user.UserHome", "User");
      User remote = (User)aa.create();
      remote.setDataSource(this.dataSource);

      returnDL = remote.getUserList(userid, hm);
    } catch (Exception e) {
      System.out.println("[Exception][MarketingListEJB] Exception thrown in x: " + e);
    }

    returnDL.setListType("USER");
    returnDL.setListID(paramDL.getListID());
    returnDL.setStartAT(paramDL.getStartAT());
    returnDL.setEndAT(paramDL.getEndAT());
    returnDL.setSortType(paramDL.getSortType());
    returnDL.setSearchString(searchString);

    returnDL.setPowerString(powerString);

    if (searchString != null && searchString.startsWith("SIMPLE :"))
View Full Code Here

   * @param list
   * @return UserList
   */
  public UserList createEmptyObject(UserList list)
  {
    UserList dummy = new UserList();
    dummy.setListType(list.getListType());
    dummy.setPrimaryMemberType(list.getPrimaryMemberType());
    dummy.setPrimaryTable(list.getPrimaryTable());
    dummy.setSortMember(list.getSortMember());
    dummy.setSortType(list.getSortType());
    dummy.setPrimaryMember(list.getPrimaryMember());
    dummy.setStartAT(list.getStartAT());
    dummy.setEndAT(list.getEndAT());
    dummy.setBeginIndex(0);
    dummy.setEndIndex(0);

    return dummy;
  }// end of createEmptyObject
View Full Code Here

TOP

Related Classes of com.centraview.administration.user.UserList

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.