Package com.sap.cds.ql.cqn
Interface CqnStatement
- All Superinterfaces:
JSONizable
- All Known Subinterfaces:
CqnDelete
,CqnFilterableStatement
,CqnInsert
,CqnSelect
,CqnUpdate
,CqnUpsert
,CqnXsert
,Delete<T>
,FilterableStatement<T,
,S> Insert
,Update<T>
,Upsert
- All Known Implementing Classes:
Select
,StatementBuilder
-
Method Summary
Modifier and TypeMethodDescriptiondefault CqnDelete
asDelete()
Casts this CQN statement toCqnDelete
.default CqnInsert
asInsert()
Casts this CQN statement toCqnInsert
.default CqnSelect
asSelect()
Casts this CQN statement toCqnSelect
.default CqnUpdate
asUpdate()
Casts this CQN statement toCqnUpdate
.default CqnUpsert
asUpsert()
Casts this CQN statement toCqnUpsert
.hints()
Returns the runtime hints of this statement.default boolean
isDelete()
Returnstrue
if this is aCqnDelete
statement.default boolean
isInsert()
Returnstrue
if this is aCqnInsert
statement.default boolean
isSelect()
Returnstrue
if this is aCqnSelect
statement.default boolean
isUpdate()
Returnstrue
if this is aCqnUpdate
statement.default boolean
isUpsert()
Returnstrue
if this is aCqnUpsert
statement.ref()
Returns the reference of this statement.Methods inherited from interface com.sap.cds.JSONizable
toJson
-
Method Details
-
ref
CqnStructuredTypeRef ref()Returns the reference of this statement.CqnSelect
statements do not necessarily have a reference, e.g. a select from subquery. This can be checked viaCqnSelect.from()
.- Returns:
- the reference
- Throws:
CdsException
- if this statement does not have a reference
-
hints
Returns the runtime hints of this statement.- Returns:
- the runtime hints
-
isSelect
default boolean isSelect()Returnstrue
if this is aCqnSelect
statement.- Returns:
true
if this is a select statement, otherwisefalse
-
isInsert
default boolean isInsert()Returnstrue
if this is aCqnInsert
statement.- Returns:
true
if this is an insert statement, otherwisefalse
-
isUpsert
default boolean isUpsert()Returnstrue
if this is aCqnUpsert
statement.- Returns:
true
if this is an upsert statement, otherwisefalse
-
isUpdate
default boolean isUpdate()Returnstrue
if this is aCqnUpdate
statement.- Returns:
true
if this is an update statement, otherwisefalse
-
isDelete
default boolean isDelete()Returnstrue
if this is aCqnDelete
statement.- Returns:
true
if this is a delete statement, otherwisefalse
-
asSelect
Casts this CQN statement toCqnSelect
.- Returns:
- this statement as a CqnSelect
- Throws:
ClassCastException
- if this statement is not a select
-
asInsert
Casts this CQN statement toCqnInsert
.- Returns:
- this statement as a CqnInsert
- Throws:
ClassCastException
- if this statement is not an insert
-
asUpsert
Casts this CQN statement toCqnUpsert
.- Returns:
- this statement as a CqnUpsert
- Throws:
ClassCastException
- if this statement is not an upsert
-
asUpdate
Casts this CQN statement toCqnUpdate
.- Returns:
- this statement as a CqnUpdate
- Throws:
ClassCastException
- if this statement is not an update
-
asDelete
Casts this CQN statement toCqnDelete
.- Returns:
- this statement as a CqnDelete
- Throws:
ClassCastException
- if this statement is not a delete
-