You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Alexander Prozor <ap...@isd.dp.ua> on 2003/05/30 13:51:44 UTC

HashMap

Hello ,
  does anybody stored HashMap member?
  (string keys, object values ).
  I've tried to store it in VARCHAR field ( using appropriate
  conversion),
  tried to use ODMG DMapEntry DMapImpl,
  but nothing helps :(.
  thank you.
  

-- 
Best regards,
 Alexander                          mailto:apro@isd.dp.ua


Re[2]: HashMap

Posted by Alexander Prozor <ap...@isd.dp.ua>.
Hello Thomas,

Ok, but, is it possible to store
java.lang.Object member ? ( property that can contains String, Integer
or other similar type ).
I got ClassCastException while try to do this.

TM> What's the problem with DMapImpl? It's a proven solution!
TM> There are examples on how to use it in the testbed and in 
TM> repository_junit.xml.

TM> Another solution to store a Map member could be to implement your own 
TM> ManageableCollection class that implements Map.

TM> See o.a.ojb.broker.util.collections.ManagegeableHashSet for an example 
TM> how to do this for a Set member.


-- 
Best regards,
 Alexander                            mailto:apro@isd.dp.ua


Re: HashMap

Posted by Thomas Mahler <th...@web.de>.
Hi Alexander,

Alexander Prozor wrote:
> Hello ,
>   does anybody stored HashMap member?
>   (string keys, object values ).
>   I've tried to store it in VARCHAR field ( using appropriate
>   conversion),
>   tried to use ODMG DMapEntry DMapImpl,
>   but nothing helps :(.

What's the problem with DMapImpl? It's a proven solution!
There are examples on how to use it in the testbed and in 
repository_junit.xml.

Another solution to store a Map member could be to implement your own 
ManageableCollection class that implements Map.

See o.a.ojb.broker.util.collections.ManagegeableHashSet for an example 
how to do this for a Set member.

Thomas

>   thank you.
>   
>