code: private boolean isProperJoin(StorableProperty<?> property)
          throws SupportException, RepositoryException
      {
          if (!property.isJoin() || property.isQuery()) {
              return false;
          }
  
          // Make up a filter over the join's internal properties and then search
          // for an index that filters with no remainder.
          Filter<?> filter = Filter.getOpenFilter(property.getEnclosingType());
          int count = property.getJoinElementCount();
          for (int i=0; i<count; i++) {
              filter = filter.and(property.getInternalJoinElement(i).getName(), RelOp.EQ);
          }
  
          // Java generics are letting me down. I cannot use proper specification
          // because compiler gets confused with all the wildcards.
          Collection indexes = indexesFor(filter.getStorableType());
  
          if (indexes != null) {
              for (Object index : indexes) {
                  FilteringScore score = FilteringScore.evaluate((StorableIndex) index, filter);
                  if (score.getRemainderCount() == 0) {
                      return true;
                  }
              }
          }
  
          return false;
      }
docs: Checks if the property is a join and its internal properties are fully
  indexed.