public Map<Object,SpaceDocument> readDocumentsByKeys(SpaceDocumentColumnFamilyMapper mapper,String typeName,Object[] keyValues){
  Map<Object,SpaceDocument> result=Collections.emptyMap();
  ColumnFamilyMetadata metadata=metadataCache.getColumnFamilyMetadata(typeName);
  if (metadata == null) {
    metadata=fetchColumnFamilyMetadata(typeName,mapper);
    if (metadata == null) {
      return result;
    }
  }
  ColumnFamilyTemplate<Object,String> template=getTemplate(metadata);
  SpaceDocumentMapper hectorMapper=getMapperTemplate(metadata,mapper);
  MappedColumnFamilyResult<Object,String,SpaceDocument> queryResult=template.queryColumns(Arrays.asList(keyValues),hectorMapper);
  for (int i=0; i < keyValues.length; i++) {
    if (queryResult.hasResults()) {
      if (result.isEmpty()) {
        result=new HashMap<Object,SpaceDocument>();
      }
      result.put(queryResult.getKey(),queryResult.getRow());
    }
    if (i < keyValues.length - 1) {
      queryResult.next();
    }
  }
  return result;
}

public Map < Object , SpaceDocument > readDocumentsByKeys ( SpaceDocumentColumnFamilyMapper mapper , String typeName , Object [ ] keyValues ) { Map < Object , SpaceDocument > result = Collections . emptyMap ( ) ; ColumnFamilyMetadata metadata = metadataCache . getColumnFamilyMetadata ( typeName ) ; if ( metadata == null ) { metadata = fetchColumnFamilyMetadata ( typeName , mapper ) ; if ( metadata == null ) { return result ; } } ColumnFamilyTemplate < Object , String > template = getTemplate ( metadata ) ; SpaceDocumentMapper hectorMapper = getMapperTemplate ( metadata , mapper ) ; MappedColumnFamilyResult < Object , String , SpaceDocument > queryResult = template . queryColumns ( Arrays . asList ( keyValues ) , hectorMapper ) ; for ( int i = 0 ; i < keyValues . length ; i ++ ) { if ( queryResult . hasResults ( ) ) { if ( result . isEmpty ( ) ) { result = new HashMap < Object , SpaceDocument > ( ) ; } result . put ( queryResult . getKey ( ) , queryResult . getRow ( ) ) ; } if ( i < keyValues . length - 1 ) { queryResult . next ( ) ; } } return result ; }
reads the entries matching the typename and key values from the matching column family .
