public class CqnAdapter extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DRAFT_SUFFIX |
| Constructor and Description |
|---|
CqnAdapter() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends com.sap.cds.ql.cqn.CqnStatement> |
adapt(T stmt,
EventContext context)
Adapts the where condition and fields of the statement in order to allow queries
using draft fields on the normal table/view that does not contain
draft fields.
|
static List<com.sap.cds.ql.cqn.CqnDelete> |
adaptActiveEntity(com.sap.cds.ql.cqn.CqnDelete delete,
EventContext context)
Changes references to IsActiveEntity to
true. |
static com.sap.cds.ql.cqn.CqnInsert |
changeFinalAssociation(com.sap.cds.ql.cqn.CqnInsert insert,
com.sap.cds.ql.cqn.AnalysisResult analysisResult)
Changes the final association in the path expression to the association
targeting the draft entity.
|
static String |
getDraftsEntity(String entity)
Returns the corresponding draft entity name.
|
static com.sap.cds.ql.cqn.CqnPredicate |
getSecurityConstraints(EventContext context) |
static Instant |
getTimeoutThreshold() |
static com.sap.cds.ql.cqn.CqnDelete |
replaceIsActiveEntity(com.sap.cds.ql.cqn.CqnDelete delete,
boolean value)
Replaces all references to
IsActiveEntity with value |
static com.sap.cds.ql.Delete<?> |
toDelete(com.sap.cds.ql.cqn.CqnSelect s) |
public static final String DRAFT_SUFFIX
public static String getDraftsEntity(String entity)
entity - the entitypublic static List<com.sap.cds.ql.cqn.CqnDelete> adaptActiveEntity(com.sap.cds.ql.cqn.CqnDelete delete, EventContext context)
true.delete - the delete statementcontext - the EventContexttruepublic static <T extends com.sap.cds.ql.cqn.CqnStatement> List<T> adapt(T stmt, EventContext context)
T - the type of the statementstmt - the statementcontext - the EventContextpublic static com.sap.cds.ql.Delete<?> toDelete(com.sap.cds.ql.cqn.CqnSelect s)
public static com.sap.cds.ql.cqn.CqnInsert changeFinalAssociation(com.sap.cds.ql.cqn.CqnInsert insert,
com.sap.cds.ql.cqn.AnalysisResult analysisResult)
insert - the insert statementanalysisResult - the analysis result of the statementpublic static com.sap.cds.ql.cqn.CqnPredicate getSecurityConstraints(EventContext context)
public static com.sap.cds.ql.cqn.CqnDelete replaceIsActiveEntity(com.sap.cds.ql.cqn.CqnDelete delete,
boolean value)
IsActiveEntity with valuedelete - the statement to adaptvalue - the value for replacementpublic static Instant getTimeoutThreshold()
Copyright © 2021. All rights reserved.