[
https://issues.apache.org/jira/browse/OLINGO-32?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13836313#comment-13836313
]
Michael Bolz commented on OLINGO-32:
------------------------------------
[Here|https://issues.apache.org/jira/browse/OLINGO-32?focusedCommentId=13835966&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13835966]
I have to check and re-think. Because we have a coupling between the allowed
OData data types (in form of the {{o.a.o.o.api.edm.EdmSimpleTypeKind}})
specified in the _odata-api_ and the mapping of the java data types to them via
the {{@EdmProperty}} annotation int the _odata-api-annotation_.
But if it is a use case that the _odata-api-annotation_ can be used without the
_odata-api_ we can introduce a {{@EdmType}} annotation with all in OData
specified types to get a _weak coupling_ so that your mentioned use case can be
satisfied.
IMHO it is a not necessary code duplication ({{EdmSimpleTypeKind <=> EdmType}})
but because it are _only 16_ types and these are _very static_ we could do it.
Perhaps we should write this to the mailing list to get some more opinions ;o)
King regards,
Michael
> Introduce (Java) Annotations for definition of EDM
> --------------------------------------------------
>
> Key: OLINGO-32
> URL: https://issues.apache.org/jira/browse/OLINGO-32
> Project: Olingo
> Issue Type: New Feature
> Affects Versions: V2 1.1.0
> Reporter: Michael Bolz
> Assignee: Michael Bolz
> Priority: Minor
> Fix For: V2 1.1.0
>
>
> The idea is to create your model as POJOs which then can be annotated with
> special {{@EdmXXX}} (Java) annotations to define the EDM for an OData Service.
> Based on these annotation then the {{edmx}} document ({{$metadata}}) can be
> generated as well as a generic {{Processor}} ({{ODataSingleProcessor}}) for
> e.g. {{JSON}} can be written.
> As initial contribution and starting point for discussions about this feature
> a branch with name {{PocEdmAnnotationsExtension}} is created with a basic
> Proof of Concept.
--
This message was sent by Atlassian JIRA
(v6.1#6144)