Class QueryResult

java.lang.Object
mgui.interfaces.queries.QueryResult

public class QueryResult
extends java.lang.Object
Stores a set of results for a specific query.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected InterfaceQueryObject object  
    protected java.util.ArrayList<java.lang.String> sorted_properties  
    protected java.util.HashMap<java.lang.String,​java.lang.Object> values  
  • Constructor Summary

    Constructors
    Constructor Description
    QueryResult​(InterfaceQueryObject object)  
  • Method Summary

    Modifier and Type Method Description
    void addValue​(java.lang.String property, java.lang.Object value)
    Adds the specified property to this result.
    InterfaceQueryObject getObject()
    Returns the queriable object associated with this result
    java.util.ArrayList<java.lang.String> getProperties()
    Returns a list of the properties stored in this result, in the same order as they were added
    javax.swing.tree.DefaultMutableTreeNode getTreeNode()  
    java.lang.Object getValue​(java.lang.String property)
    Returns the value of the specified property

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • object

      protected InterfaceQueryObject object
    • values

      protected java.util.HashMap<java.lang.String,​java.lang.Object> values
    • sorted_properties

      protected java.util.ArrayList<java.lang.String> sorted_properties
  • Constructor Details

  • Method Details

    • getObject

      public InterfaceQueryObject getObject()
      Returns the queriable object associated with this result
      Returns:
    • addValue

      public void addValue​(java.lang.String property, java.lang.Object value)
      Adds the specified property to this result. If it is already in the list, removes it and places it at the end of the list.
      Parameters:
      property -
      value -
    • getValue

      public java.lang.Object getValue​(java.lang.String property)
      Returns the value of the specified property
      Parameters:
      property -
      Returns:
    • getProperties

      public java.util.ArrayList<java.lang.String> getProperties()
      Returns a list of the properties stored in this result, in the same order as they were added
      Returns:
    • getTreeNode

      public javax.swing.tree.DefaultMutableTreeNode getTreeNode()