polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: query value/transient composite? objects vs values?
Date Fri, 15 Apr 2016 04:21:24 GMT
1. Values are not directly persistable. Entities is the only way. In 3.0, I
am considering changing the definition of Entity to be "Entity =
ValueComposite assigned to an Identity", The upside is that
ConcurrentModification is easier to handle. The downside is that I also
want to support EventSourcing, i.e. only write down the changes and not the
current state. Those are somewhat contradictory ways of doing it, and may
not be easy to reconcile.

2. No.

3. Objects is one way to allow ordinary Java classes to participate in the
Zest Runtime.  So, I can do;

public class Abc
    private UnitOfWorkFactory uowf;

and declare that class as an Object.
For it to work, the Object must be instantiated with the ObjectFactory
(part of Module in 2.1). Objects also have @Uses annotations on fields and
constructor arguments, and they are passed in the ObjectFactory.newObject()
method call. Multiple object instances of the same type is not supported

ObjectFactory also has the injectInto() method, in the cases where some
other system needs to do the instantiation of your class (say Spring), but
you want to inject the Zest Runtime model into it after it has been created
(of course, doesn't work with Constructor injection, only fields).


On Fri, Apr 15, 2016 at 12:05 PM, zhuangmz08 <zhuangmz08@qq.com> wrote:

> Hi, I'm confused with value/transient/entity composite, my question is,
> I can get entities after I fire a query using query-API inside a
> UnitOfWork.
> 1. Can I get value composite by query API? If I cannot, value is
> persistentable only in a Entity?
> 2. Can I query transient? I guess not.
> 3. module.values()/.entities()/.transients()/.services()/.configurations()
> is used to declare those 5 types of composite. Then, what does
> module.objects() mean?
> Thanks a lot.

Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java

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