Class AdtQuery
java.lang.Object
infrastructure.digitaltwins.query.AdtQuery
Helper class to construct query for Azure Digital Twins service.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionChain in and another where clause.fromDigitalTwins
(String alias) Specify the FROM digital twins clause with its alias.joinRelationship
(String dstAlias, String srcAlias, String relationshipName) Join the query with a relationship, specified by its relationshipName of the srcAlias digital twin.Select query considering returned elements.Select query but return only numberOfElements top elements.toQuery()
Method used to export the final query.Where clause to include in the query.
-
Constructor Details
-
AdtQuery
public AdtQuery()Default constructor.
-
-
Method Details
-
select
Select query considering returned elements.- Parameters:
elements
- the elements to return from the query- Returns:
- the updated query
-
selectTop
Select query but return only numberOfElements top elements.- Parameters:
numberOfElementsToSelect
- the number of top elements to returnelements
- the elements to return from the query- Returns:
- the updated query
-
fromDigitalTwins
Specify the FROM digital twins clause with its alias. This alias can be used later to refer to it.- Parameters:
alias
- the alias for the digital twin- Returns:
- the updated query
-
joinRelationship
Join the query with a relationship, specified by its relationshipName of the srcAlias digital twin. Specify also the dstAlias used to describe the destination digital twin.- Parameters:
dstAlias
- the alias of the target of the relationshipsrcAlias
- the alias of the source of the relationshiprelationshipName
- the name of the relationship to join- Returns:
- the updated query
-
where
Where clause to include in the query.- Parameters:
whereClause
- the where clause- Returns:
- the updated query
-
and
Chain in and another where clause.- Parameters:
whereClause
- the where clause to chain- Returns:
- the updated query
-
toQuery
Method used to export the final query.- Returns:
- the query
-