@@ -911,12 +911,12 @@ public void testPropertyRunQuery() {
911
911
setUpQueryTests ();
912
912
// [START property_run_query]
913
913
Query <Key > query = Query .keyQueryBuilder ().kind ("__property__" ).build ();
914
- QueryResults <Key > results = datastore .run (query );
914
+ QueryResults <Key > keys = datastore .run (query );
915
915
Map <String , Collection <String >> propertiesByKind = new HashMap <>();
916
- while (results .hasNext ()) {
917
- Key property = results .next ();
918
- String kind = property .parent ().name ();
919
- String propertyName = property .name ();
916
+ while (keys .hasNext ()) {
917
+ Key key = keys .next ();
918
+ String kind = key .parent ().name ();
919
+ String propertyName = key .name ();
920
920
Collection <String > properties = propertiesByKind .get (kind );
921
921
if (properties == null ) {
922
922
properties = new HashSet <>();
@@ -942,9 +942,9 @@ public void testPropertyByKindRunQuery() {
942
942
QueryResults <Entity > results = datastore .run (query );
943
943
Map <String , Collection <String >> representationsByProperty = new HashMap <>();
944
944
while (results .hasNext ()) {
945
- Entity property = results .next ();
946
- String propertyName = property .key ().name ();
947
- List <StringValue > representations = property .getList ("property_representation" );
945
+ Entity result = results .next ();
946
+ String propertyName = result .key ().name ();
947
+ List <StringValue > representations = result .getList ("property_representation" );
948
948
Collection <String > currentRepresentations = representationsByProperty .get (propertyName );
949
949
if (currentRepresentations == null ) {
950
950
currentRepresentations = new HashSet <>();
@@ -971,20 +971,20 @@ public void testPropertyByKindRunQuery() {
971
971
public void testPropertyFilteringRunQuery () {
972
972
setUpQueryTests ();
973
973
// [START property_filtering_run_query]
974
- Key key = datastore .newKeyFactory ()
974
+ Key startKey = datastore .newKeyFactory ()
975
975
.kind ("__property__" )
976
976
.ancestors (PathElement .of ("__kind__" , "Task" ))
977
977
.newKey ("priority" );
978
978
Query <Key > query = Query .keyQueryBuilder ()
979
979
.kind ("__property__" )
980
- .filter (PropertyFilter .ge ("__key__" , key ))
980
+ .filter (PropertyFilter .ge ("__key__" , startKey ))
981
981
.build ();
982
982
Map <String , Collection <String >> propertiesByKind = new HashMap <>();
983
- QueryResults <Key > results = datastore .run (query );
984
- while (results .hasNext ()) {
985
- Key property = results .next ();
986
- String kind = property .parent ().name ();
987
- String propertyName = property .name ();
983
+ QueryResults <Key > keys = datastore .run (query );
984
+ while (keys .hasNext ()) {
985
+ Key key = keys .next ();
986
+ String kind = key .parent ().name ();
987
+ String propertyName = key .name ();
988
988
Collection <String > properties = propertiesByKind .get (kind );
989
989
if (properties == null ) {
990
990
properties = new HashSet <String >();
0 commit comments