File tree Expand file tree Collapse file tree
tutorials/cp-cap-java-custom-handler Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ import org.springframework.stereotype.Component;
3939
4040import com.sap.cds.services.cds.CdsCreateEventContext ;
4141import com.sap.cds.services.cds.CdsReadEventContext ;
42- import com.sap.cds.services.cds.CdsService ;
42+ import com.sap.cds.services.cds.CqnService ;
4343import com.sap.cds.services.handler.EventHandler ;
4444import com.sap.cds.services.handler.annotations.On ;
4545import com.sap.cds.services.handler.annotations.ServiceName ;
@@ -50,13 +50,13 @@ public class AdminService implements EventHandler {
5050
5151 private Map<Object , Map<String , Object > > products = new HashMap<> ();
5252
53- @On (event = CdsService . EVENT_CREATE , entity = " AdminService.Products" )
53+ @On (event = CqnService . EVENT_CREATE , entity = " AdminService.Products" )
5454 public void onCreate (CdsCreateEventContext context ) {
5555 context. getCqn(). entries(). forEach(e - > products. put(e. get(" ID" ), e));
5656 context. setResult(context. getCqn(). entries());
5757 }
5858
59- @On (event = CdsService . EVENT_READ , entity = " AdminService.Products" )
59+ @On (event = CqnService . EVENT_READ , entity = " AdminService.Products" )
6060 public void onRead (CdsReadEventContext context ) {
6161 context. setResult(products. values());
6262 }
You can’t perform that action at this time.
0 commit comments