문제

I am writing select query for EPL Esper, and I need to add where clause based on info from object which stores in java set.

myCalss2{
    int prop1;
    String prop2;
}
    
class myClass{
    int someFiled;
    boolean foo;
    Set<myClass2> bar;
}

I need to compare value of prop2, but I get instance of myClass, how to get value of prop2?

도움이 되었습니까?

해결책

So "myClass" really has multiple "prop2" values.

Esper provides enumeration methods (aka. lambda funcs) so something like this would work: "bar.anyOf(v => v.prop2 = 'some value')"

See http://esper.codehaus.org/esper-4.10.0/doc/reference/en-US/html_single/index.html#enumerationreference

Sample in a EPL: "select * from MyClass(bar.anyOf(v => v.prop2 = 'some value'))"

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top