Package com.hp.ucmdb.api.topology
Interface Query
public interface Query
Represents a query stored on the UCMDB server or a query to be saved in a specific folder path.
If the query was created using
TopologyQueryFactory.createNamedQuery(String)
, the first call to
either getDefinition, queryType, queryVersion, or queryReferenceDefinition will result in a server call to fetch
the query information.
Saving non existing query in a specific folder path is available via com.hp.ucmdb.api.folders.FoldersManagementSubService#saveInFolder(ResourceType, java.util.List<java.lang.String>)-
Method Summary
Modifier and TypeMethodDescriptionReturns a client-side representation of the definition of the query on the server.getName()
The name of the query.Returns the reference definition of this query, if any exists, or null if the query is "regular" (definition based).The query type.Returns the version of this query as it was saved on the server.Transforms this object into a query that can be run withTopologyQueryService.executeQuery(ExecutableQuery)
-
Method Details
-
getName
String getName()The name of the query. -
getDefinition
QueryDefinition getDefinition()Returns a client-side representation of the definition of the query on the server. The returned object is used to run a query.
You can use this method to get a query that you can modify and then run usingTopologyQueryService.executeQuery(QueryDefinition)
. The methods of theExecutableQuery
interface are sufficient for most such modifications.
If those methods are not sufficient for the requred modifications, run the modified definition withTopologyQueryService.executeQuery(QueryDefinition)
in order for the modifications to take effect.
Modifying the returned object does not change the query definition stored in the UCMDB. -
toExecutable
ExecutableQuery toExecutable()Transforms this object into a query that can be run withTopologyQueryService.executeQuery(ExecutableQuery)
- Returns:
- an object suitable for execution
-
queryType
The query type.- Returns:
- the query type.
-
queryReferenceDefinition
Returns the reference definition of this query, if any exists, or null if the query is "regular" (definition based).- Returns:
- the query reference definition or null.
- See Also:
-
queryVersion
Returns the version of this query as it was saved on the server. Versions are updated on save.- Returns:
- the version of this query as it was saved on the server.
-