jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject Re: CoreValueFactory vs MemoryValue flavors
Date Fri, 21 Sep 2012 09:55:25 GMT
hi alex

based on the experience with jackrabbit i would suggest
to always use CoreValueFactory#create* and treat the
individual value classes as implementation detail of the
factory... this allows to change the implementation or
add improvements later on.

kind regards
angela

On 9/21/12 11:49 AM, Alex Parvulescu wrote:
> hi,
>
> I'm wondering when it is advised to use the CoreValueFactory to create new
> values, and when I could simply do a (for example) new LongValue.
>
> Let's take a usecase:
> I'm looking at OakDirectory and I see
>    factory.createValue(System.currentTimeMillis())
> ...in this case I could remove the dependency to the CoreValueFactory class
> and do a
>    new LongValue(System.currentTimeMillis())
>
> So what are the cases when I would use MemoryValue(s)? - and may be we
> could add them to the javadocs ;)
>
> thanks,
> alex

Mime
View raw message