Question
Team Query
- January 10, 2011
- 3 replies
- 1630 views
I need code to query all Teams whose context name is either "Site" or
"emhartglass".
I've have been using:
wt.query.QuerySpec qs = new
wt.query.QuerySpec(wt.team.TeamTemplate.class);
wt.fc.QueryResult qr = wt.fc.PersistenceServerHelper.manager.query(qs);
//Query all team templates
I now need to limit the teams returned in the QueryResult to only those
teams whose context name is either "Site" or "emhartglass".
Any thoughts on this?
I'd tried the following
wt.query.QuerySpec qs = new
wt.query.QuerySpec(wt.team.TeamTemplate.class);
qs.appendWhere(new SearchCondition(wt.team.TeamTemplate.class,
wt.team.TeamTemplate.CONTAINER_NAME, SearchCondition.EQUAL, "Site"));
wt.fc.QueryResult qr =
wt.fc.PersistenceServerHelper.manager.query(qs); //Query all team
templates
the error i get is
David Graham
CAx/PDM Administrator
Emhart Glass Manufacturing Inc.
123 Great Pond Drive | PO Box 220 | Windsor, CT 06095-0220 | USA
Telephone +1 (860) 298 7377 | Telefax +1 (860) 298 7397
Mobile +1 (203) 376-3144 |
"emhartglass".
I've have been using:
wt.query.QuerySpec qs = new
wt.query.QuerySpec(wt.team.TeamTemplate.class);
wt.fc.QueryResult qr = wt.fc.PersistenceServerHelper.manager.query(qs);
//Query all team templates
I now need to limit the teams returned in the QueryResult to only those
teams whose context name is either "Site" or "emhartglass".
Any thoughts on this?
I'd tried the following
wt.query.QuerySpec qs = new
wt.query.QuerySpec(wt.team.TeamTemplate.class);
qs.appendWhere(new SearchCondition(wt.team.TeamTemplate.class,
wt.team.TeamTemplate.CONTAINER_NAME, SearchCondition.EQUAL, "Site"));
wt.fc.QueryResult qr =
wt.fc.PersistenceServerHelper.manager.query(qs); //Query all team
templates
the error i get is
David Graham
CAx/PDM Administrator
Emhart Glass Manufacturing Inc.
123 Great Pond Drive | PO Box 220 | Windsor, CT 06095-0220 | USA
Telephone +1 (860) 298 7377 | Telefax +1 (860) 298 7397
Mobile +1 (203) 376-3144 |

