Yes that is what I meant.

I made the change and pushed it. So you can go ahead and merge once you are 
ready.

Best Regards,
Christian

-----Original Message-----
From: Francesco Chicchiriccò [mailto:ilgro...@apache.org] 
Sent: Montag, 7. April 2014 13:49
To: dev@olingo.apache.org
Subject: Re: [DISCUSS] EdmEntityContainer: getActionImport(String) / 
getFunctionImport(String)

On 07/04/2014 13:44, Amend, Christian wrote:
> Hi Francesco,
>
> Looks good except for one thing in the AbstractEdm class:
>
> Calling the getUnboundFunction(...) method delivers one unbound function 
> which gets added to the unboundFunctionsByName HashMap. If I now call 
> getUnboundFunctions() I will only get the list which has been filled with the 
> one function I previously fetched. If I call getUnboundFunctions and then 
> getUnboundFunction(...) this issue is not present since both maps have been 
> correctly filled.
>
> I would either disable the caching by name for querying a single function or 
> I would introduce a loaded flag which gets only set after all unbound 
> functions have been loaded.

You are right: are you suggesting to just remove line 294 (e.g. caching 
for unboundFunctionsByName when calling getUnboundFunction(...)? If so, 
I am +1.

Regards.

> -----Original Message-----
> From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
> Sent: Montag, 7. April 2014 13:23
> To: dev@olingo.apache.org
> Subject: Re: [DISCUSS] EdmEntityContainer: getActionImport(String) / 
> getFunctionImport(String)
>
> Hi,
> I have updated OLINGO-202's description according to the discussion
> below and just pushed the olingo202 branch with OLINGO-202
> implementation: please let me know if this is fine and can be merged to
> master.
>
> Regards.
>
> On 07/04/2014 12:36, Amend, Christian wrote:
>> Hi,
>>
>> 1. Yes
>> 2. Yes
>> 3. Yes :)
>>
>> As for getFunctionFQN: I needed this method during the metadata 
>> serialization since I do not have any parameters and thus could not call the 
>> method. So for now I would leave it there. Overloading is based on 
>> Parameters while the name stays the same.
>>
>> Best Regards,
>> Christian
>>
>> -----Original Message-----
>> From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
>> Sent: Montag, 7. April 2014 11:36
>> To: dev@olingo.apache.org
>> Subject: Re: [DISCUSS] EdmEntityContainer: getActionImport(String) / 
>> getFunctionImport(String)
>>
>> Hi,
>> as suggested by Ralf, since "Unbound actions currently cannot have
>> overloads", I will perform the following changes:
>>
>> 1. in EdmActionImport
>>
>> REMOVE getBoundAction(...)
>>
>> 2. in EdmFunctionImport
>>
>> REMOVE getBoundFunction(...)
>>
>> ADD List<EdmFunction> getUnboundFunctions()
>>
>>
>> OLINGO-202 description says instead "Introduce the getActions and
>> getFunctions method which will deliver all UNBOUND actions and functions
>> with the specified name" which would suggest to also
>>
>> ADD List<EdmAction> getUnboundActions()
>>
>> in EdmActionImport
>>
>>
>> Correct?
>>
>> What about EdmFunctionImport's
>>
>> FullQualifiedName getFunctionFqn()
>>
>> ?
>>
>> Regards.
>>
>> On 07/04/2014 10:43, Francesco Chicchiriccò wrote:
>>> On 07/04/2014 10:34, Amend, Christian wrote:
>>>> Yes this is ok for me.
>>>>
>>>> Why don`t you open a new branch make the interfaces and client side
>>>> and I will then look at the server side.
>>>> You can use this Jira issue as a reference:
>>>> https://issues.apache.org/jira/browse/OLINGO-202
>>> Fine; I have also linked OLINGO-234 to OLINGO-202.
>>>
>>> Regards.
>>>
>>>> -----Original Message-----
>>>> From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
>>>> Sent: Montag, 7. April 2014 10:31
>>>> To: dev@olingo.apache.org
>>>> Subject: Re: [DISCUSS] EdmEntityContainer: getActionImport(String) /
>>>> getFunctionImport(String)
>>>>
>>>> On 07/04/2014 10:28, Amend, Christian wrote:
>>>>> Hi Ralf,
>>>>>
>>>>> thank you very much for the clarification!
>>>>>
>>>>> @ Francesco:
>>>>> This means for us:
>>>>> 1. Delete the get boundFunction and getBoundAction method.
>>>>> 2. Maybe introduce a getActions method which delivers all unbound
>>>>> Actions for this this name. Same goes fur Functions.
>>>> I can do both things straight away, if this is fine for you (I would
>>>> possibly need some guidance for server-side implementation).
>>>>
>>>> Regards.
>>>>
>>>>> -----Original Message-----
>>>>> From: Handl, Ralf [mailto:ralf.ha...@sap.com]
>>>>> Sent: Montag, 7. April 2014 10:24
>>>>> To: dev@olingo.apache.org
>>>>> Subject: RE: [DISCUSS] EdmEntityContainer: getActionImport(String) /
>>>>> getFunctionImport(String)
>>>>>
>>>>> Hi Christian and Francesco,
>>>>>
>>>>> There's no way to import a single function overload, the
>>>>> FunctionImport element imports all overloads into the entity
>>>>> container. It also only allows importing unbound function overloads,
>>>>> see
>>>>> http://docs.oasis-open.org/odata/odata/v4.0/os/part3-csdl/odata-v4.0-os-part3-csdl.html#_Toc372794000.
>>>>>
>>>>> The ActionImport element also only imports an unbound action.
>>>>> Unbound actions currently cannot have overloads, because overloads
>>>>> must have the same binding parameter, and unbound actions don't have
>>>>> one, see
>>>>> http://docs.oasis-open.org/odata/odata/v4.0/os/part3-csdl/odata-v4.0-os-part3-csdl.html#_Toc372793963.
>>>>>
>>>>> Thanks!
>>>>> --Ralf
>>>>>
>>>>> -----Original Message-----
>>>>> From: Amend, Christian [mailto:christian.am...@sap.com]
>>>>> Sent: Monday, 7. April 2014 10:13
>>>>> To: dev@olingo.apache.org
>>>>> Subject: FW: [DISCUSS] EdmEntityContainer: getActionImport(String) /
>>>>> getFunctionImport(String)
>>>>>
>>>>> Hi Francesco,
>>>>>
>>>>> I have forwarded this message to the dev list :)
>>>>>
>>>>> ActionImports and FunctionImports have an operation specified by
>>>>> FullQualified Name. The Overloading happens based on Parameters when
>>>>> they are called. So giving back a list of ActionImports would not
>>>>> make sense but rather adding a method at the ActionImport like this
>>>>> List<EdmAction> getActions(). This way a client can decide which
>>>>> Action he wants to invoke. Same goes for FunctionImport.
>>>>>
>>>>> As far as I know there is no way to bind a single Action directly to
>>>>> an ActionImport again same goes for Functions and FunctionImports.
>>>>>
>>>>> As for the methods getBoundAction/getUnbound at the ActionImport I
>>>>> have to look into this. As far as I know only unbound Actions can
>>>>> serve for an Action Import. I don`t know who introduced this
>>>>> methods. For Functions I will have to look into this as well.
>>>>>
>>>>> Best Regards,
>>>>> Christian
>>>>>
>>>>> -----Original Message-----
>>>>> From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
>>>>> Sent: Montag, 7. April 2014 09:42
>>>>> To: d...@olingo.incubator.apache.org
>>>>> Subject: Re: [DISCUSS] EdmEntityContainer: getActionImport(String) /
>>>>> getFunctionImport(String)
>>>>>
>>>>> On 07/04/2014 09:24, Francesco Chicchiriccò wrote:
>>>>>> Hi all,
>>>>>> as part of OLINGO-234 I am now considering some scenarios where action
>>>>>> and / or functions are overloaded.
>>>>>>
>>>>>> I have just noticed that the EdmEntityContainer container has the
>>>>>> following two methods:
>>>>>>
>>>>>>       EdmActionImport getActionImport(String name);
>>>>>>       EdmFunctionImport getFunctionImport(String name);
>>>>>>
>>>>>> I would have expected, though, something like as
>>>>>>
>>>>>>       List<EdmActionImport> getActionImport(String name);
>>>>>>       List<EdmFunctionImport> getFunctionImport(String name);
>>>>>>
>>>>>>
>>>>>> Am I wrong?
>>>>> I have also just noticed that both EdmActionImport and
>>>>> EdmFunctionImport
>>>>> have methods like as getUnboundFunction() / getUnboundAction() -
>>>>> getBoundFunction() / getBoundAction() (they actually used to have plain
>>>>> getAction() / getFunction()): this suggests that from a single
>>>>> ActionImport / FunctionImport one can get to all actions / functions
>>>>> with given name.
>>>>>
>>>>> Isn't there a way to bound an ActionImport / FunctionImport to a single
>>>>> Action / Function?

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/

Reply via email to