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 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 using TopologyQueryService.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 with TopologyQueryService.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 with TopologyQueryService.executeQuery(ExecutableQuery)
      Returns:
      an object suitable for execution
    • queryType

      @NotFinalAPI QueryType queryType()
      The query type.
      Returns:
      the query type.
    • queryReferenceDefinition

      @NotFinalAPI QueryReferenceDefinition 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

      @NotFinalAPI QueryVersion 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.