Class RelationQuery


  • public class RelationQuery
    extends java.lang.Object
    The Class RelationQuery specifies one or more ordering criteria with which the paginated search results should be returned (see DevNet "Improve API for Collection attributes")
    • Constructor Summary

      Constructors 
      Constructor Description
      RelationQuery​(int start, int count)  
      RelationQuery​(ItemModel model, java.lang.String attribute, int start, int count)
      Creates RelationQuery object with model, attribute, start and count parameters set.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addOrder​(java.lang.String attribute, RelationQuery.ORDERING ascending)
      Adds the order.
      java.lang.String getAttribute()
      Gets the attribute we are searching for.
      int getCount()
      For paginating, returns the number of results to fetch.
      ItemModel getModel()
      Gets the model for which we would like to search.
      int getOrderCount()
      Returns count of orderSpec attributes.
      RelationQuery.OrderSpec getOrderSpec​(int number)
      Returns search order.
      int getStart()
      For paginating, returns the start index.
      void setAttribute​(java.lang.String attribute)
      Sets the attribute we would like to search for.
      void setModel​(ItemModel model)
      Sets the model for which we would like to search.
      void setStart​(int start)
      For paginating, specify the start index that we want.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RelationQuery

        public RelationQuery​(int start,
                             int count)
                      throws RelationQueryException
        Parameters:
        start - The paginating data -1 means ignore
        count - The paginating data -1 means ignore
        Throws:
        RelationQueryException
      • RelationQuery

        public RelationQuery​(ItemModel model,
                             java.lang.String attribute,
                             int start,
                             int count)
        Creates RelationQuery object with model, attribute, start and count parameters set.
        Parameters:
        model - The model to search for
        attribute - The attribute to search for
        start - The paginating data -1 means ignore
        count - The paginating data -1 means ignore
    • Method Detail

      • getStart

        public int getStart()
        For paginating, returns the start index.
      • setStart

        public void setStart​(int start)
        For paginating, specify the start index that we want.
        Parameters:
        start - the new start
      • getCount

        public int getCount()
        For paginating, returns the number of results to fetch.
      • getModel

        public ItemModel getModel()
        Gets the model for which we would like to search.
        Returns:
        the model
      • setModel

        public void setModel​(ItemModel model)
        Sets the model for which we would like to search.
        Parameters:
        model - the new model
      • getAttribute

        public java.lang.String getAttribute()
        Gets the attribute we are searching for.
      • setAttribute

        public void setAttribute​(java.lang.String attribute)
        Sets the attribute we would like to search for.
      • getOrderCount

        public int getOrderCount()
        Returns count of orderSpec attributes.