[OLINGO-713] Minor turorial fix

This commit is contained in:
Michael Bolz 2015-09-17 11:32:14 +02:00
parent f52404f29b
commit f855f64764
6 changed files with 14 additions and 14 deletions

View File

@ -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;

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}