Skip to content

Commit

Permalink
Exchange HashMap with LinkedHashMap (odata v2) (#672)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas Israel <jonas.israel@sap.com>
  • Loading branch information
Jonas-Isr and Jonas Israel authored Dec 18, 2024
1 parent ee665be commit cace223
Show file tree
Hide file tree
Showing 193 changed files with 273 additions and 273 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ protected String getEntityCollection()
@Override
protected Map<String, Object> getKey()
{
final Map<String, Object> result = Maps.newHashMap();
final Map<String, Object> result = Maps.newLinkedHashMap();
result.put("Id", getId());
return result;
}
Expand All @@ -356,7 +356,7 @@ protected Map<String, Object> toMapOfFields()
@Override
protected void fromMap( final Map<String, Object> inputValues )
{
final Map<String, Object> cloudSdkValues = Maps.newHashMap(inputValues);
final Map<String, Object> cloudSdkValues = Maps.newLinkedHashMap(inputValues);
// simple properties
{
if( cloudSdkValues.containsKey("Id") ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class AddressByKeyFluentHelper extends FluentHelperByKey<AddressByKeyFluentHelper, Address, AddressSelectable>
{

private final Map<String, Object> key = Maps.newHashMap();
private final Map<String, Object> key = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will fetch a single
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ protected String getEntityCollection()
@Override
protected Map<String, Object> getKey()
{
final Map<String, Object> result = Maps.newHashMap();
final Map<String, Object> result = Maps.newLinkedHashMap();
result.put("Id", getId());
return result;
}
Expand All @@ -269,7 +269,7 @@ protected Map<String, Object> toMapOfFields()
@Override
protected void fromMap( final Map<String, Object> inputValues )
{
final Map<String, Object> cloudSdkValues = Maps.newHashMap(inputValues);
final Map<String, Object> cloudSdkValues = Maps.newLinkedHashMap(inputValues);
// simple properties
{
if( cloudSdkValues.containsKey("Id") ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class CustomerByKeyFluentHelper
FluentHelperByKey<CustomerByKeyFluentHelper, Customer, CustomerSelectable>
{

private final Map<String, Object> key = Maps.newHashMap();
private final Map<String, Object> key = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will fetch a single
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected String getEntityCollection()
@Override
protected Map<String, Object> getKey()
{
final Map<String, Object> result = Maps.newHashMap();
final Map<String, Object> result = Maps.newLinkedHashMap();
result.put("Id", getId());
return result;
}
Expand All @@ -152,7 +152,7 @@ protected Map<String, Object> toMapOfFields()
@Override
protected void fromMap( final Map<String, Object> inputValues )
{
final Map<String, Object> cloudSdkValues = Maps.newHashMap(inputValues);
final Map<String, Object> cloudSdkValues = Maps.newLinkedHashMap(inputValues);
// simple properties
{
if( cloudSdkValues.containsKey("Id") ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class FloorPlanByKeyFluentHelper
FluentHelperByKey<FloorPlanByKeyFluentHelper, FloorPlan, FloorPlanSelectable>
{

private final Map<String, Object> key = Maps.newHashMap();
private final Map<String, Object> key = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will fetch a single
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class GetProductQuantitiesFluentHelper
CollectionValuedFluentHelperFunction<GetProductQuantitiesFluentHelper, ProductCount, List<ProductCount>>
{

private final Map<String, Object> values = Maps.newHashMap();
private final Map<String, Object> values = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will execute the <b>GetProductQuantities</b> OData function import with the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public class IsStoreOpenFluentHelper extends SingleValuedFluentHelperFunction<IsStoreOpenFluentHelper, Boolean, Boolean>
{

private final Map<String, Object> values = Maps.newHashMap();
private final Map<String, Object> values = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will execute the <b>IsStoreOpen</b> OData function import with the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ protected String getEntityCollection()
@Override
protected Map<String, Object> getKey()
{
final Map<String, Object> result = Maps.newHashMap();
final Map<String, Object> result = Maps.newLinkedHashMap();
result.put("Id", getId());
return result;
}
Expand All @@ -233,7 +233,7 @@ protected Map<String, Object> toMapOfFields()
@Override
protected void fromMap( final Map<String, Object> inputValues )
{
final Map<String, Object> cloudSdkValues = Maps.newHashMap(inputValues);
final Map<String, Object> cloudSdkValues = Maps.newLinkedHashMap(inputValues);
// simple properties
{
if( cloudSdkValues.containsKey("Id") ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class OpeningHoursByKeyFluentHelper
FluentHelperByKey<OpeningHoursByKeyFluentHelper, OpeningHours, OpeningHoursSelectable>
{

private final Map<String, Object> key = Maps.newHashMap();
private final Map<String, Object> key = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will fetch a single
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class OrderProductFluentHelper
SingleValuedFluentHelperFunction<OrderProductFluentHelper, Receipt, Receipt>
{

private final Map<String, Object> values = Maps.newHashMap();
private final Map<String, Object> values = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will execute the <b>OrderProduct</b> OData function import with the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public class PrintReceiptFluentHelper extends SingleValuedFluentHelperFunction<PrintReceiptFluentHelper, String, String>
{

private final Map<String, Object> values = Maps.newHashMap();
private final Map<String, Object> values = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will execute the <b>PrintReceipt</b> OData function import with the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ protected String getEntityCollection()
@Override
protected Map<String, Object> getKey()
{
final Map<String, Object> result = Maps.newHashMap();
final Map<String, Object> result = Maps.newLinkedHashMap();
result.put("Id", getId());
return result;
}
Expand All @@ -330,7 +330,7 @@ protected Map<String, Object> toMapOfFields()
@Override
protected void fromMap( final Map<String, Object> inputValues )
{
final Map<String, Object> cloudSdkValues = Maps.newHashMap(inputValues);
final Map<String, Object> cloudSdkValues = Maps.newLinkedHashMap(inputValues);
// simple properties
{
if( cloudSdkValues.containsKey("Id") ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class ProductByKeyFluentHelper extends FluentHelperByKey<ProductByKeyFluentHelper, Product, ProductSelectable>
{

private final Map<String, Object> key = Maps.newHashMap();
private final Map<String, Object> key = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will fetch a single
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected Map<String, Object> toMapOfFields()
@Override
protected void fromMap( final Map<String, Object> inputValues )
{
final Map<String, Object> cloudSdkValues = Maps.newHashMap(inputValues);
final Map<String, Object> cloudSdkValues = Maps.newLinkedHashMap(inputValues);
// simple properties
{
if( cloudSdkValues.containsKey("ProductId") ) {
Expand Down Expand Up @@ -117,7 +117,7 @@ protected void fromMap( final Map<String, Object> inputValues )
@Override
protected Map<String, Object> getKey()
{
final Map<String, Object> result = Maps.newHashMap();
final Map<String, Object> result = Maps.newLinkedHashMap();
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ protected String getEntityCollection()
@Override
protected Map<String, Object> getKey()
{
final Map<String, Object> result = Maps.newHashMap();
final Map<String, Object> result = Maps.newLinkedHashMap();
result.put("Id", getId());
return result;
}
Expand Down Expand Up @@ -499,7 +499,7 @@ protected Map<String, Object> toMapOfFields()
@Override
protected void fromMap( final Map<String, Object> inputValues )
{
final Map<String, Object> cloudSdkValues = Maps.newHashMap(inputValues);
final Map<String, Object> cloudSdkValues = Maps.newLinkedHashMap(inputValues);
// simple properties
{
if( cloudSdkValues.containsKey("Id") ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class ReceiptByKeyFluentHelper extends FluentHelperByKey<ReceiptByKeyFluentHelper, Receipt, ReceiptSelectable>
{

private final Map<String, Object> key = Maps.newHashMap();
private final Map<String, Object> key = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will fetch a single
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class RevokeReceiptFluentHelper
SingleValuedFluentHelperFunction<RevokeReceiptFluentHelper, String, String>
{

private final Map<String, Object> values = Maps.newHashMap();
private final Map<String, Object> values = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will execute the <b>RevokeReceipt</b> OData function import with the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ protected String getEntityCollection()
@Override
protected Map<String, Object> getKey()
{
final Map<String, Object> result = Maps.newHashMap();
final Map<String, Object> result = Maps.newLinkedHashMap();
result.put("Id", getId());
return result;
}
Expand All @@ -192,7 +192,7 @@ protected Map<String, Object> toMapOfFields()
@Override
protected void fromMap( final Map<String, Object> inputValues )
{
final Map<String, Object> cloudSdkValues = Maps.newHashMap(inputValues);
final Map<String, Object> cloudSdkValues = Maps.newLinkedHashMap(inputValues);
// simple properties
{
if( cloudSdkValues.containsKey("Id") ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class ShelfByKeyFluentHelper extends FluentHelperByKey<ShelfByKeyFluentHelper, Shelf, ShelfSelectable>
{

private final Map<String, Object> key = Maps.newHashMap();
private final Map<String, Object> key = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will fetch a single
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ protected String getEntityCollection()
@Override
protected Map<String, Object> getKey()
{
final Map<String, Object> result = Maps.newHashMap();
final Map<String, Object> result = Maps.newLinkedHashMap();
result.put("Id", getId());
return result;
}
Expand All @@ -208,7 +208,7 @@ protected Map<String, Object> toMapOfFields()
@Override
protected void fromMap( final Map<String, Object> inputValues )
{
final Map<String, Object> cloudSdkValues = Maps.newHashMap(inputValues);
final Map<String, Object> cloudSdkValues = Maps.newLinkedHashMap(inputValues);
// simple properties
{
if( cloudSdkValues.containsKey("Id") ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class VendorByKeyFluentHelper extends FluentHelperByKey<VendorByKeyFluentHelper, Vendor, VendorSelectable>
{

private final Map<String, Object> key = Maps.newHashMap();
private final Map<String, Object> key = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will fetch a single
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ JDefinedClass generateEntityByKeyFluentHelperClass(
JMod.PRIVATE | JMod.FINAL,
keyClass,
"key",
codeModel.ref(Maps.class).staticInvoke("newHashMap"));
codeModel.ref(Maps.class).staticInvoke("newLinkedHashMap"));

// constructor with service path and entity collection parameter
final JMethod constructor =
Expand Down Expand Up @@ -298,7 +298,7 @@ JDefinedClass generateFunctionImportFluentHelperClass(
JMod.PRIVATE | JMod.FINAL,
codeModel.ref(Map.class).narrow(String.class, Object.class),
"values",
codeModel.ref(Maps.class).staticInvoke("newHashMap"));
codeModel.ref(Maps.class).staticInvoke("newLinkedHashMap"));

createGetEntityClass(functionImportFluentHelperClass, returnTypeClass);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ private void createMemberAllFields( final JDefinedClass entityClass, final JDefi
JMod.FINAL,
fieldMapClass,
CommonConstants.INLINE_MAP_NAME,
codeModel.ref(Maps.class).staticInvoke("newHashMap").arg(inputValues));
codeModel.ref(Maps.class).staticInvoke("newLinkedHashMap").arg(inputValues));

body.block().directStatement("// simple properties");
final JBlock simplePropertiesBlock = new JBlock(true, true);
Expand Down Expand Up @@ -600,7 +600,7 @@ private void processClassField(
getKeyMethod.annotate(Override.class);
final JBlock body = getKeyMethod.body();
final JVar v =
body.decl(JMod.FINAL, fieldMapClass, "result", codeModel.ref(Maps.class).staticInvoke("newHashMap"));
body.decl(JMod.FINAL, fieldMapClass, "result", codeModel.ref(Maps.class).staticInvoke("newLinkedHashMap"));
for( final Map.Entry<String, EntityPropertyModel> entry : entityClassFields.entrySet() ) {
if( entry.getValue().isKeyField() ) {
final String javaFieldName = entry.getValue().getJavaFieldName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected String getEntityCollection() {
@Nonnull
@Override
protected Map<String, Object> getKey() {
final Map<String, Object> result = Maps.newHashMap();
final Map<String, Object> result = Maps.newLinkedHashMap();
result.put("Code", getCode());
return result;
}
Expand All @@ -106,7 +106,7 @@ protected Map<String, Object> toMapOfFields() {

@Override
protected void fromMap(final Map<String, Object> inputValues) {
final Map<String, Object> cloudSdkValues = Maps.newHashMap(inputValues);
final Map<String, Object> cloudSdkValues = Maps.newLinkedHashMap(inputValues);
// simple properties
{
if (cloudSdkValues.containsKey("Code")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class BPByKeyFluentHelper
extends FluentHelperByKey<BPByKeyFluentHelper, BP, BPSelectable>
{

private final Map<String, Object> key = Maps.newHashMap();
private final Map<String, Object> key = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will fetch a single {@link testcomparison.namespaces.functionimportnameclash.BP BP} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class BPByKeyFluentHelper_2
extends SingleValuedFluentHelperFunction<BPByKeyFluentHelper_2, String, String>
{

private final Map<String, Object> values = Maps.newHashMap();
private final Map<String, Object> values = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will execute the <b>BPByKey</b> OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class BPCreateFluentHelper_2
extends SingleValuedFluentHelperFunction<BPCreateFluentHelper_2, String, String>
{

private final Map<String, Object> values = Maps.newHashMap();
private final Map<String, Object> values = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will execute the <b>BPCreate</b> OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class BPDeleteFluentHelper_2
extends SingleValuedFluentHelperFunction<BPDeleteFluentHelper_2, String, String>
{

private final Map<String, Object> values = Maps.newHashMap();
private final Map<String, Object> values = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will execute the <b>BPDelete</b> OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class BPUpdateFluentHelper_2
extends SingleValuedFluentHelperFunction<BPUpdateFluentHelper_2, String, String>
{

private final Map<String, Object> values = Maps.newHashMap();
private final Map<String, Object> values = Maps.newLinkedHashMap();

/**
* Creates a fluent helper object that will execute the <b>BPUpdate</b> OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ protected String getEntityCollection() {
@Nonnull
@Override
protected Map<String, Object> getKey() {
final Map<String, Object> result = Maps.newHashMap();
final Map<String, Object> result = Maps.newLinkedHashMap();
result.put("Id", getId());
return result;
}
Expand All @@ -316,7 +316,7 @@ protected Map<String, Object> toMapOfFields() {

@Override
protected void fromMap(final Map<String, Object> inputValues) {
final Map<String, Object> cloudSdkValues = Maps.newHashMap(inputValues);
final Map<String, Object> cloudSdkValues = Maps.newLinkedHashMap(inputValues);
// simple properties
{
if (cloudSdkValues.containsKey("Id")) {
Expand Down
Loading

0 comments on commit cace223

Please sign in to comment.