File tree Expand file tree Collapse file tree
srv/src/main/java/my/bookshop/handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717import com .sap .cds .ql .Predicate ;
1818import com .sap .cds .ql .Select ;
1919import com .sap .cds .ql .Upsert ;
20- import com .sap .cds .ql .cqn .CqnModifier ;
2120import com .sap .cds .ql .cqn .CqnSelect ;
21+ import com .sap .cds .ql .cqn .Modifier ;
2222import com .sap .cds .services .ErrorStatuses ;
2323import com .sap .cds .services .EventContext ;
2424import com .sap .cds .services .ServiceException ;
@@ -71,7 +71,7 @@ public void readAddresses(CdsReadEventContext context) {
7171 String businessPartner = context .getUserInfo ().getAttributeValues ("businessPartner" ).stream ().findFirst ()
7272 .orElseThrow (() -> new ServiceException (ErrorStatuses .FORBIDDEN , MessageKeys .BUPA_MISSING ));
7373
74- CqnSelect select = CQL .copy (context .getCqn (), new CqnModifier () {
74+ CqnSelect select = CQL .copy (context .getCqn (), new Modifier () {
7575
7676 public Predicate where (Predicate original ) {
7777 Predicate where = CQL .get (Addresses .BUSINESS_PARTNER ).eq (businessPartner );
Original file line number Diff line number Diff line change 2828import com .sap .cds .services .ErrorStatuses ;
2929import com .sap .cds .services .EventContext ;
3030import com .sap .cds .services .ServiceException ;
31- import com .sap .cds .services .cds .CdsService ;
3231import com .sap .cds .services .cds .CdsUpdateEventContext ;
3332import com .sap .cds .services .cds .CqnService ;
3433import com .sap .cds .services .draft .DraftCancelEventContext ;
@@ -269,7 +268,7 @@ public void addBookToOrder(AddToOrderContext context) {
269268 /**
270269 * @return the static CSV singleton upload entity
271270 */
272- @ On (entity = Upload_ .CDS_NAME , event = CdsService .EVENT_READ )
271+ @ On (entity = Upload_ .CDS_NAME , event = CqnService .EVENT_READ )
273272 public Upload getUploadSingleton () {
274273 return Upload .create ();
275274 }
@@ -279,7 +278,7 @@ public Upload getUploadSingleton() {
279278 * @param context
280279 * @param csv
281280 */
282- @ On ( event = CdsService . EVENT_UPDATE )
281+ @ On
283282 public void addBooksViaCsv (CdsUpdateEventContext context , Upload upload ) {
284283 InputStream is = upload .getCsv ();
285284 if (is != null ) {
You can’t perform that action at this time.
0 commit comments