You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Alex Parvulescu <al...@gmail.com> on 2012/09/21 11:49:53 UTC
CoreValueFactory vs MemoryValue flavors
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
Re: CoreValueFactory vs MemoryValue flavors
Posted by Angela Schreiber <an...@adobe.com>.
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