4

I am working with JAVA + Olingo Odata v4 library and I was wondering if there is an easier way to "generate" entity types / entities / entitysets using annotations as it used to be the case as in v2 of the same library.

In my opinion manually "binding" entities several times (for the metadata as definition, for the set and for the separate entity as values ) is kinda strange and "not modernistic".

Maybe I am missing the point of it all, so I would be glad to read some opinions that will open my eyes.

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
Alex
  • 389
  • 1
  • 2
  • 14
  • I have a project where first I've generated Java entities with JPA tools. After I've used Olingo for creating a read service. In Olingo 4 you can make the [same](https://olingo.apache.org/doc/odata4/tutorials/readep/tutorial_readep.html) . I don't know if you want that. Could you give a better explanation? – Cesar Miguel May 22 '17 at 15:28
  • 1
    CsdlProperty id = new CsdlProperty().setName("ID").setType(EdmPrimitiveTypeKind.Int32.getFullQualifiedName()); entityType.setProperties(Arrays.asList(id, name , description));
    It is a snippet from the method "getEntityType" where you`ll have to add lets say 200 properties separately to an entity, whereas I saw that in C# you can just use your pojo class instead of typing down 1000 lines of code just to build your entity type. Yes, writing them down is easy, but still bothers me internally.....
    – Alex May 22 '17 at 20:10
  • Well..I haven't been in that situation. I have OData service on a service app and I consum from web app with SAPUI. I built my models with Javascript (it's less tedious). I don't know if this can help you https://olingo.apache.org/doc/odata4/tutorials/od4_basic_read.html (In the part of Creating a client) – Cesar Miguel May 22 '17 at 20:20
  • Thank you Cesar, but I have already read everything from the link you have provided alongside with the other guides. One more question have you implemented an entity with navigation property?(java) – Alex May 23 '17 at 20:09
  • @Alex have you found a solution in the meantime to generate objects from a given odataservice? – Joker Dec 07 '18 at 13:53
  • @Alex any update on this ? – Raniel Quirante Jan 10 '19 at 18:05
  • Sorry guys it has been a long time. Back then I implemented a custom solution that I can not share publicly nor access it anymore :( – Alex Jan 11 '19 at 15:25
  • I have implemented this feature of generating Odata services with odata schema (edmx) as input or Star UML file. Although it is a paid service, I can offer at significantly low price as I am just getting started. Pls reach out to me at ram@replicacia.com for other code generators as well. I am working with a large scope. Thanks – Gana Dec 12 '21 at 07:38

1 Answers1

0

Replicacia development platform does the same thing.

disclaimer: I am the founder. Replying this question as more than one person was checking for a solution to this problem.

I have implemented this feature of generating Odata v4 services with odata schema (edmx) OR Star UML file as input. It also generates SAPUI5/OpenUI5 layout code and integrates with Odata service. Other forms of input like Java POJOs/UML support is under development.

Although it is a paid service, I can offer at significantly low price as I am just getting started.

Check the website for more details.

Gana
  • 482
  • 3
  • 11
  • 32