diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferDeclaration.eol b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferDeclaration.eol index 3bfde3ed..56988896 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferDeclaration.eol +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferDeclaration.eol @@ -113,3 +113,8 @@ operation JSL!TransferDeclaration getCreateEventAfter(): JSL!TransferCreateDecla operation JSL!TransferDeclaration hasSortableField(): Boolean { return self.members.select(m | m.isKindOf(JSL!TransferFieldDeclaration)).exists(a | a.isSortable()); } + +@cached +operation JSL!TransferDeclaration isActorRelated(): Boolean { + return self.isKindOf(JSL!ActorDeclaration); +} diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferRelationDeclaration.eol b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferRelationDeclaration.eol index 4c31411c..6062bdd8 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferRelationDeclaration.eol +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferRelationDeclaration.eol @@ -106,3 +106,9 @@ operation JSL!TransferRelationDeclaration getMappedTransferRelationEquivalent() return ret; } + +@cached +operation JSL!TransferRelationDeclaration isActorRelated(): Boolean { + return self.isKindOf(JSL!ActorAccessDeclaration); +} + diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/action.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/action.etl index f64e39c4..4584d084 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/action.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/action.etl @@ -141,7 +141,7 @@ rule CreateUnboundOperationForMappedTransferObjectType guard: s.eContainer.map.isDefined() and s.static t.setId("(jsl/" + s.getId() + ")/CreateUnboundOperationForMappedTransferObjectType"); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateUnboundOperationForMappedTransferObjectType: " + t.name); } @@ -238,7 +238,7 @@ rule CreateBoundOperationForMappedTransferObjectType t.setId("(jsl/" + s.getId() + ")/CreateBoundOperationForMappedTransferObjectType"); t.binding = s.equivalent("CreateBoundOperationForEntityType"); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateBoundOperationForMappedTransferObjectType: " + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/deleteBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/deleteBehaviour.etl index e1a59d0c..fd48c03f 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/deleteBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/deleteBehaviour.etl @@ -8,7 +8,7 @@ rule CreateDeleteOperationForEntityType guard: generateBehaviours and s.instead ?: false t.setId("(jsl/" + s.getId() + ")/CreateDeleteOperationForEntityType"); - t.instanceRepresentation = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.eContainer.getPSMEquivalent(); t.name = s.name + s.eContainer.getFqName().fqNameToCamelCase(); s.eContainer.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateDeleteOperationForEntityType: " + t.name); @@ -22,7 +22,7 @@ rule CreateDeleteBehaviourForTransferType t.setId("(jsl/" + s.getId() + ")/CreateDeleteBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#DELETE_INSTANCE; - t.owner = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.owner = s.eContainer.getPSMEquivalent(); log.debug("Created CreateDeleteBehaviourForTransferType: " + s.name); } @@ -36,7 +36,7 @@ rule CreateDeleteOperationForTransferType t.name = s.name; t.binding = s.equivalent("CreateDeleteOperationForEntityType"); t.behaviour = s.equivalent("CreateDeleteBehaviourForTransferType"); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateDeleteOperationForTransferType: " + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/getActionInputRangeBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/getActionInputRangeBehaviour.etl index 68a74095..b391e029 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/getActionInputRangeBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/getActionInputRangeBehaviour.etl @@ -8,7 +8,7 @@ rule CreateGetRangeActionInputOperationForEntityType guard: generateBehaviours and s.parameterType?.map.isDefined() and s.eContainer.map.isDefined() t.setId("(jsl/" + s.getId() + ")/CreateGetRangeActionInputOperationForEntityType"); - t.instanceRepresentation = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.eContainer.getPSMEquivalent(); t.name = "getRangeForRelation" + s.getFqName().fqNameToCamelCase(); s.eContainer.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateGetRangeActionInputOperationForEntityType: " + t.name); @@ -47,7 +47,7 @@ rule CreateGetRangeActionInputOperationForMappedTransferType //t.updateOnResult = s.referenceType.isUpdateSupported(); //t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateGetRangeActionInputOperationForMappedTransferType: " + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/refreshBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/refreshBehaviour.etl index 6766152a..c875f6bc 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/refreshBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/refreshBehaviour.etl @@ -4,10 +4,10 @@ import "../../../../operations/_importAll.eol"; rule CreateRefreshOperationForEntityType transform s: JSL!TransferDeclaration to t: JUDOPSM!BoundOperation { - guard: generateBehaviours and s.map.isDefined() + guard: generateBehaviours and not s.isActorRelated() and s.map.isDefined() t.setId("(jsl/" + s.getId() + ")/CreateRefreshOperationForEntityType"); - t.instanceRepresentation = s.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.getPSMEquivalent(); t.name = "Refresh" + s.getFqName().fqNameToCamelCase(); s.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateRefreshOperationForEntityType: " + t.name); @@ -17,11 +17,11 @@ rule CreateRefreshOperationForEntityType rule CreateRefreshBehaviourForTransferType transform s: JSL!TransferDeclaration to t: JUDOPSM!TransferOperationBehaviour { - guard: generateBehaviours and s.map.isDefined() + guard: generateBehaviours and not s.isActorRelated() and s.map.isDefined() t.setId("(jsl/" + s.getId() + ")/CreateRefreshBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#REFRESH; - t.owner = s.equivalent("CreateMappedTransferObjectType"); + t.owner = s.getPSMEquivalent(); log.debug("Created CreateRefreshBehaviourForTransferType: " + s.name); } @@ -29,7 +29,7 @@ rule CreateRefreshBehaviourForTransferType rule CreateRefreshOperationForTransferType transform s: JSL!TransferDeclaration to t: JUDOPSM!BoundTransferOperation { - guard: generateBehaviours and s.map.isDefined() + guard: generateBehaviours and not s.isActorRelated() and s.map.isDefined() t.setId("(jsl/" + s.getId() + ")/CreateRefreshOperationForTransferType"); t.name = "refreshInstance"; @@ -39,7 +39,7 @@ rule CreateRefreshOperationForTransferType t.binding = s.equivalent("CreateRefreshOperationForEntityType"); t.behaviour = s.equivalent("CreateRefreshBehaviourForTransferType"); - s.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.getPSMEquivalent().operations.add(t); log.debug("Created CreateRefreshOperationForTransferType: " + t.name); } @@ -48,7 +48,7 @@ rule CreateRefreshOperationForTransferType rule CreateRefreshOperationForTransferTypeInputParameter transform s: JSL!TransferDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.map.isDefined() + guard: generateBehaviours and not s.isActorRelated() and s.map.isDefined() t.setId("(jsl/" + s.getId() + ")/CreateRefreshOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForRefreshTransferTypeInput"); @@ -62,7 +62,7 @@ rule CreateRefreshOperationForTransferTypeInputParameter rule CreateRefreshOperationForTransferTypeOutputParameter transform s: JSL!TransferDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.map.isDefined() + guard: generateBehaviours and not s.isActorRelated() and s.map.isDefined() t.setId("(jsl/" + s.getId() + ")/CreateRefreshOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForRefreshTransferTypeOutput"); @@ -76,7 +76,7 @@ rule CreateRefreshOperationForTransferTypeOutputParameter rule CreateRefreshOperationForEntityTypeInputParameter transform s: JSL!TransferDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.map.isDefined() + guard: generateBehaviours and not s.isActorRelated() and s.map.isDefined() t.setId("(jsl/" + s.getId() + ")/CreateRefreshOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForRefreshEntityTypeInput"); @@ -90,7 +90,7 @@ rule CreateRefreshOperationForEntityTypeInputParameter rule CreateRefreshOperationForEntityTypeOutputParameter transform s: JSL!TransferDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.map.isDefined() + guard: generateBehaviours and not s.isActorRelated() and s.map.isDefined() t.setId("(jsl/" + s.getId() + ")/CreateRefreshOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForRefreshEntityTypeOutput"); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationAddReferenceBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationAddReferenceBehaviour.etl index 8d76ef63..d9ed9408 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationAddReferenceBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationAddReferenceBehaviour.etl @@ -5,10 +5,10 @@ import "../../../../operations/_importAll.eol"; rule CreateAddReferenceOperationForEntityType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundOperation { - guard: generateBehaviours and s.isAddReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isAddReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateAddReferenceOperationForEntityType"); - t.instanceRepresentation = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.eContainer.getPSMEquivalent(); t.name = "addReferencesToRelation" + s.getFqName().fqNameToCamelCase(); s.eContainer.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateAddReferenceOperationForEntityType: " + t.name); @@ -18,7 +18,7 @@ rule CreateAddReferenceOperationForEntityType rule CreateAddReferenceBehaviourForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!TransferOperationBehaviour { - guard: generateBehaviours and s.isAddReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isAddReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateAddReferenceBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#ADD_REFERENCE; @@ -30,7 +30,7 @@ rule CreateAddReferenceBehaviourForTransferType rule CreateAddReferenceOperationForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundTransferOperation { - guard: generateBehaviours and s.isAddReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isAddReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateAddReferenceOperationForTransferType"); t.name = "addReferencesTo" + s.name.firstToUpperCase(); @@ -44,7 +44,7 @@ rule CreateAddReferenceOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateAddReferenceOperationForTransferType: " + t.name); } @@ -53,7 +53,7 @@ rule CreateAddReferenceOperationForTransferType rule CreateAddReferenceOperationForTransferTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.isAddReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isAddReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateAddReferenceOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForAddReferenceTransferTypeInput"); @@ -67,7 +67,7 @@ rule CreateAddReferenceOperationForTransferTypeInputParameter rule CreateAddReferenceOperationForEntityTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.isAddReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isAddReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateAddReferenceOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForAddReferenceEntityTypeInput"); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationCreateBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationCreateBehaviour.etl index 46789345..53d02fd1 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationCreateBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationCreateBehaviour.etl @@ -5,10 +5,10 @@ import "../../../../operations/_importAll.eol"; rule CreateCreateOperationForEntityType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundOperation { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateCreateOperationForEntityType"); - t.instanceRepresentation = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.eContainer.getPSMEquivalent(); t.name = s.referenceType.getCreateEventInsteadOf().name + "ForRelation" + s.getFqName().fqNameToCamelCase(); s.eContainer.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateCreateOperationForEntityType: " + t.name); @@ -18,7 +18,7 @@ rule CreateCreateOperationForEntityType rule CreateCreateBehaviourForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!TransferOperationBehaviour { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateCreateBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#CREATE_INSTANCE; @@ -30,7 +30,7 @@ rule CreateCreateBehaviourForTransferType rule CreateCreateOperationForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundTransferOperation { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateCreateOperationForTransferType"); t.name = s.referenceType.getCreateEventInsteadOf().name + "Of" + s.name.firstToUpperCase(); @@ -44,7 +44,7 @@ rule CreateCreateOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateCreateOperationForTransferType: " + t.name); } @@ -53,7 +53,7 @@ rule CreateCreateOperationForTransferType rule CreateCreateOperationForTransferTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateCreateOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForCreateTransferTypeInput"); @@ -67,7 +67,7 @@ rule CreateCreateOperationForTransferTypeInputParameter rule CreateCreateOperationForTransferTypeOutputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateCreateOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForCreateTransferTypeOutput"); @@ -81,7 +81,7 @@ rule CreateCreateOperationForTransferTypeOutputParameter rule CreateCreateOperationForEntityTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateCreateOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForCreateEntityTypeInput"); @@ -95,7 +95,7 @@ rule CreateCreateOperationForEntityTypeInputParameter rule CreateCreateOperationForEntityTypeOutputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateCreateOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForCreateEntityTypeOutput"); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationGetRangeReferenceBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationGetRangeReferenceBehaviour.etl index 4f96a547..bcc91704 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationGetRangeReferenceBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationGetRangeReferenceBehaviour.etl @@ -5,10 +5,10 @@ import "../../../../operations/_importAll.eol"; rule CreateGetRangeRelationOperationForEntityType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundOperation { - guard: generateBehaviours and s.isGetRangeSupported() + guard: generateBehaviours and not s.isActorRelated() and s.isGetRangeSupported() t.setId("(jsl/" + s.getId() + ")/CreateGetRangeRelationOperationForEntityType"); - t.instanceRepresentation = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.eContainer.getPSMEquivalent(); t.name = "getRangeForRelation" + s.getFqName().fqNameToCamelCase(); s.eContainer.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateGetRangeRelationOperationForEntityType: " + t.name); @@ -18,7 +18,7 @@ rule CreateGetRangeRelationOperationForEntityType rule CreateGetRangeRelationBehaviourForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!TransferOperationBehaviour { - guard: generateBehaviours and s.isGetRangeSupported() + guard: generateBehaviours and not s.isActorRelated() and s.isGetRangeSupported() t.setId("(jsl/" + s.getId() + ")/CreateGetRangeRelationBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#GET_RANGE; @@ -30,7 +30,7 @@ rule CreateGetRangeRelationBehaviourForTransferType rule CreateGetRangeRelationOperationForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundTransferOperation { - guard: generateBehaviours and s.isGetRangeSupported() + guard: generateBehaviours and not s.isActorRelated() and s.isGetRangeSupported() t.setId("(jsl/" + s.getId() + ")/CreateGetRangeRelationOperationForTransferType"); t.name = "getRangeFor" + s.name.firstToUpperCase(); @@ -44,7 +44,7 @@ rule CreateGetRangeRelationOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateGetRangeRelationOperationForTransferType: " + t.name); } @@ -53,7 +53,7 @@ rule CreateGetRangeRelationOperationForTransferType rule CreateGetRangeRelationOperationForTransferTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.isGetRangeSupported() + guard: generateBehaviours and not s.isActorRelated() and s.isGetRangeSupported() t.setId("(jsl/" + s.getId() + ")/CreateGetRangeRelationOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForGetRangeRelationTransferTypeInput"); @@ -67,7 +67,7 @@ rule CreateGetRangeRelationOperationForTransferTypeInputParameter rule CreateGetRangeRelationOperationForTransferTypeOutputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.isGetRangeSupported() + guard: generateBehaviours and not s.isActorRelated() and s.isGetRangeSupported() t.setId("(jsl/" + s.getId() + ")/CreateGetRangeRelationOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForGetRangeRelationTransferTypeOutput"); @@ -81,7 +81,7 @@ rule CreateGetRangeRelationOperationForTransferTypeOutputParameter rule CreateGetRangeRelationOperationForEntityTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.isGetRangeSupported() + guard: generateBehaviours and not s.isActorRelated() and s.isGetRangeSupported() t.setId("(jsl/" + s.getId() + ")/CreateGetRangeRelationOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForGetRangeRelationEntityTypeInput"); @@ -95,7 +95,7 @@ rule CreateGetRangeRelationOperationForEntityTypeInputParameter rule CreateGetRangeRelationOperationForEntityTypeOutputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.isGetRangeSupported() + guard: generateBehaviours and not s.isActorRelated() and s.isGetRangeSupported() t.setId("(jsl/" + s.getId() + ")/CreateGetRangeRelationOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForGetRangeRelationEntityTypeOutput"); @@ -145,40 +145,3 @@ rule CreateCardinalityForGetRangeRelationEntityTypeOutput t.upper = -1; } -/* -@greedy -rule CreateGetRangeReferenceTransferOperationForInputParameter - transform s : ESM!Parameter - to t : JUDOPSM!UnboundOperation { - guard: esmUtils.isGetRangeSupported(s) - - t.setId("(esm/" + s.getId() + ")/GetRangeReferenceTransferOperationForInputParameter"); - - t.name = "_getRangeReference" + s.name.firstToUpperCase(); - t.immutable = true; - t.behaviour = new JUDOPSM!TransferOperationBehaviour; - t.behaviour.setId("(esm/" + s.getId() + ")/GetRangeReferenceTransferOperationForInputParameter/Behaviour"); - t.behaviour.behaviourType = JUDOPSM!TransferOperationBehaviourType#GET_RANGE; - t.behaviour.owner = s.getPSMTransferOperationEquivalent(); - - t.input = new JUDOPSM!Parameter; - t.input.setId("(esm/" + s.getId() + ")/GetRangeReferenceTransferOperationForInputParameter/Input"); - t.input.name = "input"; - t.input.type = s.equivalent("CreateGetRangeInputTypeForInputParameter"); - t.input.cardinality = new JUDOPSM!Cardinality; - t.input.cardinality.setId("(esm/" + s.getId() + ")/GetRangeReferenceTransferOperationForInputParameter/Input/Cardinality"); - t.input.cardinality.lower = 0; - t.input.cardinality.upper = 1; - - t.output = new JUDOPSM!Parameter; - t.output.setId("(esm/" + s.getId() + ")/GetRangeReferenceTransferOperationForInputParameter/Output"); - t.output.name = "output"; - t.output.type = s.target.getPSMTransferObjectTypeEquivalent(); - t.output.cardinality = new JUDOPSM!Cardinality; - t.output.cardinality.setId("(esm/" + s.getId() + ")/GetRangeReferenceTransferOperationForInputParameter/Output/Cardinality"); - t.output.cardinality.lower = 0; - t.output.cardinality.upper = -1; - - s.eContainer.getPSMTransferObjectTypeEquivalent().operations.add(t); -} -*/ diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationListBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationListBehaviour.etl index 6791c0be..76e5727f 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationListBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationListBehaviour.etl @@ -5,10 +5,10 @@ import "../../../../operations/_importAll.eol"; rule CreateListOperationForEntityType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundOperation { - guard: generateBehaviours and (s.maps() or s.reads()) + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) t.setId("(jsl/" + s.getId() + ")/CreateListOperationForEntityType"); - t.instanceRepresentation = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.eContainer.getPSMEquivalent(); t.name = "listRelation" + s.getFqName().fqNameToCamelCase(); s.eContainer.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateListOperationForEntityType: " + t.name); @@ -18,7 +18,7 @@ rule CreateListOperationForEntityType rule CreateListBehaviourForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!TransferOperationBehaviour { - guard: generateBehaviours and (s.maps() or s.reads()) + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) t.setId("(jsl/" + s.getId() + ")/CreateListBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#LIST; @@ -30,7 +30,7 @@ rule CreateListBehaviourForTransferType rule CreateListOperationForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundTransferOperation { - guard: generateBehaviours and (s.maps() or s.reads()) + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) t.setId("(jsl/" + s.getId() + ")/CreateListOperationForTransferType"); t.name = "listOf" + s.name.firstToUpperCase(); @@ -44,7 +44,7 @@ rule CreateListOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateListOperationForTransferType: " + t.name); } @@ -53,7 +53,7 @@ rule CreateListOperationForTransferType rule CreateListOperationForTransferTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and (s.maps() or s.reads()) + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) t.setId("(jsl/" + s.getId() + ")/CreateListOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForListTransferTypeInput"); @@ -67,7 +67,7 @@ rule CreateListOperationForTransferTypeInputParameter rule CreateListOperationForTransferTypeOutputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and (s.maps() or s.reads()) + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) t.setId("(jsl/" + s.getId() + ")/CreateListOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForListTransferTypeOutput"); @@ -81,7 +81,7 @@ rule CreateListOperationForTransferTypeOutputParameter rule CreateListOperationForEntityTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and (s.maps() or s.reads()) + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) t.setId("(jsl/" + s.getId() + ")/CreateListOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForListEntityTypeInput"); @@ -95,7 +95,7 @@ rule CreateListOperationForEntityTypeInputParameter rule CreateListOperationForEntityTypeOutputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and (s.maps() or s.reads()) + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) t.setId("(jsl/" + s.getId() + ")/CreateListOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForListEntityTypeOutput"); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationRemoveReferenceBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationRemoveReferenceBehaviour.etl index be7e35b6..1e18b231 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationRemoveReferenceBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationRemoveReferenceBehaviour.etl @@ -5,10 +5,10 @@ import "../../../../operations/_importAll.eol"; rule CreateRemoveReferenceOperationForEntityType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundOperation { - guard: generateBehaviours and s.isRemoveReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isRemoveReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateRemoveReferenceOperationForEntityType"); - t.instanceRepresentation = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.eContainer.getPSMEquivalent(); t.name = "removeReferencesFromRelation" + s.getFqName().fqNameToCamelCase(); s.eContainer.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateRemoveReferenceOperationForEntityType: " + t.name); @@ -18,7 +18,7 @@ rule CreateRemoveReferenceOperationForEntityType rule CreateRemoveReferenceBehaviourForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!TransferOperationBehaviour { - guard: generateBehaviours and s.isRemoveReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isRemoveReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateRemoveReferenceBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#REMOVE_REFERENCE; @@ -30,7 +30,7 @@ rule CreateRemoveReferenceBehaviourForTransferType rule CreateRemoveReferenceOperationForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundTransferOperation { - guard: generateBehaviours and s.isRemoveReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isRemoveReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateRemoveReferenceOperationForTransferType"); t.name = "removeReferencesFrom" + s.name.firstToUpperCase(); @@ -43,7 +43,7 @@ rule CreateRemoveReferenceOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateRemoveReferenceOperationForTransferType: " + t.name); } @@ -52,7 +52,7 @@ rule CreateRemoveReferenceOperationForTransferType rule CreateRemoveReferenceOperationForTransferTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.isRemoveReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isRemoveReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateRemoveReferenceOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForRemoveReferenceTransferTypeInput"); @@ -66,7 +66,7 @@ rule CreateRemoveReferenceOperationForTransferTypeInputParameter rule CreateRemoveReferenceOperationForEntityTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.isRemoveReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isRemoveReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateRemoveReferenceOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForRemoveReferenceEntityTypeInput"); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationSetReferenceBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationSetReferenceBehaviour.etl index 487474f2..f35d852e 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationSetReferenceBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationSetReferenceBehaviour.etl @@ -5,10 +5,10 @@ import "../../../../operations/_importAll.eol"; rule CreateSetReferenceOperationForEntityType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundOperation { - guard: generateBehaviours and s.isSetReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isSetReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateSetReferenceOperationForEntityType"); - t.instanceRepresentation = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.eContainer.getPSMEquivalent(); t.name = "setReferencesOfRelation" + s.getFqName().fqNameToCamelCase(); s.eContainer.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateSetReferenceOperationForEntityType: " + t.name); @@ -18,7 +18,7 @@ rule CreateSetReferenceOperationForEntityType rule CreateSetReferenceBehaviourForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!TransferOperationBehaviour { - guard: generateBehaviours and s.isSetReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isSetReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateSetReferenceBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#SET_REFERENCE; @@ -30,7 +30,7 @@ rule CreateSetReferenceBehaviourForTransferType rule CreateSetReferenceOperationForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundTransferOperation { - guard: generateBehaviours and s.isSetReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isSetReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateSetReferenceOperationForTransferType"); t.name = "setReferencesOf" + s.name.firstToUpperCase(); @@ -44,7 +44,7 @@ rule CreateSetReferenceOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateSetReferenceOperationForTransferType: " + t.name); } @@ -53,7 +53,7 @@ rule CreateSetReferenceOperationForTransferType rule CreateSetReferenceOperationForTransferTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.isSetReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isSetReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateSetReferenceOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForSetReferenceTransferTypeInput"); @@ -67,7 +67,7 @@ rule CreateSetReferenceOperationForTransferTypeInputParameter rule CreateSetReferenceOperationForEntityTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.isSetReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isSetReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateSetReferenceOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForSetReferenceEntityTypeInput"); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationUnsetReferenceBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationUnsetReferenceBehaviour.etl index 99050e12..fb37acfc 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationUnsetReferenceBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationUnsetReferenceBehaviour.etl @@ -5,10 +5,10 @@ import "../../../../operations/_importAll.eol"; rule CreateUnsetReferenceOperationForEntityType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundOperation { - guard: generateBehaviours and s.isUnsetReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isUnsetReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateUnsetReferenceOperationForEntityType"); - t.instanceRepresentation = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.eContainer.getPSMEquivalent(); t.name = "unsetReferencesOfRelation" + s.getFqName().fqNameToCamelCase(); s.eContainer.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateUnsetReferenceOperationForEntityType: " + t.name); @@ -18,7 +18,7 @@ rule CreateUnsetReferenceOperationForEntityType rule CreateUnsetReferenceBehaviourForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!TransferOperationBehaviour { - guard: generateBehaviours and s.isUnsetReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isUnsetReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateUnsetReferenceBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#UNSET_REFERENCE; @@ -30,7 +30,7 @@ rule CreateUnsetReferenceBehaviourForTransferType rule CreateUnsetReferenceOperationForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundTransferOperation { - guard: generateBehaviours and s.isUnsetReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isUnsetReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateUnsetReferenceOperationForTransferType"); t.name = "unsetReferencesOf" + s.name.firstToUpperCase(); @@ -44,7 +44,7 @@ rule CreateUnsetReferenceOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateUnsetReferenceOperationForTransferType: " + t.name); } @@ -53,7 +53,7 @@ rule CreateUnsetReferenceOperationForTransferType rule CreateUnsetReferenceOperationForTransferTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.isUnsetReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isUnsetReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateUnsetReferenceOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForUnsetReferenceTransferTypeInput"); @@ -67,7 +67,7 @@ rule CreateUnsetReferenceOperationForTransferTypeInputParameter rule CreateUnsetReferenceOperationForEntityTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and s.isUnsetReferenceAllowed() + guard: generateBehaviours and not s.isActorRelated() and s.isUnsetReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateUnsetReferenceOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForUnsetReferenceEntityTypeInput"); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationValidateCreateBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationValidateCreateBehaviour.etl index 7141de46..17417a15 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationValidateCreateBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/relationValidateCreateBehaviour.etl @@ -5,10 +5,10 @@ import "../../../../operations/_importAll.eol"; rule CreateValidateCreateOperationForEntityType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundOperation { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateValidateCreateOperationForEntityType"); - t.instanceRepresentation = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.eContainer.getPSMEquivalent(); t.name = "validate" + s.referenceType.getCreateEventInsteadOf().name.firstToUpperCase() + "ForRelation" + s.getFqName().fqNameToCamelCase(); s.eContainer.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateValidateCreateOperationForEntityType: " + t.name); @@ -18,7 +18,7 @@ rule CreateValidateCreateOperationForEntityType rule CreateValidateCreateBehaviourForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!TransferOperationBehaviour { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateValidateCreateBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#VALIDATE_CREATE; @@ -30,7 +30,7 @@ rule CreateValidateCreateBehaviourForTransferType rule CreateValidateCreateOperationForTransferType transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!BoundTransferOperation { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateValidateCreateOperationForTransferType"); t.name = "validate" + s.referenceType.getCreateEventInsteadOf().name.firstToUpperCase() + "Of" + s.name.firstToUpperCase(); @@ -44,7 +44,7 @@ rule CreateValidateCreateOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateValidateCreateOperationForTransferType: " + t.name); } @@ -53,7 +53,7 @@ rule CreateValidateCreateOperationForTransferType rule CreateValidateCreateOperationForTransferTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateValidateCreateOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForValidateCreateTransferTypeInput"); @@ -67,7 +67,7 @@ rule CreateValidateCreateOperationForTransferTypeInputParameter rule CreateValidateCreateOperationForTransferTypeOutputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateValidateCreateOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForValidateCreateTransferTypeOutput"); @@ -81,7 +81,7 @@ rule CreateValidateCreateOperationForTransferTypeOutputParameter rule CreateValidateCreateOperationForEntityTypeInputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateValidateCreateOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForValidateCreateEntityTypeInput"); @@ -95,7 +95,7 @@ rule CreateValidateCreateOperationForEntityTypeInputParameter rule CreateValidateCreateOperationForEntityTypeOutputParameter transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!Parameter { - guard: generateBehaviours and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() + guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) and s.referenceType.isCreateSupported() and s.isCreateAllowed() t.setId("(jsl/" + s.getId() + ")/CreateValidateCreateOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForValidateCreateEntityTypeOutput"); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/updateBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/updateBehaviour.etl index b2932478..2f48c864 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/updateBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/updateBehaviour.etl @@ -9,7 +9,7 @@ rule CreateUpdateOperationForEntityType guard: generateBehaviours and s.instead ?: false t.setId("(jsl/" + s.getId() + ")/CreateUpdateOperationForEntityType"); - t.instanceRepresentation = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.eContainer.getPSMEquivalent(); t.name = s.name + s.eContainer.getFqName().fqNameToCamelCase(); s.eContainer.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateUpdateOperationForEntityType: " + t.name); @@ -23,7 +23,7 @@ rule CreateUpdateBehaviourForTransferType t.setId("(jsl/" + s.getId() + ")/CreateUpdateBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#UPDATE_INSTANCE; - t.owner = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.owner = s.eContainer.getPSMEquivalent(); log.debug("Created CreateUpdateBehaviourForTransferType: " + s.name); } @@ -37,7 +37,7 @@ rule CreateUpdateOperationForTransferType t.name = s.name; t.binding = s.equivalent("CreateUpdateOperationForEntityType"); t.behaviour = s.equivalent("CreateUpdateBehaviourForTransferType"); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateUpdateOperationForTransferType: " + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/validateUpdateBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/validateUpdateBehaviour.etl index f7cd3932..0be34b03 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/validateUpdateBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/validateUpdateBehaviour.etl @@ -9,7 +9,7 @@ rule CreateValidateUpdateOperationForEntityType guard: generateBehaviours and s.instead ?: false t.setId("(jsl/" + s.getId() + ")/CreateValidateUpdateOperationForEntityType"); - t.instanceRepresentation = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.instanceRepresentation = s.eContainer.getPSMEquivalent(); t.name = "validate" + s.name.firstToUpperCase() + s.eContainer.getFqName().fqNameToCamelCase(); s.eContainer.map.entity.getPSMEquivalent().operations.add(t); log.debug("Created CreateValidateUpdateOperationForEntityType: " + t.name); @@ -23,7 +23,7 @@ rule CreateValidateUpdateBehaviourForTransferType t.setId("(jsl/" + s.getId() + ")/CreateValidateUpdateBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#VALIDATE_UPDATE; - t.owner = s.eContainer.equivalent("CreateMappedTransferObjectType"); + t.owner = s.eContainer.getPSMEquivalent(); log.debug("Created CreateValidateUpdateBehaviourForTransferType: " + s.name); } @@ -40,7 +40,7 @@ rule CreateValidateUpdateOperationForTransferType } t.binding = s.equivalent("CreateValidateUpdateOperationForEntityType"); t.behaviour = s.equivalent("CreateValidateUpdateBehaviourForTransferType"); - s.eContainer.equivalent("CreateMappedTransferObjectType").operations.add(t); + s.eContainer.getPSMEquivalent().operations.add(t); log.debug("Created CreateValidateUpdateOperationForTransferType: " + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationTransferObjectType.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationTransferObjectType.etl index c6695dd0..b3f0a67e 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationTransferObjectType.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationTransferObjectType.etl @@ -8,7 +8,7 @@ import "../../../../operations/_importAll.eol"; rule CreateUnmappedTransferObjectType transform s: JSL!TransferDeclaration to t: JUDOPSM!UnmappedTransferObjectType { - guard: s.map.isUndefined() + guard: s.map.isUndefined() and not s.isActorRelated() t.setId("(jsl/" + s.getId() + ")/CreateUnmappedTransferObjectType"); @@ -27,7 +27,7 @@ rule CreateUnmappedTransferObjectType rule CreateMappedTransferObjectType transform s: JSL!TransferDeclaration to t: JUDOPSM!MappedTransferObjectType { - guard: s.map.isDefined() + guard: s.map.isDefined() and not s.isActorRelated() t.setId("(jsl/" + s.getId() + ")/CreateMappedTransferObjectType"); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationTransferRelation.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationTransferRelation.etl index 936e8b3f..c1cc3f82 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationTransferRelation.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationTransferRelation.etl @@ -32,7 +32,7 @@ rule CreateTransientTransferObjectRelationForTransferRelationDeclaration transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!TransferObjectRelation extends AbstractCreateTransferObjectRelationForTransferRelationDeclaration { - guard: not s.maps() and not s.reads() + guard: not s.maps() and not s.reads() and not s.isActorRelated() t.setId("(jsl/" + s.getId() + ")/CreateTransientTransferObjectRelationForTransferRelationDeclaration"); t.cardinality = s.equivalentDiscriminated("CreateCardinalityForTransferRelationDeclaration", t.getId()); @@ -55,7 +55,7 @@ rule CreateDerivedTransferObjectEmbeddedRelationForTransferRelationDeclaration transform s : JSL!TransferRelationDeclaration to t : JUDOPSM!TransferObjectRelation extends AbstractCreateTransferObjectRelationForTransferRelationDeclaration { - guard: s.reads() + guard: s.reads() and not s.isActorRelated() t.setId("(jsl/" + s.getId() + ")/CreateDerivedTransferObjectEmbeddedRelationForTransferRelationDeclaration"); t.cardinality = s.equivalentDiscriminated("CreateCardinalityForTransferRelationDeclaration", t.getId()); @@ -75,7 +75,7 @@ rule CreateMappedTransferObjectEmbeddedRelationForTransferRelationDeclaration transform s : JSL!TransferRelationDeclaration to t : JUDOPSM!TransferObjectRelation extends AbstractCreateTransferObjectRelationForTransferRelationDeclaration { - guard: s.maps() + guard: s.maps() and not s.isActorRelated() t.setId("(jsl/" + s.getId() + ")/CreateMappedTransferObjectEmbeddedRelationForTransferRelationDeclaration"); t.cardinality = s.equivalentDiscriminated("CreateCardinalityForTransferRelationDeclaration", t.getId()); diff --git a/judo-tatami-jsl-jsl2psm/src/test/resources/actor/ActorTestModel.jsl b/judo-tatami-jsl-jsl2psm/src/test/resources/actor/ActorTestModel.jsl index da3064d5..66e34116 100644 --- a/judo-tatami-jsl-jsl2psm/src/test/resources/actor/ActorTestModel.jsl +++ b/judo-tatami-jsl-jsl2psm/src/test/resources/actor/ActorTestModel.jsl @@ -17,7 +17,7 @@ transfer UserTransfer maps User as u { field String email <= u.email update: true; } -actor Actor maps User as u +actor Actor realm: "COMPANY" claim: "email" identity: UserTransfer::email