Package com.avoka.tm.query
Class SvcConnQuery
java.lang.Object
com.avoka.tm.query.SvcConnQuery
Provides a service connection value object query class.
Examples
Please find the service connection query examples about list and first and count below.
Service Connection Query List Example
This Groovy example shows how to list "AWS S3" type connections ordered by name.
import com.avoka.tm.query.* import com.avoka.tm.vo.* List<SvcConn> svcConns = new SvcConnQuery() .setType("AWS S3") .addOrderByAsc("name") .listValues()
Service Connection Query First Example
This Groovy example shows how to query a service connection by name.
import com.avoka.tm.query.* import com.avoka.tm.vo.* SvcConn svcConn = new SvcConnQuery() .setName("History Publish") .setClientCode("clientCode") .firstValue();
Service Connection Query Count Example
This Groovy example shows how to count service connection with given name.
import com.avoka.tm.query.* import com.avoka.tm.vo.* int count = new SvcConnQuery() .setName("IDV Conn") .count();
- Since:
- 5.1.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddOrderByAsc
(String orderProperty) Add the sort order by ascending to the query.addOrderByDesc
(String orderProperty) Add the sort order by descending to the query.int
count()
Execute a select count query and return the total number of records selected by the query.Execute the query and return the first JSON value.Execute the query and return the first value object for the query.listJson()
Execute the query and return JSON array list.Execute the query and return a list of value objects.setClientCode
(String clientCode) Set the service connection client code query parameter.setFetchLimit
(int fetchLimit) Set the query fetch limit to limit the maximum number of records returned.Set the service connection id (PK) query parameter.Set the service connection name query parameter.Set the service connection type query parameter.
-
Constructor Details
-
SvcConnQuery
-
-
Method Details
-
setClientCode
Set the service connection client code query parameter.- Parameters:
clientCode
- the service connection client code query parameter- Returns:
- the query object
-
setId
Set the service connection id (PK) query parameter.- Parameters:
id
- the service connection (PK) query parameter- Returns:
- the query object
-
setName
Set the service connection name query parameter.- Parameters:
name
- the service connection name query parameter- Returns:
- the query object
-
setType
Set the service connection type query parameter.- Parameters:
type
- the service connection type query parameter- Returns:
- the query object
-
setFetchLimit
Set the query fetch limit to limit the maximum number of records returned. The default query fetch limit is 100 records.- Parameters:
fetchLimit
- the query fetch limit- Returns:
- the query object
-
addOrderByAsc
Add the sort order by ascending to the query.- Parameters:
orderProperty
- the property to sort by (required)- Returns:
- the query object
-
addOrderByDesc
Add the sort order by descending to the query.- Parameters:
orderProperty
- the property to sort by (required)- Returns:
- the query object
-
count
public int count()Execute a select count query and return the total number of records selected by the query. Note: Generally, TM does not support configurations where service connections with the same name exist on both the global and the organization specific level. This query will always count matching global service connections, and will also count matching organization-specific connections (depending on organization filters set on the query and organization restrictions on the security context).- Returns:
- the total number of records selected by the query
-
listValues
Execute the query and return a list of value objects. Note: Generally, TM does not support configurations where service connections with the same name exist on both the global and the organization specific level. This query will always return matching global service connections, and will also return matching organization-specific connections (depending on organization filters set on the query and organization restrictions on the security context). It is the caller's responsibility to handle multiple result rows (e.g. multiple connections with the same name belonging to different organizations).- Returns:
- execute the query and return a list of value objects
-
listJson
Execute the query and return JSON array list.- Returns:
- execute the query and return JSON array list
-
firstValue
Execute the query and return the first value object for the query.- Returns:
- execute the query and return the first value object for the query
-
firstJson
Execute the query and return the first JSON value.- Returns:
- execute the query and return the first JSON value
-