[midPoint] help with the midpoint query language in a java search
Ashwill, Steven L
sashwill at uillinois.edu
Tue Jul 9 20:55:40 CEST 2024
Hello,
I have an advanced query that I use on the User page(see below) but I also need to find the same people in a java method. Would anyone be able to give me an example? I have a sample below where I have performed another search.
This is the advance query I would like to use in JAVA:
roleMembershipRef matches (oid = "eb5f4f58-9bb7-46df-a669-e9423c99e436" and targetType = OrgType and relation = manager)
This is a simple example of a user search I've set up for another case:
ObjectFilter filter = QueryBuilder.queryFor(UserType.class, prismContext)
.item(UserType.F_EMPLOYEE_NUMBER).eq(user.getEmployeeNumber())
.buildFilter();
ObjectQuery query = ObjectQueryImpl.createObjectQuery(filter);
try {
SearchResultList<PrismObject<UserType>> objects = this.modelService.searchObjects(UserType.class, query,(Collection) null, task, result);
Basically, I don't know how to build the filter. Any help would be appreciated.
Thanks,
STEVEN L ASHWILL
Software Engineer Coordinator
Administrative Information Technology Services
University of Illinois at Urbana-Champaign
50 Gerty Drive | M/C 673
Champaign, IL 61820
217.265.6337 | sashwill at uillinois.edu
www.aits.uillinois.edu
Under the Illinois Freedom of Information Act any written communication to or from university employees regarding university business is a public record and may be subject to public disclosure.
More information about the midPoint
mailing list