@@ -192,7 +192,7 @@ public void testEntityWithParent() {
192192 .kind ("Task" )
193193 .newKey ("sampleTask" );
194194 Entity task = Entity .builder (taskKey )
195- .set ("type " , "Personal" )
195+ .set ("category " , "Personal" )
196196 .set ("done" , false )
197197 .set ("priority" , 4 )
198198 .set ("description" , "Learn Cloud Datastore" )
@@ -205,7 +205,7 @@ public void testEntityWithParent() {
205205 public void testProperties () {
206206 // [START properties]
207207 Entity task = Entity .builder (taskKey )
208- .set ("type " , "Personal" )
208+ .set ("category " , "Personal" )
209209 .set ("created" , DateTime .now ())
210210 .set ("done" , false )
211211 .set ("priority" , 4 )
@@ -232,7 +232,7 @@ public void testArrayValue() {
232232 public void testBasicEntity () {
233233 // [START basic_entity]
234234 Entity task = Entity .builder (taskKey )
235- .set ("type " , "Personal" )
235+ .set ("category " , "Personal" )
236236 .set ("done" , false )
237237 .set ("priority" , 4 )
238238 .set ("description" , "Learn Cloud Datastore" )
@@ -288,13 +288,13 @@ public void testDelete() {
288288
289289 private List <Entity > setUpBatchTests (Key taskKey1 , Key taskKey2 ) {
290290 Entity task1 = Entity .builder (taskKey1 )
291- .set ("type " , "Personal" )
291+ .set ("category " , "Personal" )
292292 .set ("done" , false )
293293 .set ("priority" , 4 )
294294 .set ("description" , "Learn Cloud Datastore" )
295295 .build ();
296296 Entity task2 = Entity .builder (taskKey2 )
297- .set ("type " , "Personal" )
297+ .set ("category " , "Personal" )
298298 .set ("done" , false )
299299 .set ("priority" , 5 )
300300 .set ("description" , "Integrate Cloud Datastore" )
@@ -307,13 +307,13 @@ private List<Entity> setUpBatchTests(Key taskKey1, Key taskKey2) {
307307 public void testBatchUpsert () {
308308 // [START batch_upsert]
309309 FullEntity <IncompleteKey > task1 = FullEntity .builder (keyFactory .newKey ())
310- .set ("type " , "Personal" )
310+ .set ("category " , "Personal" )
311311 .set ("done" , false )
312312 .set ("priority" , 4 )
313313 .set ("description" , "Learn Cloud Datastore" )
314314 .build ();
315315 FullEntity <IncompleteKey > task2 = Entity .builder (keyFactory .newKey ())
316- .set ("type " , "Personal" )
316+ .set ("category " , "Personal" )
317317 .set ("done" , false )
318318 .set ("priority" , 5 )
319319 .set ("description" , "Integrate Cloud Datastore" )
@@ -356,7 +356,7 @@ private void setUpQueryTests() {
356356 .ancestors (PathElement .of ("TaskList" , "default" ))
357357 .newKey ("someTask" );
358358 datastore .put (Entity .builder (taskKey )
359- .set ("type " , "Personal" )
359+ .set ("category " , "Personal" )
360360 .set ("done" , false )
361361 .set ("completed" , false )
362362 .set ("priority" , 4 )
@@ -555,9 +555,9 @@ public void testDistinctQuery() {
555555 // [START distinct_query]
556556 Query <ProjectionEntity > query = Query .projectionEntityQueryBuilder ()
557557 .kind ("Task" )
558- .projection ("type " , "priority" )
559- .distinctOn ("type " , "priority" )
560- .orderBy (OrderBy .asc ("type " ), OrderBy .asc ("priority" ))
558+ .projection ("category " , "priority" )
559+ .distinctOn ("category " , "priority" )
560+ .orderBy (OrderBy .asc ("category " ), OrderBy .asc ("priority" ))
561561 .build ();
562562 // [END distinct_query]
563563 assertValidQuery (query );
@@ -569,9 +569,9 @@ public void testDistinctOnQuery() {
569569 // [START distinct_on_query]
570570 Query <ProjectionEntity > query = Query .projectionEntityQueryBuilder ()
571571 .kind ("Task" )
572- .projection ("type " , "priority" )
573- .distinctOn ("type " )
574- .orderBy (OrderBy .asc ("type " ), OrderBy .asc ("priority" ))
572+ .projection ("category " , "priority" )
573+ .distinctOn ("category " )
574+ .orderBy (OrderBy .asc ("category " ), OrderBy .asc ("priority" ))
575575 .build ();
576576 // [END distinct_on_query]
577577 assertValidQuery (query );
@@ -923,7 +923,7 @@ public void testPropertyRunQuery() {
923923 }
924924 // [END property_run_query]
925925 Map <String , ImmutableSet <String >> expected = ImmutableMap .of ("Task" , ImmutableSet .of (
926- "done" , "type " , "done" , "completed" , "priority" , "created" , "percent_complete" , "tag" ));
926+ "done" , "category " , "done" , "completed" , "priority" , "created" , "percent_complete" , "tag" ));
927927 assertEquals (expected , propertiesByKind );
928928 }
929929
@@ -953,7 +953,7 @@ public void testPropertyByKindRunQuery() {
953953 }
954954 // [END property_by_kind_run_query]
955955 Map <String , Collection <String >> expected = ImmutableMap .<String , Collection <String >>builder ()
956- .put ("type " , Collections .singleton ("STRING" ))
956+ .put ("category " , Collections .singleton ("STRING" ))
957957 .put ("done" , Collections .singleton ("BOOLEAN" ))
958958 .put ("completed" , Collections .singleton ("BOOLEAN" ))
959959 .put ("priority" , Collections .singleton ("INT64" ))
@@ -991,7 +991,7 @@ public void testPropertyFilteringRunQuery() {
991991 }
992992 // [END property_filtering_run_query]
993993 Map <String , ImmutableSet <String >> expected =
994- ImmutableMap .of ("Task" , ImmutableSet .of ("priority" , "tag" , "type " ));
994+ ImmutableMap .of ("Task" , ImmutableSet .of ("priority" , "tag" , "category " ));
995995 assertEquals (expected , propertiesByKind );
996996 }
997997
0 commit comments