> Date: Mon, 11 May 2009 10:06:03 -0700
> From: [email protected]
> To: [email protected]
> Subject: Re: [qi4j-dev] How to get value composites with the parent entity?
> 
> That sounded reasonable but when taking a look again at:
> 
>     public interface Simple {
>         String string();
> 
>         List<SimpleValue> values();
>     }
> 
>     public interface SimpleState {
>         @UseDefaults
>         Property<String> string();
> 
>         @UseDefaults
>         Property<List<SimpleValue>> values();
>     }
> 
>     @Mixins ({ SimpleMixin.class })
>     public interface SimpleEntity extends Simple, EntityComposite {
> 
>     }
> 
> Since I made the Simple interface to expose non-Property (SimpleState
> is the backing state object) methods, does it mean than that Simple's
> properties cannot be modified; sort of only getters are available. If
> I wanted Simple to be modifiable, I need to make Simple's APIs to be
> what SimpleState is?
> 

I am not sure what Rickard/Niclas would say, but to give you a quick answer - 
most likely you would want add methods

setString(String newString);
addValue(SimpleValue sv);
removeValue(SimpleValue);

to Simple -interface. So now Simple becomes a kind of wrapper around 
SimpleState.

_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to