3232import com .sap .cds .services .persistence .PersistenceService ;
3333import com .sap .cds .services .request .FeatureTogglesInfo ;
3434
35- import cds .gen .catalogservice .AddReviewContext ;
35+ import cds .gen .catalogservice .BooksAddReviewContext ;
3636import cds .gen .catalogservice .Books ;
3737import cds .gen .catalogservice .Books_ ;
3838import cds .gen .catalogservice .CatalogService_ ;
@@ -80,7 +80,7 @@ class CatalogServiceHandler implements EventHandler {
8080 * @param context {@link ReviewContext}
8181 */
8282 @ Before (entity = Books_ .CDS_NAME )
83- public void beforeAddReview (AddReviewContext context ) {
83+ public void beforeAddReview (BooksAddReviewContext context ) {
8484 String user = context .getUserInfo ().getName ();
8585 String bookId = (String ) analyzer .analyze (context .getCqn ()).targetKeys ().get (Books .ID );
8686
@@ -99,7 +99,7 @@ public void beforeAddReview(AddReviewContext context) {
9999 * @param context {@link ReviewContext}
100100 */
101101 @ On (entity = Books_ .CDS_NAME )
102- public void onAddReview (AddReviewContext context ) {
102+ public void onAddReview (BooksAddReviewContext context ) {
103103 String bookId = (String ) analyzer .analyze (context .getCqn ()).targetKeys ().get (Books .ID );
104104 cds .gen .reviewservice .Reviews review = cds .gen .reviewservice .Reviews .create ();
105105 review .setBookId (bookId );
@@ -120,7 +120,7 @@ public void onAddReview(AddReviewContext context) {
120120 * @param context {@link ReviewContext}
121121 */
122122 @ After (entity = Books_ .CDS_NAME )
123- public void afterAddReview (AddReviewContext context ) {
123+ public void afterAddReview (BooksAddReviewContext context ) {
124124 ratingCalculator .setBookRating (context .getResult ().getBookId ());
125125 }
126126
0 commit comments