Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 23225, ItemFinder Example

by David Hegland Email:

Demonstrates good technique for finding a specific item by its number.
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For StarTeam, Version 5.0  to 7.0 393 downloads
Copyright: No significant restrictions

Size: 7,672 bytes
Updated on Fri, 27 May 2005 11:03:04 GMT
Originally uploaded on Thu, 26 May 2005 08:18:43 GMT
SHA1 Hash: FD99BEEAE72F86FDC94137894C47932FF637CAB6
MD5 Hash: 1CA36C5D008EF232E05CDC0C3859E4F8

    Explore the files in this upload

In the SDK newsgroup, it has been asked many times, "How do I find a CR by its CR number?" or similar question.

This is the answer. This small class shows the proper (according to me) technique for finding a specific item by its number.

The technique uses a Query (QueryPart, QueryNode, and QueryInfo) along with a FolderListManager/ItemListManager pair.

By using query with ILM/FLM, we avoid looping through all the items to find the one we want. For example, if you have, say, 30,000 or so CRs, you will see an enormous performance difference between this technique and simple looping.

The example provided here is called "crfinder" but it also includes commented code that you can use to make it a taskfinder or topicfinder. You could probably make it a requirementfinder too, although I don't have advantage and haven't tested reqs. Of course, you could also make it a filefinder, but then you'd be using a String instead of a number.

This example is also handy if you are wondering how to instantiate and use a query object via SDK.

This example also shows how to use FLM and ILM.

It's a lot of useful schoolin in one little class. Enjoy.

:) dave

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03