From f855f647646a0360b6391f21b651d87b24f29adc Mon Sep 17 00:00:00 2001 From: Michael Bolz Date: Thu, 17 Sep 2015 11:32:14 +0200 Subject: [PATCH] [OLINGO-713] Minor turorial fix --- .../src/main/java/myservice/mynamespace/data/Storage.java | 4 ++-- .../src/main/java/myservice/mynamespace/data/Storage.java | 4 ++-- .../src/main/java/myservice/mynamespace/data/Storage.java | 8 ++++---- .../src/main/java/myservice/mynamespace/data/Storage.java | 4 ++-- .../src/main/java/myservice/mynamespace/data/Storage.java | 4 ++-- .../src/main/java/myservice/mynamespace/data/Storage.java | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/samples/tutorials/p0_all/src/main/java/myservice/mynamespace/data/Storage.java b/samples/tutorials/p0_all/src/main/java/myservice/mynamespace/data/Storage.java index 5a41ee9cd..208bc538d 100644 --- a/samples/tutorials/p0_all/src/main/java/myservice/mynamespace/data/Storage.java +++ b/samples/tutorials/p0_all/src/main/java/myservice/mynamespace/data/Storage.java @@ -280,12 +280,12 @@ public class Storage { Property idProperty = entity.getProperty("ID"); if (idProperty != null) { - idProperty.setValue(ValueType.PRIMITIVE, new Integer(newId)); + idProperty.setValue(ValueType.PRIMITIVE, Integer.valueOf(newId)); } else { // as of OData v4 spec, the key property can be omitted from the POST request body entity.getProperties().add(new Property(null, "ID", ValueType.PRIMITIVE, newId)); } - + entity.setId(createId(entity, "ID")); this.productList.add(entity); return entity; diff --git a/samples/tutorials/p2_readep/src/main/java/myservice/mynamespace/data/Storage.java b/samples/tutorials/p2_readep/src/main/java/myservice/mynamespace/data/Storage.java index a8374b491..b3a7d1ccd 100755 --- a/samples/tutorials/p2_readep/src/main/java/myservice/mynamespace/data/Storage.java +++ b/samples/tutorials/p2_readep/src/main/java/myservice/mynamespace/data/Storage.java @@ -122,7 +122,7 @@ public class Storage { .addProperty(new Property(null, "Name", ValueType.PRIMITIVE, "1UMTS PDA")) .addProperty(new Property(null, "Description", ValueType.PRIMITIVE, "Ultrafast 3G UMTS/HSDPA Pocket PC, supports GSM network")); - e2.setId(createId("Products", 1)); + e2.setId(createId("Products", 2)); productList.add(e2); final Entity e3 = new Entity() @@ -130,7 +130,7 @@ public class Storage { .addProperty(new Property(null, "Name", ValueType.PRIMITIVE, "Ergo Screen")) .addProperty(new Property(null, "Description", ValueType.PRIMITIVE, "19 Optimum Resolution 1024 x 768 @ 85Hz, resolution 1280 x 960")); - e3.setId(createId("Products", 1)); + e3.setId(createId("Products", 3)); productList.add(e3); } diff --git a/samples/tutorials/p3_write/src/main/java/myservice/mynamespace/data/Storage.java b/samples/tutorials/p3_write/src/main/java/myservice/mynamespace/data/Storage.java index e078462cc..dcc8b46c8 100755 --- a/samples/tutorials/p3_write/src/main/java/myservice/mynamespace/data/Storage.java +++ b/samples/tutorials/p3_write/src/main/java/myservice/mynamespace/data/Storage.java @@ -151,12 +151,12 @@ public class Storage { Property idProperty = entity.getProperty("ID"); if (idProperty != null) { - idProperty.setValue(ValueType.PRIMITIVE, new Integer(newId)); + idProperty.setValue(ValueType.PRIMITIVE, Integer.valueOf(newId)); } else { // as of OData v4 spec, the key property can be omitted from the POST request body entity.getProperties().add(new Property(null, "ID", ValueType.PRIMITIVE, newId)); } - + entity.setId(createId("Products", newId)); this.productList.add(entity); return entity; @@ -254,7 +254,7 @@ public class Storage { .addProperty(new Property(null, "Name", ValueType.PRIMITIVE, "1UMTS PDA")) .addProperty(new Property(null, "Description", ValueType.PRIMITIVE, "Ultrafast 3G UMTS/HSDPA Pocket PC, supports GSM network")); - e2.setId(createId("Products", 1)); + e2.setId(createId("Products", 2)); productList.add(e2); final Entity e3 = new Entity() @@ -262,7 +262,7 @@ public class Storage { .addProperty(new Property(null, "Name", ValueType.PRIMITIVE, "Ergo Screen")) .addProperty(new Property(null, "Description", ValueType.PRIMITIVE, "19 Optimum Resolution 1024 x 768 @ 85Hz, resolution 1280 x 960")); - e3.setId(createId("Products", 1)); + e3.setId(createId("Products", 3)); productList.add(e3); } diff --git a/samples/tutorials/p5_queryoptions-tcs/src/main/java/myservice/mynamespace/data/Storage.java b/samples/tutorials/p5_queryoptions-tcs/src/main/java/myservice/mynamespace/data/Storage.java index 794940cd6..a7b3a5fa1 100755 --- a/samples/tutorials/p5_queryoptions-tcs/src/main/java/myservice/mynamespace/data/Storage.java +++ b/samples/tutorials/p5_queryoptions-tcs/src/main/java/myservice/mynamespace/data/Storage.java @@ -124,7 +124,7 @@ public class Storage { .addProperty(new Property(null, "Name", ValueType.PRIMITIVE, "1UMTS PDA")) .addProperty(new Property(null, "Description", ValueType.PRIMITIVE, "Ultrafast 3G UMTS/HSDPA Pocket PC, supports GSM network")); - e2.setId(createId("Products", 1)); + e2.setId(createId("Products", 2)); productList.add(e2); final Entity e3 = new Entity() @@ -132,7 +132,7 @@ public class Storage { .addProperty(new Property(null, "Name", ValueType.PRIMITIVE, "Ergo Screen")) .addProperty(new Property(null, "Description", ValueType.PRIMITIVE, "19 Optimum Resolution 1024 x 768 @ 85Hz, resolution 1280 x 960")); - e3.setId(createId("Products", 1)); + e3.setId(createId("Products", 3)); productList.add(e3); } diff --git a/samples/tutorials/p7_queryoptions-o/src/main/java/myservice/mynamespace/data/Storage.java b/samples/tutorials/p7_queryoptions-o/src/main/java/myservice/mynamespace/data/Storage.java index a8374b491..b3a7d1ccd 100644 --- a/samples/tutorials/p7_queryoptions-o/src/main/java/myservice/mynamespace/data/Storage.java +++ b/samples/tutorials/p7_queryoptions-o/src/main/java/myservice/mynamespace/data/Storage.java @@ -122,7 +122,7 @@ public class Storage { .addProperty(new Property(null, "Name", ValueType.PRIMITIVE, "1UMTS PDA")) .addProperty(new Property(null, "Description", ValueType.PRIMITIVE, "Ultrafast 3G UMTS/HSDPA Pocket PC, supports GSM network")); - e2.setId(createId("Products", 1)); + e2.setId(createId("Products", 2)); productList.add(e2); final Entity e3 = new Entity() @@ -130,7 +130,7 @@ public class Storage { .addProperty(new Property(null, "Name", ValueType.PRIMITIVE, "Ergo Screen")) .addProperty(new Property(null, "Description", ValueType.PRIMITIVE, "19 Optimum Resolution 1024 x 768 @ 85Hz, resolution 1280 x 960")); - e3.setId(createId("Products", 1)); + e3.setId(createId("Products", 3)); productList.add(e3); } diff --git a/samples/tutorials/p8_queryoptions-f/src/main/java/myservice/mynamespace/data/Storage.java b/samples/tutorials/p8_queryoptions-f/src/main/java/myservice/mynamespace/data/Storage.java index a8374b491..b3a7d1ccd 100644 --- a/samples/tutorials/p8_queryoptions-f/src/main/java/myservice/mynamespace/data/Storage.java +++ b/samples/tutorials/p8_queryoptions-f/src/main/java/myservice/mynamespace/data/Storage.java @@ -122,7 +122,7 @@ public class Storage { .addProperty(new Property(null, "Name", ValueType.PRIMITIVE, "1UMTS PDA")) .addProperty(new Property(null, "Description", ValueType.PRIMITIVE, "Ultrafast 3G UMTS/HSDPA Pocket PC, supports GSM network")); - e2.setId(createId("Products", 1)); + e2.setId(createId("Products", 2)); productList.add(e2); final Entity e3 = new Entity() @@ -130,7 +130,7 @@ public class Storage { .addProperty(new Property(null, "Name", ValueType.PRIMITIVE, "Ergo Screen")) .addProperty(new Property(null, "Description", ValueType.PRIMITIVE, "19 Optimum Resolution 1024 x 768 @ 85Hz, resolution 1280 x 960")); - e3.setId(createId("Products", 1)); + e3.setId(createId("Products", 3)); productList.add(e3); }