@@ -1045,7 +1045,6 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
1045
1045
sb . AppendFormat ( @"import {0}.serializer.ISerializer;
1046
1046
import {0}.serializer.IJsonBackedObject;
1047
1047
import {0}.serializer.AdditionalDataManager;
1048
- import java.util.Arrays;
1049
1048
import java.util.EnumSet;" , host . CurrentModel . GetNamespace ( ) . AddPrefix ( ) ) ;
1050
1049
1051
1050
sb . Append ( "\n " ) ;
@@ -1129,18 +1128,6 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
1129
1128
if ( property . Type is OdcmPrimitiveType )
1130
1129
continue ;
1131
1130
1132
- var propertyType = TypeCollectionResponse ( property ) ;
1133
- string importstr = String . Format ( importFormat ,
1134
- property . Projection . Type . Namespace . Name . AddPrefix ( ) ,
1135
- GetPrefixForRequests ( ) ,
1136
- propertyType ) ;
1137
- if ( ! uniqueStore . ContainsKey ( importstr ) )
1138
- {
1139
- uniqueStore . Add ( importstr , 0 ) ;
1140
- sb . Append ( importstr ) ;
1141
- sb . Append ( "\n " ) ;
1142
- }
1143
-
1144
1131
string propertyValue = TypeCollectionPage ( property ) ;
1145
1132
string importstr1 = String . Format ( importFormat ,
1146
1133
property . Projection . Type . Namespace . Name . AddPrefix ( ) ,
@@ -1354,25 +1341,11 @@ public static string UpdatePropertiesWithinSetRawObject(IEnumerable<OdcmProperty
1354
1341
sb . AppendFormat (
1355
1342
@"
1356
1343
if (json.has(""{0}"")) {{
1357
- final {1} response = new {1}();
1358
- if (json.has(""{0}@odata.nextLink"")) {{
1359
- response.nextLink = json.get(""{0}@odata.nextLink"").getAsString();
1360
- }}
1361
-
1362
- final JsonObject[] sourceArray = serializer.deserializeObject(json.get(""{0}"").toString(), JsonObject[].class);
1363
- final {3}[] array = new {3}[sourceArray.length];
1364
- for (int i = 0; i < sourceArray.length; i++) {{
1365
- array[i] = serializer.deserializeObject(sourceArray[i].toString(), {3}.class);
1366
- array[i].setRawObject(serializer, sourceArray[i]);
1367
- }}
1368
- response.value = Arrays.asList(array);
1369
- {0} = new {2}(response, null);
1344
+ {0} = serializer.deserializeObject(json.get(""{0}"").toString(), {1}.class);
1370
1345
}}
1371
1346
" ,
1372
1347
property . Name . SanitizePropertyName ( property ) ,
1373
- TypeCollectionResponse ( property ) ,
1374
- TypeCollectionPage ( property ) ,
1375
- property . GetTypeString ( ) ) ;
1348
+ TypeCollectionPage ( property ) ) ;
1376
1349
}
1377
1350
}
1378
1351
sb . Append ( " }" ) ;
0 commit comments