Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Need help converting the blow sql into QuerySpec
SELECT *
FROM DISCRETEACTIONITEM DAI
JOIN ITERATEDACTIONITEMSUBJECTLINK ISL ON DAI.IDA2A2 = ISL.IDA3A5
JOIN CONTROLBRANCH CB ON ISL.BRANCHIDA3B5 = CB.IDA2A2
JOIN WTPARTMASTER PM ON CB.IDA3B5 = PM.IDA2A2;
Solved! Go to Solution.
No longer have this issue, managed to smash the keyboard enought times to produce the following:
QuerySpec qs = new QuerySpec();
int i = qs.appendClassList(DiscreteActionItem.class, true);
int j = qs.appendClassList(IteratedActionItemSubjectLink.class,
false);
int k = qs.appendClassList(ControlBranch.class, false);
int l = qs.appendClassList(WTPartMaster.class, true);
qs.appendWhere(new SearchCondition(DiscreteActionItem.class,
"thePersistInfo.theObjectIdentifier.id",
IteratedActionItemSubjectLink.class,
"roleAObjectRef.key.id"), new int[] { i, j });
qs.appendAnd();
qs.appendWhere(
new SearchCondition(IteratedActionItemSubjectLink.class,
"roleBObjectRef.key.branchId", ControlBranch.class,
"thePersistInfo.theObjectIdentifier.id"),
new int[] { j, k });
qs.appendAnd();
qs.appendWhere(
new SearchCondition(ControlBranch.class,
"masterReference.key.id", WTPartMaster.class,
"thePersistInfo.theObjectIdentifier.id"),
new int[] { k, l });
However, if anyone has a nicer solution, feel free to respond.
No longer have this issue, managed to smash the keyboard enought times to produce the following:
QuerySpec qs = new QuerySpec();
int i = qs.appendClassList(DiscreteActionItem.class, true);
int j = qs.appendClassList(IteratedActionItemSubjectLink.class,
false);
int k = qs.appendClassList(ControlBranch.class, false);
int l = qs.appendClassList(WTPartMaster.class, true);
qs.appendWhere(new SearchCondition(DiscreteActionItem.class,
"thePersistInfo.theObjectIdentifier.id",
IteratedActionItemSubjectLink.class,
"roleAObjectRef.key.id"), new int[] { i, j });
qs.appendAnd();
qs.appendWhere(
new SearchCondition(IteratedActionItemSubjectLink.class,
"roleBObjectRef.key.branchId", ControlBranch.class,
"thePersistInfo.theObjectIdentifier.id"),
new int[] { j, k });
qs.appendAnd();
qs.appendWhere(
new SearchCondition(ControlBranch.class,
"masterReference.key.id", WTPartMaster.class,
"thePersistInfo.theObjectIdentifier.id"),
new int[] { k, l });
However, if anyone has a nicer solution, feel free to respond.