jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Lombart" <christophe.lomb...@gmail.com>
Subject Re: [jackrabbit OCM] Converting java.util.Properties object
Date Thu, 24 Apr 2008 13:14:36 GMT
AtomicTypeConverter is not appropriate for Collection and Map.

The best approach is to annote this field with @Collection but
java.util.Properties is not supported in OCM. You should write your own
CollectionConverter (see examples in
org.apache.jackrabbit.ocm.manager.collectionconverter.impl). I see one
problem : in order to populate the java.util.Properties field, how to
retrieve the desired jcr node properties ?

If multivalues property is suffisiant, you can use the CollectionConverter
MultiValueCollectionConverterImpl like this :

private List myproperties;

Let me know if you need more help


On Thu, Apr 24, 2008 at 1:29 PM, Nandana Mihindukulasooriya <
nandana.cse@gmail.com> wrote:

> Hi,
>   I am using jackrabbit ocm to persist my java objects. I want to convert
> field which is of type java.util.Properties. So what is the best approach
> for me ?  As this is a multi valued field, I can't think of a custom atomic
> type converter which will help this case. I went through [1], but couldn't
> find a quick way to do this. What is the best approach ?
> thanks,
> nandana
> [1] - http://jackrabbit.apache.org/object-content-mapping.html

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message