Search in sources :

Example 1 with PropertyExtractor

use of com.oracle.coherence.spring.annotation.PropertyExtractor in project coherence-spring by coherence-community.

the class EventHandler method onOrderWithMultiplePropertyExtractors.

// end::on-order-with-property-extractor[]
// tag::on-order-with-multiple-property-extractors[]
@CoherenceEventListener
// <1>
@PropertyExtractor("customerId")
@PropertyExtractor("orderId")
public void onOrderWithMultiplePropertyExtractors(// <2>
@Inserted @MapName("orders") MapEvent<String, List<Object>> event) {
    // <3>
    List list = event.getNewValue();
    // <4>
    String customerId = (String) list.get(0);
    Long orderId = (Long) list.get(1);
// ...
}
Also used : List(java.util.List) PropertyExtractor(com.oracle.coherence.spring.annotation.PropertyExtractor) CoherenceEventListener(com.oracle.coherence.spring.event.CoherenceEventListener)

Aggregations

PropertyExtractor (com.oracle.coherence.spring.annotation.PropertyExtractor)1 CoherenceEventListener (com.oracle.coherence.spring.event.CoherenceEventListener)1 List (java.util.List)1