use of io.jans.orm.sql.model.SimpleGroup in project jans by JanssenProject.
the class SqlSimpleGroupSample method main.
public static void main(String[] args) {
// Prepare sample connection details
SqlEntryManagerSample sqlEntryManagerSample = new SqlEntryManagerSample();
// Create SQL entry manager
SqlEntryManager sqlEntryManager = sqlEntryManagerSample.createSqlEntryManager();
String personDN = "inum=ae8c7ff9-def7-4b42-8147-de8380617a37,ou=people,o=gluu";
Filter ownerFilter = Filter.createEqualityFilter("owner", personDN);
Filter memberFilter = Filter.createEqualityFilter("member", personDN);
Filter searchFilter = Filter.createORFilter(ownerFilter, memberFilter);
List<SimpleGroup> result = sqlEntryManager.findEntries("ou=groups,o=gluu", SimpleGroup.class, searchFilter, 1);
System.out.println(result);
}
Aggregations