Package com.cxy.redisclient.dto

Examples of com.cxy.redisclient.dto.FindInfo


    }
  }

  protected void find() {
    FindKeyDialog dialog = new FindKeyDialog(shell, iconImage);
    FindInfo info = (FindInfo) dialog.open();
    if (info != null) {
      TreeItem treeItem;

      ContainerKeyInfo cinfo = new ContainerKeyInfo();
      if (itemsSelected[0] instanceof TreeItem) {
        treeItem = (TreeItem) itemsSelected[0];
      } else {
        treeItem = getTreeItemByTableItem((TableItem) itemsSelected[0]);
      }

      parseContainer(treeItem, cinfo);
      NodeType searchFrom = (NodeType) treeItem.getData(NODE_TYPE);

      Set<Node> nodes = service2.find(searchFrom, cinfo.getId(),
          cinfo.getDb(), cinfo.getContainerStr(),
          info.getSearchNodeType(), info.getPattern(),
          info.isForward());
      if (!nodes.isEmpty()) {

        Node node = nodes.iterator().next();
        TreeItem selected = gotoDBContainer(node.getId(), node.getDb(),
            node.getKey(), true, true);
        history.add(selected);
        btnBackward.setEnabled(true);
        btnForward.setEnabled(false);

        fBuffer = new FindBuffer(node, searchFrom, cinfo.getId(),
            cinfo.getDb(), cinfo.getContainerStr(),
            info.getSearchNodeType(), info.getPattern());
      } else {
        MessageDialog.openInformation(shell,
            i18nFile.getText(I18nFile.FINDRESULTS),
            i18nFile.getText(I18nFile.NOFOUND));
      }
View Full Code Here


       
        if(types.size() == 0)
          MessageDialog.openError(shell, RedisClient.i18nFile.getText(I18nFile.ERROR),RedisClient.i18nFile.getText(I18nFile.SELECTTYPE));
        else{
          if(btnForward.getSelection())
            result = new FindInfo(pattern.getText(), types, true);
          else
            result = new FindInfo(pattern.getText(), types, false);
          shell.dispose();
        }
       
      }
    });
View Full Code Here

TOP

Related Classes of com.cxy.redisclient.dto.FindInfo

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.