Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0047610
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POStrivialhave not tried2021-08-31 14:542021-09-01 11:14
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in VersionRR21Q4
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0047610: Simplify HQLProperty API adding convenient factory methods

DescriptionThe Java API to extend masterdata models [1] is quite verbose:

    return Arrays.asList(
            new HQLProperty("product.weight", "weight"), 
            new HQLProperty("product.taxCategory.name", "taxcategoryname"));


It could be simplified using static factory methods similar to JDK's Map.ofEntries [2] and Map.entry [3]. To something like:

    import static org.openbravo.mobile.core.model.HQLProperty.property;
    ...

    return HQLProperty.listOfProperties(
            property("product.weight", "weight"), 
            property("product.taxCategory.name", "taxcategoryname"));



[1] http://wiki.openbravo.com/wiki/How_to_Extend_Models [^]
[2] https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html#ofEntries(java.util.Map.Entry...) [^]
[3] https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html#entry(K,V) [^]
Steps To Reproduce-
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0131469)
hgbot (developer)
2021-09-01 08:03

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/280 [^]
(0131470)
hgbot (developer)
2021-09-01 11:14

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/280 [^]
(0131471)
hgbot (developer)
2021-09-01 11:14

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: d66fff024b592ab6a4442ea216f5f05e1cd85251
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-09-01T08:02:17+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/d66fff024b592ab6a4442ea216f5f05e1cd85251 [^]

fixed FR-47610: simplify HQLProperty API adding convenient factory methods

Adds property(String hqlProperty, String jsonName) for the most common
constructor and listOfProperties(HQLProperty... properties) to be used
from ModelExtension.getHQLProperties.

---
M src/org/openbravo/mobile/core/model/HQLProperty.java
---

- Issue History
Date Modified Username Field Change
2021-08-31 14:54 alostale New Issue
2021-08-31 14:54 alostale Assigned To => Retail
2021-08-31 14:54 alostale Triggers an Emergency Pack => No
2021-09-01 08:03 hgbot Note Added: 0131469
2021-09-01 11:14 hgbot Resolution open => fixed
2021-09-01 11:14 hgbot Status new => closed
2021-09-01 11:14 hgbot Note Added: 0131470
2021-09-01 11:14 hgbot Fixed in Version => RR21Q4
2021-09-01 11:14 hgbot Note Added: 0131471
2021-09-01 11:14 alostale Assigned To Retail => alostale


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker