openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From is_maximum <mnr...@gmail.com>
Subject Re: What is ManagedInterface
Date Tue, 10 Mar 2009 07:34:00 GMT

Hi Pinaki,
Now it seems much more useful. the Graph<T> you said seems interesting to
me. I am going to see if it can help me in our project.

Thanks



Pinaki Poddar wrote:
> 
> Hi,
>   You can also define relations in terms of a interface (say T), tell
> OpenJPA that at runtime you will at supply a Persistence capable instance
> for the interface (see @Type annotation in the doc).
> 
>   Effectively you can define a class say Graph<T> with generic type T and
> persist with Person or City at runtime as the node of the real graph.
> 
>   
> 
> is_maximum wrote:
>> 
>> Thanks Craig,
>> Yes it reduces the redundant code. But I was thinking of a great idea
>> behind that which may leads me to a revolution in my application :)
>> 
>> 
>> 
>> Craig L Russell wrote:
>>> 
>>> Hi is_,
>>> 
>>> On Mar 9, 2009, at 6:45 AM, is_maximum wrote:
>>> 
>>>>
>>>> Hi
>>>>
>>>> Can anyone explain what is the ManagedInterface good for? What  
>>>> benefit would
>>>> achieve if we define all of our entities as interfaces?
>>> 
>>> If your entities are pure data (no behavior) then defining them as  
>>> interfaces reduces mindless code generation for the implementation of  
>>> get and set methods. All you do is declare the methods and OpenJPA  
>>> does the rest.
>>> 
>>> Craig
>>>>
>>>>
>>>> thanks
>>>> -- 
>>>> View this message in context:
>>>> http://n2.nabble.com/What-is-ManagedInterface-tp2449023p2449023.html
>>>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>>>>
>>> 
>>> Craig L Russell
>>> Architect, Sun Java Enterprise System http://db.apache.org/jdo
>>> 408 276-5638 mailto:Craig.Russell@sun.com
>>> P.S. A good JDO? O, Gasp!
>>> 
>>> 
>>>  
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/What-is-ManagedInterface-tp2449023p2453694.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message