|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.fc.QueryResult
public class QueryResult
The QueryResult class is a container of results returned from a query. Normally, these results are accessed via the Enumeration interface which is implemented by this class. The Enumeration interface provides generic access to elements of type Object. The actual runtime type for the element is based on the type of query that is performed. For simple queries using the QuerySpec where only a single class is specified in the constructor, the element type will be Persistable. For all other queries, the safest assumption is to consider the element type to be an Object array (i.e. Object[]). In the Windchill Object-to-Relational mapping, an element in the Enumeration corresponds to a row in the result set of the query. In general, multiple classes can be specified in the query so each Object is returned as an array indexed value.
An instance of this object will internally reference each item returned
from a query. When processing very large result sets, this could lead
to performance issues. To handle processing large results sets, the
getEnumeration() method can be called to return an Enumeration which
will internally "free" references as each element is returned. This
will allow the result objects to be garbage collected as soon as the
object is processed and no other external references exist. When using
this technique, it is important to remove (e.g. set to null) any references
to the QueryResult itself, after the getEnumeration() method is called.
Supported API: true
Extendable: false
| Method Summary | |
|---|---|
Enumeration |
getEnumeration()
Returns an Enumeration of the results optimized to remove references to elements as they are returned. |
ObjectVectorIfc |
getObjectVectorIfc()
Returns an ObjectVector of the results. |
boolean |
hasMoreElements()
Indicates if more elements are available for this enumeration of the results. |
Object |
nextElement()
Returns the next element in this enumeration of the results. |
Enumeration |
reset()
Reset the enumeration to start of set. |
int |
size()
Answer the number of objects in the result set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public int size()
public Enumeration reset()
public Enumeration getEnumeration()
public boolean hasMoreElements()
hasMoreElements in interface Enumerationpublic Object nextElement()
nextElement in interface Enumerationpublic ObjectVectorIfc getObjectVectorIfc()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||