Class WqlQuery

java.lang.Object
org.metricshub.winrm.WqlQuery

public class WqlQuery extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Get the properties of the SELECT statement, in lower case.
    Get the map of subproperties to retrieve inside each selected property, in lower case.
    static WqlQuery
    Parses the specified WQL query and returns a new instance of WqlQuery Supported WQL syntaxes: SELECT * FROM Class SELECT PropA, PropB FROM Class SELECT PropA, PropB FROM Class WHERE condition ASSOCIATORS OF { objectId } ASSOCIATORS OF { objectId } WHERE condition SELECT * FROM ASSOCIATORS OF { objectId } WHERE condition SELECT PropA, PropB FROM ASSOCIATORS OF { objectId } WHERE condition
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • newInstance

      public static WqlQuery newInstance(CharSequence wql) throws WqlQuerySyntaxException
      Parses the specified WQL query and returns a new instance of WqlQuery Supported WQL syntaxes:
      • SELECT * FROM Class
      • SELECT PropA, PropB FROM Class
      • SELECT PropA, PropB FROM Class WHERE condition
      • ASSOCIATORS OF { objectId }
      • ASSOCIATORS OF { objectId } WHERE condition
      • SELECT * FROM ASSOCIATORS OF { objectId } WHERE condition
      • SELECT PropA, PropB FROM ASSOCIATORS OF { objectId } WHERE condition
      Parameters:
      wql - The WQL query to parse
      Returns:
      a new WqlQuery instance
      Throws:
      WqlQuerySyntaxException - when the specified WQL is invalid and cannot be parsed
      IllegalArgumentException - if wql is null
    • getSelectedProperties

      public List<String> getSelectedProperties()
      Get the properties of the SELECT statement, in lower case.
      Returns:
      an unmodifiable view of the selected properties (empty for SELECT *)
    • getSubPropertiesMap

      public Map<String,Set<String>> getSubPropertiesMap()
      Get the map of subproperties to retrieve inside each selected property, in lower case.
      Returns:
      an unmodifiable view of the property to subproperties map (the subproperty sets are unmodifiable too)
    • getCleanWql

      public String getCleanWql()
    • toString

      public String toString()
      Overrides:
      toString in class Object