Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


oracle.webcenter.search.util
Class WrapperQueryResult<T>

java.lang.Object
  extended by oracle.webcenter.search.util.WrapperQueryResult<T>

All Implemented Interfaces:
java.util.Iterator<T>, QueryResult<T>

public class WrapperQueryResult<T>
extends java.lang.Object
implements QueryResult<T>

Base class that allows for implementors of the Search API to build their QueryResult classes more easily. This assumes some conversion from an Iterator of some source class to an Iterator of a target class

Since:
11.1.1.0.0 Beta 2

Field Summary

 

Fields inherited from interface oracle.webcenter.search.QueryResult
ESTIMATED_RESULT_COUNT, RESPONSE_TIME

 

Constructor Summary
WrapperQueryResult(java.util.Iterator<T> target)
          Only called by subclasses.

 

Method Summary
 java.util.Map<java.lang.String,java.lang.String> getProperties()
          Default implementation of the getProperties to subclasses to not have to implement this directly.
 boolean hasNext()
          Wrapped implementation of the Iterator.hasNext method.
 T next()
          Wrapped implementation of the Iterator.next method.
 void remove()
          To prohibit callers from removing entries in the Iterator, this method always throws an Exception that "remove" is not supported

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

WrapperQueryResult

public WrapperQueryResult(java.util.Iterator<T> target)
Only called by subclasses.
Parameters:
target - the source iterator of type T

Method Detail

getProperties

public java.util.Map<java.lang.String,java.lang.String> getProperties()
Default implementation of the getProperties to subclasses to not have to implement this directly.
Specified by:
getProperties in interface QueryResult<T>
Returns:
a Map of String keys and String values holding properties of the QueryResult.

hasNext

public boolean hasNext()
Wrapped implementation of the Iterator.hasNext method.
Specified by:
hasNext in interface java.util.Iterator<T>
Returns:
true if there are more elements to be iterated

next

public T next()
Wrapped implementation of the Iterator.next method.
Specified by:
next in interface java.util.Iterator<T>
Returns:
a T object that represents the next item in the target Iterator

remove

public void remove()
To prohibit callers from removing entries in the Iterator, this method always throws an Exception that "remove" is not supported
Specified by:
remove in interface java.util.Iterator<T>

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


Copyright © 2009, 2013, Oracle and/or its affiliates. All rights reserved.