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?
On Sat, May 9, 2009 at 11:06 PM, Rickard Öberg <[email protected]> wrote:
> Aye wrote:
>>
>> public interface Simple {
>> String string();
>>
>> List<SimpleValue> values();
>> }
>
> values() is a property, and like any other property you need to set it for
> it to be updated, which you never did.
>
> I.e. you need to do:
> List<SimpleValue> list = simpleEntity.values();
> list.add(value);
> simpleEntity.values().set(list);
>
> Then Qi4j will know that the values() property has been updated, and can
> store it properly.
>
> /Rickard
>
>
> _______________________________________________
> qi4j-dev mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/qi4j-dev
>
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev