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 CqnDeleteasDelete()Casts this CQN statement toCqnDelete.default CqnInsertasInsert()Casts this CQN statement toCqnInsert.default CqnSelectasSelect()Casts this CQN statement toCqnSelect.default CqnUpdateasUpdate()Casts this CQN statement toCqnUpdate.default CqnUpsertasUpsert()Casts this CQN statement toCqnUpsert.hints()Returns the runtime hints of this statement.default booleanisDelete()Returnstrueif this is aCqnDeletestatement.default booleanisInsert()Returnstrueif this is aCqnInsertstatement.default booleanisSelect()Returnstrueif this is aCqnSelectstatement.default booleanisUpdate()Returnstrueif this is aCqnUpdatestatement.default booleanisUpsert()Returnstrueif this is aCqnUpsertstatement.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.CqnSelectstatements 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()Returnstrueif this is aCqnSelectstatement.- Returns:
trueif this is a select statement, otherwisefalse
-
isInsert
default boolean isInsert()Returnstrueif this is aCqnInsertstatement.- Returns:
trueif this is an insert statement, otherwisefalse
-
isUpsert
default boolean isUpsert()Returnstrueif this is aCqnUpsertstatement.- Returns:
trueif this is an upsert statement, otherwisefalse
-
isUpdate
default boolean isUpdate()Returnstrueif this is aCqnUpdatestatement.- Returns:
trueif this is an update statement, otherwisefalse
-
isDelete
default boolean isDelete()Returnstrueif this is aCqnDeletestatement.- Returns:
trueif 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
-