[
https://issues.apache.org/jira/browse/OLINGO-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937501#comment-13937501
]
Michael Bolz commented on OLINGO-164:
-------------------------------------
Hi Chandan,
for a migration guide some examples like below would be helpful.
Or what do you think?
Kind regards,
Michael
====================
{code}
@FunctionImport(name = "FindAllSalesOrders", entitySet = "SalesOrders",
returnType = ReturnType.ENTITY_TYPE,
multiplicity = Multiplicity.MANY)
public List<SalesOrderHeader> findAllSalesOrders(
@Parameter(name = "DeliveryStatusCode",
facets = @Facets(maxLength = 2)) final String status) {
{code}
=>
{code}
@EdmFunctionImport(name = "FindAllSalesOrders", entitySet = "SalesOrders",
returnType = @ReturnType(
type = Type.ENTITY, isCollection = true))
public List<SalesOrderHeader> findAllSalesOrders(
@EdmFunctionImportParameter(name = "DeliveryStatusCode",
facets = @EdmFacets(maxLength = 2)) final String status) {
{code}
=====================
{code}
@FunctionImport(name = "CheckATP", returnType = ReturnType.SCALAR,
multiplicity = Multiplicity.ONE,
httpMethod = @HttpMethod(name = Name.GET))
public boolean checkATP(
@Parameter(name = "SoID", facets = @Facets(nullable = false), mode =
Mode.IN) final Long soID,
@Parameter(name = "LiId", facets = @Facets(nullable = false), mode =
Mode.IN) final Long lineItemID) {
{code}
=>
{code}
@EdmFunctionImport(name = "CheckATP", returnType = @ReturnType(type =
Type.SIMPLE, isCollection = false),
httpMethod = HttpMethod.GET)
public boolean checkATP(
@EdmFunctionImportParameter(name = "SoID", facets = @EdmFacets(nullable =
false)) final Long soID,
@EdmFunctionImportParameter(name = "LiId", facets = @EdmFacets(nullable =
false)) final Long lineItemID) {
{code}
===============================
{code}
@FunctionImport(returnType = ReturnType.ENTITY_TYPE, entitySet =
"SalesOrders")
public SalesOrderHeader calculateNetAmount(
@Parameter(name = "SoID", facets = @Facets(nullable = false)) final Long
soID)
{code}
=>
{code}
@EdmFunctionImport(returnType = @ReturnType(type = Type.ENTITY, isCollection
= true), entitySet = "SalesOrders")
public SalesOrderHeader calculateNetAmount(
@EdmFunctionImportParameter(name = "SoID", facets = @EdmFacets(nullable =
false)) final Long soID)
{code}
===========================
{code}
@FunctionImport(returnType = ReturnType.COMPLEX_TYPE)
public Address getAddress(
@Parameter(name = "SoID", facets = @Facets(nullable = false)) final Long
soID) {
{code}
=>
{code}
@EdmFunctionImport(returnType = @ReturnType(type = Type.COMPLEX))
public Address getAddress(
@EdmFunctionImportParameter(name = "SoID", facets = @EdmFacets(nullable =
false)) final Long soID) {
{code}
=============================
> Remove Deprecated FunctionImport Annotation from annotation lib
> ---------------------------------------------------------------
>
> Key: OLINGO-164
> URL: https://issues.apache.org/jira/browse/OLINGO-164
> Project: Olingo
> Issue Type: Sub-task
> Components: odata2-annotation
> Affects Versions: V2 1.2.0
> Reporter: Chandan V.A
> Assignee: Michael Bolz
> Fix For: V2 1.2.0
>
>
> Hello Michael.
> Can you please remove the following deprecated annotations
> 1) org.apache.olingo.odata2.api.annotation.edmx.HttpMethod
> 2) org.apache.olingo.odata2.api.annotation.edm.Facets
> 3) org.apache.olingo.odata2.api.annotation.edm.FunctionImport
> 4) org.apache.olingo.odata2.api.annotation.edm.Parameter
> 5) org.apache.olingo.odata2.api.annotation.edm.Documentation
> Thanks
> Kind Regards
> Chandan
--
This message was sent by Atlassian JIRA
(v6.2#6252)