// now add the control with visibility set to true where all entries
// except subentries disappear
LdapApiService codec = LdapApiServiceFactory.getSingleton();
SubentriesDecorator decorator = new SubentriesDecorator( codec );
Subentries ctl = ( Subentries ) decorator.getDecorated();
ctl.setVisibility( true );
decorator.getValue();
sysRoot.setRequestControls( JndiUtils.toJndiControls(codec, new Control[]
{ctl}) );
list = sysRoot.search( "", "(objectClass=*)", searchControls );
SearchResult result = list.next();