Exemple #1
0
 public void reset(GuiUserEvent event) {
   sv.endSession(sessionId);
   GuiList list = (GuiList) event.window.getGuiMember("listHistory");
   list.setItems((Vector<Object>) null);
   event.window.setValue("size", null);
   event.window.setValue("memResult", null);
   this.startTrans(event);
 }
Exemple #2
0
 public void findOther(GuiUserEvent event) {
   Map<String, Integer> al = sv.getOtherItems(sessionId);
   StringBuilder buff = new StringBuilder();
   for (Entry<String, Integer> e : al.entrySet()) {
     buff.append(e);
     buff.append('\n');
   }
   event.window.setValue("memResult", buff.toString());
 }
Exemple #3
0
 // Object
 //   public void readObject(GuiUserEvent event) {
 //   	long oid = Convert.toLong(event.window.getValue("oid"));
 ////   	String[] items = sv.getObjectItems(oid);
 ////   	/*
 ////   	for (int i = 0; i < items.length; i++) {
 ////   		System.out.println(items[i]);
 ////   	}
 ////   	*/
 ////   	GuiList list = (GuiList)event.window.getGuiMember("listItems");
 ////   	list.setItems(items);
 //   }
 //   public void deleteObject(GuiUserEvent event) {
 //   	long oid = Convert.toLong(event.window.getValue("oid"));
 ////   	sv.deleteObject(oid);
 //   }
 //   public void setOid(GuiUserEvent event) {
 //   	long oid = Convert.toLong(event.window.getValue("oid"));
 //   	System.out.println(oid);
 //   }
 // Items
 public void findItems(GuiUserEvent event) {
   String item = (String) event.window.getValue("textItem");
   String[] items = sv.findItems(item);
   GuiList mem = (GuiList) event.window.getGuiMember("listItems");
   mem.setItems(items);
   if (items.length == 1) {
     mem.setValue(items[0]);
   }
 }
Exemple #4
0
 public void showResult(GuiUserEvent event) {
   ExpressionResult erg = sv.getResultSet(sessionId);
   StringBuilder b = new StringBuilder();
   Iterator<JDataRow> it = erg.firstPage.getChildRows();
   if (it != null) {
     while (it.hasNext()) {
       JDataRow row = it.next();
       b.append(row.getValue("obid"));
       b.append(" ");
     }
   }
   event.window.setValue("memResult", b.toString());
 }
Exemple #5
0
 // Expression
 public void ee_execute(GuiUserEvent event) {
   String exp = (String) event.window.getValue("memExpr");
   long start = System.currentTimeMillis();
   try {
     ExpressionResult res = sv.execute(exp);
     event.window.setValue("size", res.resultsetSize);
     long end2 = System.currentTimeMillis();
     long duraTotal = end2 - start;
     String sd = res.duraDB1 + "/" + res.duraAlg + "/" + res.duraDB2 + " " + duraTotal;
     event.window.setValue("exeTime", sd);
     this.displayPage(event, res.firstPage, res.trace);
   } catch (Exception ex) {
     GuiUtil.showEx(ex);
   }
 }
Exemple #6
0
 /**
  * @deprecated schrittweise nicht mehr unterstützen
  * @param event
  */
 public void execute(GuiUserEvent event) {
   String itemname = (String) event.window.getValue("listItems");
   String oper = (String) event.window.getValue("oper");
   if (oper == null) oper = "0";
   int iOper = Integer.parseInt(oper);
   long start = System.currentTimeMillis();
   int cnt = sv.performOper(sessionId, itemname, Selection.toOper(iOper));
   long end = System.currentTimeMillis();
   event.window.setValue("exeTime", end - start);
   event.window.setValue("size", Integer.toString(cnt));
   String newItem = sOper[iOper] + " " + itemname;
   GuiList list = (GuiList) event.window.getGuiMember("listHistory");
   list.addItem(newItem);
   if (Convert.toBoolean(event.window.getValue("show"))) {
     showResult(event);
   }
 }
Exemple #7
0
 public void startTrans(GuiUserEvent event) {
   Selection sel = sv.startSession();
   this.sessionId = sel.getSessionId();
 }
Exemple #8
0
 public void goMore(GuiUserEvent event) {
   JDataSet ds = sv.getNextPage(sessionId);
   this.displayPage(event, ds, null);
 }
Exemple #9
0
 public void goBack(GuiUserEvent event) {
   JDataSet ds = sv.getPrevPage(sessionId);
   this.displayPage(event, ds, null);
 }
Exemple #10
0
 public void deleteItem(GuiUserEvent event) {
   String item = (String) event.window.getValue("textItem");
   sv.deleteItem(item);
 }
Exemple #11
0
 public void resetAllSessions(GuiUserEvent event) {
   sv.resetAllSessions();
   this.startTrans(event);
 }
Exemple #12
0
 public void spider(GuiUserEvent event) {
   sv.startSpider();
 }
Exemple #13
0
 public void getOtherItems(GuiUserEvent event) {
   Map<String, Integer> items = sv.getOtherItems(sessionId);
   for (int i = 0; i < items.size(); i++) {
     System.out.println(items.get(i));
   }
 }