private <C1 extends ConfigurationClient>List<ManagedObject<? extends C1>> findReferences(ManagementContext context,AbstractManagedObjectDefinition<C1,?> mod,String name) throws LdapException {
  List<ManagedObject<? extends C1>> instances=findInstances(context,mod);
  Iterator<ManagedObject<? extends C1>> i=instances.iterator();
  while (i.hasNext()) {
    ManagedObject<? extends C1> mo=i.next();
    boolean hasReference=false;
    for (    String value : mo.getPropertyValues(AggregationPropertyDefinition.this)) {
      if (compare(value,name) == 0) {
        hasReference=true;
        break;
      }
    }
    if (!hasReference) {
      i.remove();
    }
  }
  return instances;
}

private < C1 extends ConfigurationClient > List < ManagedObject < ? extends C1 > > findReferences ( ManagementContext context , AbstractManagedObjectDefinition < C1 , ? > mod , String name ) throws LdapException { List < ManagedObject < ? extends C1 > > instances = findInstances ( context , mod ) ; Iterator < ManagedObject < ? extends C1 > > i = instances . iterator ( ) ; while ( i . hasNext ( ) ) { ManagedObject < ? extends C1 > mo = i . next ( ) ; boolean hasReference = false ; for ( String value : mo . getPropertyValues ( AggregationPropertyDefinition . this ) ) { if ( compare ( value , name ) == 0 ) { hasReference = true ; break ; } } if ( ! hasReference ) { i . remove ( ) ; } } return instances ; }
find all managed objects which reference the named managed object using this property .
