cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Searching for WTPartDescribeLinks

rfranco
7-Bedrock

Searching for WTPartDescribeLinks

I need to run a search for specific WTPartDescribeLinks from a checked out part.

The following line isn't working for me. I get an error stating the iteration must not be null. I believe the method has been deprecated.

//QueryResult qrLink = StructHelper.service.navigateDescribes(checkedOutPart, WTPartDescribeLink.class, false);

I have also tried

QueryResult qrLink = PersistenceHelper.manager.navigate(checkedOutPart,   WTPartDescribeLink.ROLE_AOBJECT_REF, WTPartDescribeLink.class, false);

But I am getting a Null Pointer Exception

Is there another way of running a search for these describe links or am I doing something wrong?

Any thoughts would be very much appreciated. Thanks


Regards,


Ryan

ACCEPTED SOLUTION

Accepted Solutions
rfranco
7-Bedrock
(To:rfranco)

Got it sorted now, thanks guys.


I used,

QueryResult qrLink = wt.part.WTPartHelper.service.getDescribedByWTDocuments(checkedOutPart, false);

Also the null pointer exception was due to a variable in the wrong place (inside a loop).

View solution in original post

3 REPLIES 3
bsindelar
12-Amethyst
(To:rfranco)

Ryan,

Are you looking for a WTPart<>EPMDoc link or a WTPart<>WTDoc link?  And does it have to be through APIs or Java methods?

There may be ways to do this via the DB ... and thus through QueryBuilder as well.

jmomber
12-Amethyst
(To:rfranco)

When I run this on a part in my system (not checked out), I get links returned:

QueryResult qrLink = PersistenceHelper.manager.navigate(p,   WTPartDescribeLink.ROLE_BOBJECT_ROLE, WTPartDescribeLink.class, false);

~Jamie

rfranco
7-Bedrock
(To:rfranco)

Got it sorted now, thanks guys.


I used,

QueryResult qrLink = wt.part.WTPartHelper.service.getDescribedByWTDocuments(checkedOutPart, false);

Also the null pointer exception was due to a variable in the wrong place (inside a loop).

Announcements


Top Tags