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 String |
getDraftsEntity(String entity)
Returns the corresponding draft entity name.
|
static com.sap.cds.ql.cqn.CqnPredicate |
getSecurityConstraints(EventContext context) |
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) |
static com.sap.cds.ql.Select<?> |
toSelect(com.sap.cds.ql.cqn.CqnDelete delete) |
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.Select<?> toSelect(com.sap.cds.ql.cqn.CqnDelete delete)
public 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 replacementCopyright © 2022. All rights reserved.