File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
tutorials/cp-cap-java-custom-handler Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ import org.springframework.stereotype.Component;
39
39
40
40
import com.sap.cds.services.cds.CdsCreateEventContext ;
41
41
import com.sap.cds.services.cds.CdsReadEventContext ;
42
- import com.sap.cds.services.cds.CdsService ;
42
+ import com.sap.cds.services.cds.CqnService ;
43
43
import com.sap.cds.services.handler.EventHandler ;
44
44
import com.sap.cds.services.handler.annotations.On ;
45
45
import com.sap.cds.services.handler.annotations.ServiceName ;
@@ -50,13 +50,13 @@ public class AdminService implements EventHandler {
50
50
51
51
private Map<Object , Map<String , Object > > products = new HashMap<> ();
52
52
53
- @On (event = CdsService . EVENT_CREATE , entity = " AdminService.Products" )
53
+ @On (event = CqnService . EVENT_CREATE , entity = " AdminService.Products" )
54
54
public void onCreate (CdsCreateEventContext context ) {
55
55
context. getCqn(). entries(). forEach(e - > products. put(e. get(" ID" ), e));
56
56
context. setResult(context. getCqn(). entries());
57
57
}
58
58
59
- @On (event = CdsService . EVENT_READ , entity = " AdminService.Products" )
59
+ @On (event = CqnService . EVENT_READ , entity = " AdminService.Products" )
60
60
public void onRead (CdsReadEventContext context ) {
61
61
context. setResult(products. values());
62
62
}
You can’t perform that action at this time.
0 commit comments