Interface ObjectSearch

    • Method Detail

      • getCombineRule

        ObjectSearchCombineRule getCombineRule()
        Get the value for CombineRule. (The rule for combining the object search conditions) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getCustomCombineRule

        String getCustomCombineRule()
        Get the value for CustomCombineRule. (The custom expression for combining the object search conditions.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getResultType

        ObjectSearchResultType getResultType()
        Get the value for ResultType. (The type of result to display for the search) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getRowLimit

        Long getRowLimit()
        Get the value for RowLimit. (The maximum number of results to be displayed when ObjectSearchResultType is Limit)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getSortRule

        ObjectSearchSortRule getSortRule()
        Get the value for SortRule. (The rule for sorting the search results) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setCombineRule

        void setCombineRule​(ObjectSearchCombineRule newCombineRule)
        Set the value for CombineRule. (The rule for combining the object search conditions) This value is mandatory.
        Parameters:
        newCombineRule - the new value for CombineRule. If this is null, then the object cannot be persisted.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setCustomCombineRule

        void setCustomCombineRule​(String newCustomCombineRule)
        Set the value for CustomCombineRule. (The custom expression for combining the object search conditions.) This value is mandatory.
        Parameters:
        newCustomCombineRule - the new value for CustomCombineRule. If this is null, then the object cannot be persisted.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setResultType

        void setResultType​(ObjectSearchResultType newResultType)
        Set the value for ResultType. (The type of result to display for the search) This value is mandatory.
        Parameters:
        newResultType - the new value for ResultType. If this is null, then the object cannot be persisted.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setRowLimit

        void setRowLimit​(Long newRowLimit)
        Set the value for RowLimit. (The maximum number of results to be displayed when ObjectSearchResultType is Limit) This value is optional.
        Parameters:
        newRowLimit - the new value for RowLimit.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setSortRule

        void setSortRule​(ObjectSearchSortRule newSortRule)
        Set the value for SortRule. (The rule for sorting the search results) This value is mandatory.
        Parameters:
        newSortRule - the new value for SortRule. If this is null, then the object cannot be persisted.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • addCondition

        ObjectSearchCondition addCondition()
        Add a new condition with the appropriate label set. This should be used rather than createObjectSearchCondition as it establishes the correct labels
        Returns:
        The newly created ObjectSearchCondition
      • removeCondition

        boolean removeCondition​(ObjectSearchCondition condition)
        Remove a condition from this ObjectSearch and update the labels appropriately. This should be used rather than ObjectSearchCondition.deleteObject() directly as it establishes the correct labels
        Parameters:
        condition - The condition to be deleted
        Returns:
        If the condition was successfully removed.
      • getConditionCount

        Long getConditionCount()
        Get the number of conditions
        Returns:
        The number of conditions
      • getCalculatedCombineRule

        String getCalculatedCombineRule()
        Get the value for the combine rule. This returns the custom combine rule if the CombineRule is set to custom, otherwise it calculates the rule for the And and Or cases.
        Returns:
        The calculated combine rule
      • getTitleKey

        String getTitleKey()
        Get the translation key for the Object Search.
        Returns:
        The title translation key for the Object Search
      • getObjectSearchConditionByLabel

        ObjectSearchCondition getObjectSearchConditionByLabel​(String label)
        Get the ObjectSearchCondition by ConditionIndex.
        Parameters:
        label -
        Returns:
        the ObjectSearchCondition, or null if it could not be found