com.sap.cds.adapter.odata.v4.query.apply.ApplyHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cds-adapter-odata-v4 Show documentation
Show all versions of cds-adapter-odata-v4 Show documentation
OData V4 adapter for CDS Services Java
/**************************************************************************
* (C) 2019-2024 SAP SE or an SAP affiliate company. All rights reserved. *
**************************************************************************/
package com.sap.cds.adapter.odata.v4.query.apply;
import java.util.ArrayList;
import java.util.List;
import org.apache.olingo.server.api.uri.queryoption.ApplyItem;
import org.apache.olingo.server.api.uri.queryoption.ApplyOption;
import com.sap.cds.adapter.odata.v4.query.ExpressionParser;
import com.sap.cds.ql.Select;
import com.sap.cds.ql.cqn.transformation.CqnTransformation;
import com.sap.cds.ql.impl.SelectBuilder;
public class ApplyHandler {
private final List> unfoldedItems;
private static final ApplyHandler NOOP = new ApplyHandler(List.of(), null);
public ApplyHandler(List items, ExpressionParser expressionParser) {
unfoldedItems = new ApplyConverter(expressionParser).unfoldAndConvert(items);
}
public List getTransformations(int i) {
return unfoldedItems.get(i);
}
public List