|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.fc.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
Nested Class Summary | |
(package private) static class |
QueryResult.ChunkedExternalization
Class used when streaming large results set to overcome scalability limitations of object streams by resetting stream at reasonable intervals. |
(package private) static class |
QueryResult.DuplicateStringEliminator
Class used to eliminate duplicate strings from large query result stream. |
Field Summary | |
private ObjectVectorIfc |
anOV
|
private static int |
CHUNK_SIZE
|
private static String |
CLASSNAME
|
private Enumeration |
e
|
static long |
EXTERNALIZATION_VERSION_UID
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
Constructor Summary | |
QueryResult()
Supported API: false |
|
QueryResult(ObjectVectorIfc v)
Supported API: false |
Method Summary | |
void |
append(ObjectVectorIfc ov)
Supported API: false |
void |
appendObjectVector(ObjectVector ov)
Deprecated. |
Enumeration |
getEnumeration()
Returns an Enumeration of the results optimized to remove references to elements as they are returned. |
ObjectVector |
getObjectVector()
Deprecated. Replaced by getObjectVectorIfc() |
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. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(QueryResult thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
Enumeration |
reset()
Reset the enumeration to start of set. |
int |
size()
Answer the number of objects in the result set. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static int CHUNK_SIZE
private ObjectVectorIfc anOV
private transient Enumeration e
Constructor Detail |
public QueryResult()
public QueryResult(ObjectVectorIfc v)
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(QueryResult thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public int size()
public Enumeration reset()
public Enumeration getEnumeration()
public boolean hasMoreElements()
hasMoreElements
in interface Enumeration
public Object nextElement()
nextElement
in interface Enumeration
public ObjectVectorIfc getObjectVectorIfc()
public ObjectVector getObjectVector()
public void appendObjectVector(ObjectVector ov)
public void append(ObjectVectorIfc ov)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |