Class SearchResultBuilder

All Implemented Interfaces:

public class SearchResultBuilder
extends HashExtensionBuilder

A SearchResultBuilder is used to generate a SearchResult, which is one entry of possibly many in a returned IQSearchResult. The data stored will be a list of keys with associated values, for instance:

...and so on. Note that a much better way of doing this would be to keep the search result parameters constant across all the results, since the keys are constant. At that point, there would be one SearchResultKey which would look like this class and could be possibly based on the IQSearchRequest response, or assume that the server properly returns empty entries for values which come in that aren't assigned by the user, rather than omitting them. Then, the list of items becomes an array. Consider implementing this to be a task for the reader ;-) For now, a basic (poorly optimized) solution will do.

Constructor Summary
          Creates a new SearchResultBuilder instance.
Method Summary
 Extension build()
          build a new SearchResult, based on the current builder state
Methods inherited from class org.jabber.jabberbeans.Extension.HashExtensionBuilder
getTable, reset, set
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SearchResultBuilder()
Creates a new SearchResultBuilder instance.

Method Detail


public Extension build()
                throws java.lang.InstantiationException
build a new SearchResult, based on the current builder state

an Extension value holding a SearchResult
java.lang.InstantiationException - if there is insufficient data to return a valid object.