You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Daniel Keir Haywood (Jira)" <ji...@apache.org> on 2021/08/06 10:47:00 UTC
[jira] [Updated] (ISIS-2743) For embedded entity types, contribute
their actions to the referencing type.
[ https://issues.apache.org/jira/browse/ISIS-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Keir Haywood updated ISIS-2743:
--------------------------------------
Component/s: Isis Core
Fix Version/s: (was: 2.0.0)
> For embedded entity types, contribute their actions to the referencing type.
> ----------------------------------------------------------------------------
>
> Key: ISIS-2743
> URL: https://issues.apache.org/jira/browse/ISIS-2743
> Project: Isis
> Issue Type: New Feature
> Components: Isis Core
> Affects Versions: 2.0.0-M5
> Reporter: Daniel Keir Haywood
> Assignee: Andi Huber
> Priority: Major
>
> For example, suppose we have an embedded type that itself defines an action:
> {code:java}
> @javax.persistence.Embeddable @Value(semanticsProviderClass = ComplexNumberJpaValueSemantics.class)
> public class ComplexNumber {
> private double re;
> private double im;
> @Action
> public ComplexNumber update(double re, double im) {
> return new ComplexNumber(re, im);
> }
> }
> {code}
> and then we have an entity that uses that type:
> {code:java}
> @Entity
> public class SomePhysicsConcept {
> ComplexNumber upper;
> ComplexNumber lower;
> }{code}
> then we should synthesise these mixins on the referencing type:
> {code:java}
> @ActionLayout(associateWith="upper")
> public class SomePhysicsConcept_updateUpper {
> public SomePhysicsConcept act(double re, double im) {
> somePhysicsConcept.upper = somePhysicsConcept.upper.act(re, im);
> }
> }
> {code}
> and similarly:
> {code:java}
> @ActionLayout(associateWith="lower")
> public class SomePhysicsConcept_updateLower {
> public SomePhysicsConcept act(double re, double im) {
> somePhysicsConcept.lower = somePhysicsConcept.lower.act(re, im);
> }
> }{code}
>
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)