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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Translate the entire conversation x

Significance of new int[]{0} in Query Spec

TDT
16-Pearl
16-Pearl

Significance of new int[]{0} in Query Spec

What is the significance of new int[]{0} in appendWhere of

querySpec.appendWhere(
new SearchCondition(EPMDocument.class, "master>number", SearchCondition.EQUAL, number, true),
new int[] { 0 });

2 REPLIES 2
avillanueva
23-Emerald I
(To:TDT)

See snippet below. When you have multiple classes in the query (similar to From declaration), it needs to index the classes. That same index is used to tie into where clauses. 

 

QuerySpec spec=new QuerySpec();
int wtPart=spec.addClassList(WTPartMaster.class,true);
SearchCondition sc=new SearchCondition(WTPartMaster.class,WTPartMaster.NUMBER,SearchCondition.EQUAL,number.toUpperCase());
spec.appendWhere(sc, new int[] {wtPart});

 

Hello @TDT

 

It looks like you have a response from our community champion. If it helped you solve your question please mark the reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.

Announcements
Top Tags