private Object makeSupportEvent(String theString, int intPrimitive, long longBoxed) {
   SupportBean bean = new SupportBean();
   bean.setTheString(theString);
   bean.setIntPrimitive(intPrimitive);
   bean.setLongBoxed(longBoxed);
   return bean;
 }
Beispiel #2
0
 private void sendBoxedEvent(Long longBoxed, Integer intBoxed, Short shortBoxed) {
   SupportBean bean = new SupportBean();
   bean.setLongBoxed(longBoxed);
   bean.setIntBoxed(intBoxed);
   bean.setShortBoxed(shortBoxed);
   epService.getEPRuntime().sendEvent(bean);
 }
Beispiel #3
0
 public void sendEvent(String string, Integer intBoxed, Double doubleBoxed, Long longBoxed) {
   SupportBean bean = new SupportBean(string, -1);
   bean.setIntBoxed(intBoxed);
   bean.setDoubleBoxed(doubleBoxed);
   bean.setLongBoxed(longBoxed);
   epService.getEPRuntime().sendEvent(bean);
 }
Beispiel #4
0
  public void testEqualsAny() {
    String[] fields = "eq,neq,sqlneq,nneq".split(",");
    String stmtText =
        "select "
            + "intPrimitive = any (1, intBoxed) as eq, "
            + "intPrimitive != any (1, intBoxed) as neq, "
            + "intPrimitive <> any (1, intBoxed) as sqlneq, "
            + "not intPrimitive = any (1, intBoxed) as nneq "
            + " from SupportBean(string like 'E%')";
    EPStatement stmt = epService.getEPAdministrator().createEPL(stmtText);
    stmt.addListener(listener);

    // in the format intPrimitive, intBoxed
    int[][] testdata = {
      {1, 1},
      {1, 2},
      {2, 2},
      {2, 1},
    };

    Object[][] result = {
      {true, false, false, false}, // 1, 1
      {true, true, true, false}, // 1, 2
      {true, true, true, false}, // 2, 2
      {false, true, true, true} // 2, 1
    };

    for (int i = 0; i < testdata.length; i++) {
      SupportBean bean = new SupportBean("E", testdata[i][0]);
      bean.setIntBoxed(testdata[i][1]);
      epService.getEPRuntime().sendEvent(bean);
      // System.out.println("line " + i);
      ArrayAssertionUtil.assertProps(listener.assertOneGetNewAndReset(), fields, result[i]);
    }
  }
Beispiel #5
0
 private SupportBean make(Integer intBoxed, Double doubleBoxed, Long longBoxed, int bigDecimal) {
   SupportBean bean = new SupportBean();
   bean.setIntBoxed(intBoxed);
   bean.setDoubleBoxed(doubleBoxed);
   bean.setLongBoxed(longBoxed);
   bean.setBigDecimal(new BigDecimal(bigDecimal));
   return bean;
 }
Beispiel #6
0
 private SupportBean sendEvent(int intPrimitive, int intBoxed) {
   SupportBean bean = new SupportBean();
   bean.setTheString("myId");
   bean.setIntPrimitive(intPrimitive);
   bean.setIntBoxed(intBoxed);
   epService.getEPRuntime().sendEvent(bean);
   return bean;
 }
 private void sendEvent(String s, double doubleBoxed, int intPrimitive, int intBoxed) {
   SupportBean bean = new SupportBean();
   bean.setTheString(s);
   bean.setDoubleBoxed(doubleBoxed);
   bean.setIntPrimitive(intPrimitive);
   bean.setIntBoxed(intBoxed);
   epService.getEPRuntime().sendEvent(bean);
 }
 private SupportBean makeSendBean(
     String theString,
     int intPrimitive,
     long longPrimitive,
     double doublePrimitive,
     float floatPrimitive) {
   SupportBean bean = new SupportBean(theString, intPrimitive);
   bean.setLongPrimitive(longPrimitive);
   bean.setDoublePrimitive(doublePrimitive);
   bean.setFloatPrimitive(floatPrimitive);
   epService.getEPRuntime().sendEvent(bean);
   return bean;
 }
Beispiel #9
0
 private void sendEventWithDouble(
     Byte byteBoxed,
     Short shortBoxed,
     Integer intBoxed,
     Long longBoxed,
     Float floatBoxed,
     Double doubleBoxed) {
   SupportBean bean = new SupportBean();
   bean.setByteBoxed(byteBoxed);
   bean.setShortBoxed(shortBoxed);
   bean.setIntBoxed(intBoxed);
   bean.setLongBoxed(longBoxed);
   bean.setFloatBoxed(floatBoxed);
   bean.setDoubleBoxed(doubleBoxed);
   epService.getEPRuntime().sendEvent(bean);
 }
Beispiel #10
0
 private SupportBean sendEvent(String string) {
   SupportBean bean = new SupportBean();
   bean.setString(string);
   epService.getEPRuntime().sendEvent(bean);
   return bean;
 }
 private void sendEvent(String id, int intPrimitive, long longPrimitive) {
   SupportBean bean = new SupportBean(id, intPrimitive);
   bean.setLongPrimitive(longPrimitive);
   epService.getEPRuntime().sendEvent(bean);
 }
 private SupportBean makeSupportBean(String theString, int intPrimitive, int longPrimitive) {
   SupportBean supportBean = new SupportBean(theString, intPrimitive);
   supportBean.setLongPrimitive(longPrimitive);
   return supportBean;
 }