From 40209886f14c1c1e583e2bd922f1511af62f568f Mon Sep 17 00:00:00 2001 From: Robert Csakany Date: Fri, 2 Feb 2024 01:35:22 +0100 Subject: [PATCH] Rename equivalent methods --- .../epsilon/operations/jsl/action/action.eol | 6 +-- .../jsl/data/actorAccessDeclaration.eol | 2 +- .../operations/jsl/data/actorDeclaration.eol | 40 +++++++++++++++---- .../operations/jsl/data/entityDeclaration.eol | 4 +- .../operations/jsl/data/modelDeclaration.eol | 2 +- .../jsl/data/primitiveDeclaration.eol | 2 +- .../jsl/data/transferCreateDeclaration.eol | 4 -- .../jsl/data/transferDeclaration.eol | 4 +- .../jsl/data/transferDeleteDeclaration.eol | 8 ++-- .../jsl/data/transferFieldDeclaration.eol | 2 +- .../jsl/data/transferRelationDeclaration.eol | 2 +- .../jsl/data/transferUpdateDeclaration.eol | 8 ++-- .../epsilon/transformations/psm/jslToPsm.etl | 4 +- .../psm/modules/action/action.etl | 30 +++++++------- .../psm/modules/action/deleteBehaviour.etl | 8 ++-- .../action/getActionInputRangeBehaviour.etl | 16 ++++---- .../modules/action/getTemplateBehaviour.etl | 6 +-- .../action/getUploadTokenBehaviour.etl | 4 +- .../psm/modules/action/refreshBehaviour.etl | 12 +++--- .../action/relationAddReferenceBehaviour.etl | 10 ++--- .../action/relationCreateBehaviour.etl | 14 +++---- .../relationGetRangeReferenceBehaviour.etl | 10 ++--- .../modules/action/relationListBehaviour.etl | 10 ++--- .../relationRemoveReferenceBehaviour.etl | 10 ++--- .../action/relationSetReferenceBehaviour.etl | 10 ++--- .../relationUnsetReferenceBehaviour.etl | 10 ++--- .../relationValidateCreateBehaviour.etl | 14 +++---- .../psm/modules/action/updateBehaviour.etl | 16 ++++---- .../action/validateUpdateBehaviour.etl | 16 ++++---- .../psm/modules/data/association.etl | 8 ++-- .../psm/modules/data/containment.etl | 16 ++++---- .../psm/modules/data/entityType.etl | 2 +- .../modules/data/primitiveTypedElement.etl | 20 +++++----- .../psm/modules/data/query.etl | 20 ++++++---- .../psm/modules/derived/dataProperty.etl | 4 +- .../psm/modules/derived/entityQuery.etl | 4 +- .../modules/derived/navigationProperty.etl | 4 +- ...ityDeclarationDefaultTransferAttribute.etl | 16 ++++++-- ...tyDeclarationDefaultTransferObjectType.etl | 2 +- .../transferDeclarationQueryCustomizer.etl | 2 +- .../transferDeclarationTransferAttribute.etl | 20 +++++----- .../transferDeclarationTransferObjectType.etl | 2 +- .../transferDeclarationTransferRelation.etl | 32 +++++++-------- .../test/resources/actor/ActorTestModel.jsl | 4 +- 44 files changed, 237 insertions(+), 203 deletions(-) diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/action/action.eol b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/action/action.eol index 09c7ffa2..9bf23a65 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/action/action.eol +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/action/action.eol @@ -26,7 +26,7 @@ operation JSL!TransferActionDeclaration getFqName(): String { } @cached -operation JSL!TransferActionDeclaration getPSMRangeEquivalent(): JUDOPSM!ReferenceAccessor { +operation JSL!TransferActionDeclaration getTransferActionRangeEquivalent(): JUDOPSM!ReferenceAccessor { var choice = self.modifiers.selectOne(m | m.isTypeOf(JSL!TransferChoiceModifier)); if (choice.isDefined() and self.eContainer.map.isDefined()) { @@ -40,7 +40,7 @@ operation JSL!TransferActionDeclaration getPSMRangeEquivalent(): JUDOPSM!Referen @cached -operation JSL!TransferActionDeclaration getPSMOperationEquivalent(): JUDOPSM!OperationDeclaration { +operation JSL!TransferActionDeclaration getOperationDeclarationEquivalent(): JUDOPSM!OperationDeclaration { if (self.eContainer.map.isUndefined()) { return self.equivalent("CreateUnboundOperationForUnmappedTransferObjectType"); @@ -54,7 +54,7 @@ operation JSL!TransferActionDeclaration getPSMOperationEquivalent(): JUDOPSM!Ope } @cached -operation JSL!TransferActionDeclaration getPSMBehaviourOperationEquivalent(): JUDOPSM!OperationDeclaration { +operation JSL!TransferActionDeclaration getBehaviourOperationDeclarationEquivalent(): JUDOPSM!OperationDeclaration { if (self.eContainer.map.isDefined()) { return self.equivalent("CreateGetRangeActionInputOperationForMappedTransferType"); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/actorAccessDeclaration.eol b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/actorAccessDeclaration.eol index e2c94363..c51d91c8 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/actorAccessDeclaration.eol +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/actorAccessDeclaration.eol @@ -80,7 +80,7 @@ operation JSL!ActorAccessDeclaration isGetRangeSupported() : Boolean { } @cached -operation JSL!ActorAccessDeclaration getPSMRangeEquivalent(): JUDOPSM!ReferenceAccessor { +operation JSL!ActorAccessDeclaration getTransferActionRangeEquivalent(): JUDOPSM!ReferenceAccessor { var choice = self.modifiers.selectOne(m | m.isTypeOf(JSL!TransferChoiceModifier)); if (choice.isDefined() and self.eContainer.map.isDefined()) { diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/actorDeclaration.eol b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/actorDeclaration.eol index c636f4d7..1e3ab44f 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/actorDeclaration.eol +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/actorDeclaration.eol @@ -8,14 +8,38 @@ operation JSL!ActorDeclaration getFqName(): String { return self.eContainer.getFqName() + "::" + self.name; } -/* - @cached -operation JSL!ActorDeclaration getPSMEquivalent(): JUDOPSM!TransferObjectType { - if (self.map.isUndefined()) { - return self.equivalent("CreateUnmappedActorTransferObjectType"); - } else { - return self.equivalent("CreateMappedActorTransferObjectType"); +operation JSL!ActorDeclaration getActorDeclarationEquivalent(): JUDOPSM!TransferObjectType { + if (self.getPrincipal().isDefined() and not self.getPrincipal().map.isDefined()) { + return self.equivalent("CreateActorType"); + } else if (self.getPrincipal().isDefined() and self.getPrincipal().map.isDefined()) { + return self.equivalent("CreateMappedActorType"); + } else if (self.getPrincipal().isUndefined()) { + return self.equivalent("CreateActorTypeWithoutPrincipal"); } } -*/ \ No newline at end of file + +@cached +operation JSL!ActorDeclaration getIdentity(): JSL!IdentityModifier { + return self.modifiers.selectOne(m | m.isTypeOf(JSL!IdentityModifier)); +} + +@cached +operation JSL!ActorDeclaration getRealm(): JSL!RealmModifier { + return self.modifiers.selectOne(m | m.isTypeOf(JSL!RealmModifier)); +} + +@cached +operation JSL!ActorDeclaration getClaim(): JSL!ClaimModifier { + return self.modifiers.selectOne(m | m.isTypeOf(JSL!ClaimModifier)); +} + +@cached +operation JSL!ActorDeclaration getGuard(): JSL!GuardModifier { + return self.modifiers.selectOne(m | m.isTypeOf(JSL!GuardModifier)); +} + +@cached +operation JSL!ActorDeclaration getPrincipal(): JSL!TransferDeclaration { + return self.getIdentity()?.field?.eContainer; +} diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/entityDeclaration.eol b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/entityDeclaration.eol index e84c4b1c..717ae272 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/entityDeclaration.eol +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/entityDeclaration.eol @@ -1,5 +1,5 @@ @cached -operation JSL!EntityDeclaration getPSMEquivalent(): JUDOPSM!EntityType { +operation JSL!EntityDeclaration getEntityDeclarationEquivalent(): JUDOPSM!EntityType { return self.equivalent("CreateEntityType"); } @@ -10,7 +10,7 @@ operation JSL!EntityDeclaration getId(): String { @cached operation JSL!EntityDeclaration getModelRoot(): JUDOPSM!Package { - return self.getPsmEquivalent().getModelRoot(); + return self.getEntityDeclarationEquivalent().getModelRoot(); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/modelDeclaration.eol b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/modelDeclaration.eol index 0ccab4fc..4e1e6038 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/modelDeclaration.eol +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/modelDeclaration.eol @@ -1,5 +1,5 @@ @cached -operation JSL!ModelDeclaration getPSMEquivalent(): JUDOPSM!Model { +operation JSL!ModelDeclaration getModelDeclarationEquivalent(): JUDOPSM!Model { return defaultModelName.equivalent("CreateRootModel"); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/primitiveDeclaration.eol b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/primitiveDeclaration.eol index 2ea59742..cc5e3dc0 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/primitiveDeclaration.eol +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/primitiveDeclaration.eol @@ -1,5 +1,5 @@ @cached -operation JSL!PrimitiveDeclaration getPSMEquivalent(): JUDOPSM!Primitive { +operation JSL!PrimitiveDeclaration getPrimitiveDeclarationEquivalent(): JUDOPSM!Primitive { if (self.primitive.isDefined()) { var byName = self.eContainer.name.equivalent("CreateModelPackages").elements.selectOne(e | e.name == self.name); if (byName.isDefined()) { diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferCreateDeclaration.eol b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferCreateDeclaration.eol index bca2b547..43bdf017 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferCreateDeclaration.eol +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferCreateDeclaration.eol @@ -3,9 +3,5 @@ operation JSL!TransferCreateDeclaration getId(): String { return (self.eContainer.getId() + "/" + self.name); } -@cached -operation JSL!TransferCreateDeclaration getModelRoot(): JUDOPSM!Package { - return self.getPSMEquivalent().eContainer().getModelRoot(); -} 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 56988896..684c0798 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 @@ -1,5 +1,5 @@ @cached -operation JSL!TransferDeclaration getPSMEquivalent(): JUDOPSM!TransferObjectType { +operation JSL!TransferDeclaration getTransferDeclarationEquivalent(): JUDOPSM!TransferObjectType { if (self.map.isUndefined()) { return self.equivalent("CreateUnmappedTransferObjectType"); } else { @@ -14,7 +14,7 @@ operation JSL!TransferDeclaration getId(): String { @cached operation JSL!TransferDeclaration getModelRoot(): JUDOPSM!Package { - return self.getPSMEquivalent().eContainer().getModelRoot(); + return self.getTransferDeclarationEquivalent().eContainer().getModelRoot(); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferDeleteDeclaration.eol b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferDeleteDeclaration.eol index 909dc195..bda97263 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferDeleteDeclaration.eol +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferDeleteDeclaration.eol @@ -3,9 +3,9 @@ operation JSL!TransferDeleteDeclaration getId(): String { return (self.eContainer.getId() + "/" + self.name); } -@cached -operation JSL!TransferDeleteDeclaration getModelRoot(): JUDOPSM!Package { - return self.getPSMEquivalent().eContainer().getModelRoot(); -} +//@cached +//operation JSL!TransferDeleteDeclaration getModelRoot(): JUDOPSM!Package { +// return self.getPSMEquivalent().eContainer().getModelRoot(); +//} diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferFieldDeclaration.eol b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferFieldDeclaration.eol index c8cd541f..ee6d4e93 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferFieldDeclaration.eol +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferFieldDeclaration.eol @@ -55,7 +55,7 @@ operation JSL!TransferFieldDeclaration isGetUploadTokenSupported(): Boolean { @cached -operation JSL!TransferFieldDeclaration getPSMEquivalent() : JUDOPSM!TransferAttribute { +operation JSL!TransferFieldDeclaration getTransferFieldDeclarationEquivalent() : JUDOPSM!TransferAttribute { if (not self.maps() and not self.reads()) { return self.equivalent("CreateTransientTransferAttribute"); } 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 6062bdd8..c8ddc7ee 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 @@ -78,7 +78,7 @@ operation JSL!TransferRelationDeclaration isGetRangeSupported() : Boolean { } @cached -operation JSL!TransferRelationDeclaration getPSMRangeEquivalent(): JUDOPSM!ReferenceAccessor { +operation JSL!TransferRelationDeclaration getTransferActionRangeEquivalent(): JUDOPSM!ReferenceAccessor { var choice = self.modifiers.selectOne(m | m.isTypeOf(JSL!TransferChoiceModifier)); if (choice.isDefined() and self.eContainer.map.isDefined()) { diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferUpdateDeclaration.eol b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferUpdateDeclaration.eol index dd7d9ddd..23313f93 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferUpdateDeclaration.eol +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/transferUpdateDeclaration.eol @@ -3,9 +3,9 @@ operation JSL!TransferUpdateDeclaration getId(): String { return (self.eContainer.getId() + "/" + self.name); } -@cached -operation JSL!TransferUpdateDeclaration getModelRoot(): JUDOPSM!Package { - return self.getPSMEquivalent().eContainer().getModelRoot(); -} +//@cached +//operation JSL!TransferUpdateDeclaration getModelRoot(): JUDOPSM!Package { +// return self.getPSMEquivalent().eContainer().getModelRoot(); +//} diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/jslToPsm.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/jslToPsm.etl index 1d9bf196..055a76d4 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/jslToPsm.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/jslToPsm.etl @@ -59,10 +59,10 @@ post { // Collect primitive types which are not directly referenced as field types for (c in JSL!NavigationBaseDeclarationReference.all().select(n | n.reference.isKindOf(JSL!PrimitiveDeclaration))) { - var dummy = c.reference.getPSMEquivalent(); + var dummy = c.reference.getPrimitiveDeclarationEquivalent(); } for (c in JSL!QueryParameterDeclaration.all()) { - var dummy = c.referenceType.getPSMEquivalent(); + var dummy = c.referenceType.getPrimitiveDeclarationEquivalent(); } var enumsWithoutOrdinal = JUDOPSM!EnumerationMember.all.select(m | m.ordinal == -1).collect(m | m.eContainer).flatten().asSet(); 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 4584d084..309f716d 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 @@ -48,7 +48,7 @@ rule AbstractTransferActionDeclarationReturnParameter t.cardinality = s.equivalent("CreateCardinalityForTransferActionDeclarationOutput"); t.name = "return"; - t.type = s.`return`.getPSMEquivalent(); + t.type = s.`return`.getTransferDeclarationEquivalent(); } @abstract @@ -59,7 +59,7 @@ rule AbstractTransferActionDeclarationInputParameter t.cardinality = s.equivalent("CreateCardinalityForTransferActionDeclarationInput"); t.name = s.paramaterName; - t.type = s.parameterType.getPSMEquivalent(); + t.type = s.parameterType.getTransferDeclarationEquivalent(); } @@ -141,7 +141,7 @@ rule CreateUnboundOperationForMappedTransferObjectType guard: s.eContainer.map.isDefined() and s.static t.setId("(jsl/" + s.getId() + ")/CreateUnboundOperationForMappedTransferObjectType"); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateUnboundOperationForMappedTransferObjectType: " + t.name); } @@ -182,14 +182,14 @@ rule CreateBoundOperationForEntityType t.`abstract` = false; t.implementation = s.equivalent("CreateEmptyOperationBody"); - t.instanceRepresentation = s.eContainer.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = s.name + s.eContainer.getFqName().fqNameToCamelCase(); for (error in s.errors) { t.faults.add(error.equivalentDiscriminated("CreateFaultParameter", s.getId() + "/Entity")); } - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().operations.add(t); log.debug("Created CreateBoundOperationForEntity: " + t.name); } @@ -205,7 +205,7 @@ rule CreateBoundOperationForEntityTypeInputParameter t.cardinality = s.equivalent("CreateCardinalityForTransferActionDeclarationEntityInput"); t.name = s.paramaterName; - t.type = s.parameterType.getPSMEquivalent(); + t.type = s.parameterType.getTransferDeclarationEquivalent(); s.equivalent("CreateBoundOperationForEntityType").input = t; log.debug("Created CreateBoundOperationForEntityTypeInputParameter: " + t.name); @@ -222,7 +222,7 @@ rule CreateBoundOperationForEntityTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateBoundOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForTransferActionDeclarationEntityOutput"); t.name = "return"; - t.type = s.`return`.getPSMEquivalent(); + t.type = s.`return`.getTransferDeclarationEquivalent(); s.equivalent("CreateBoundOperationForEntityType").output = t; log.debug("Created CreateBoundOperationForEntityTypeOutputParameter: " + t.name); } @@ -238,7 +238,7 @@ rule CreateBoundOperationForMappedTransferObjectType t.setId("(jsl/" + s.getId() + ")/CreateBoundOperationForMappedTransferObjectType"); t.binding = s.equivalent("CreateBoundOperationForEntityType"); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateBoundOperationForMappedTransferObjectType: " + t.name); } @@ -349,9 +349,9 @@ rule CreateActionInputParameterRangeNavigationPropertyForMappedTransferActionDec t.setId("(jsl/" + s.eContainer.getId() + ")/CreateActionInputParameterRangeNavigationPropertyForMappedTransferActionDeclaration"); t.name = defaultActionInputParameterRangeNamePrefix + s.eContainer.name + defaultActionInputParameterRangeNameMidfix + s.eContainer.eContainer.name + defaultActionInputParameterRangeNamePostfix; - t.target = s.eContainer.getParameterType().getPSMEquivalent().entityType; + t.target = s.eContainer.getParameterType().getTransferDeclarationEquivalent().entityType; t.cardinality = s.eContainer.equivalentDiscriminated("CreateCardinalityForGetActionInputParameterRangeEntityRelation", t.getId()); - s.eContainer.eContainer.map.entity.getPSMEquivalent().navigationProperties.add(t); + s.eContainer.eContainer.map.entity.getEntityDeclarationEquivalent().navigationProperties.add(t); log.debug("Created NavigationProperty for Transfer Object Default Value: " + s); } @@ -377,7 +377,7 @@ rule CreateActionInputParameterRangeStaticNavigationForUnmappedTransferActionDec t.setId("(jsl/" + s.eContainer.getId() + ")/CreateActionInputParameterRangeStaticNavigationForUnmappedTransferActionDeclaration"); t.name = defaultActionInputParameterRangeNamePrefix + s.eContainer.name + defaultActionInputParameterRangeNameMidfix + s.eContainer.eContainer.name + defaultActionInputParameterRangeNamePostfix; - t.target = s.eContainer.getParameterType().getPSMEquivalent().entityType; + t.target = s.eContainer.getParameterType().getTransferDeclarationEquivalent().entityType; t.cardinality = s.eContainer.equivalentDiscriminated("CreateCardinalityForGetActionInputParameterRangeEntityRelation", t.getId()); s.eContainer.eContainer.eContainer.getModelRoot().elements.add(t); @@ -394,12 +394,12 @@ rule CreateActionInputParameterRangeTransferObjectRelation t.setId("(esm/" + s.getId() + ")/CreateActionInputParameterRangeTransferObjectRelation"); - t.name = s.eContainer.getPSMRangeEquivalent().name; + t.name = s.eContainer.getTransferActionRangeEquivalent().name; t.cardinality = s.eContainer.equivalent("CreateCardinalityForGetActionInputParameterRangeTransferObjectRelation"); - t.target = s.eContainer.getParameterType().getPSMEquivalent(); - t.binding = s.eContainer.getPSMRangeEquivalent(); + t.target = s.eContainer.getParameterType().getTransferDeclarationEquivalent(); + t.binding = s.eContainer.getTransferActionRangeEquivalent(); - s.eContainer.eContainer.getPSMEquivalent().relations.add(t); + s.eContainer.eContainer.getTransferDeclarationEquivalent().relations.add(t); } 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 fd48c03f..b919c693 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,9 +8,9 @@ rule CreateDeleteOperationForEntityType guard: generateBehaviours and s.instead ?: false t.setId("(jsl/" + s.getId() + ")/CreateDeleteOperationForEntityType"); - t.instanceRepresentation = s.eContainer.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = s.name + s.eContainer.getFqName().fqNameToCamelCase(); - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().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.getPSMEquivalent(); + t.owner = s.eContainer.getTransferDeclarationEquivalent(); 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.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().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 b391e029..d1b4fb6c 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,9 +8,9 @@ rule CreateGetRangeActionInputOperationForEntityType guard: generateBehaviours and s.parameterType?.map.isDefined() and s.eContainer.map.isDefined() t.setId("(jsl/" + s.getId() + ")/CreateGetRangeActionInputOperationForEntityType"); - t.instanceRepresentation = s.eContainer.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = "getRangeForRelation" + s.getFqName().fqNameToCamelCase(); - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().operations.add(t); log.debug("Created CreateGetRangeActionInputOperationForEntityType: " + t.name); } @@ -24,7 +24,7 @@ rule CreateGetRangeActionInputBehaviourForTransferType t.behaviourType = JUDOPSM!TransferOperationBehaviourType#GET_RANGE; // t.owner = s.equivalent("CreateDerivedTransferObjectEmbeddedRelationForTransferRelationDeclaration"); //t.owner = s.modifiers.selectOne(m | m.isTypeOf(JSL!TransferChoiceModifier)).equivalent("CreateActionInputParameterRangeTransferObjectRelation"); - t.owner = s.getPSMOperationEquivalent(); + t.owner = s.getOperationDeclarationEquivalent(); log.debug("Created CreateGetRangeActionInputBehaviourForTransferType: " + s.name); } @@ -47,7 +47,7 @@ rule CreateGetRangeActionInputOperationForMappedTransferType //t.updateOnResult = s.referenceType.isUpdateSupported(); //t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateGetRangeActionInputOperationForMappedTransferType: " + t.name); } @@ -81,7 +81,7 @@ rule CreateGetRangeActionInputOperationForTransferTypeInputParameter t.name = "input"; t.type = s.parameterType.equivalent("CreateQueryCustomizerType"); // s.equivalent("CreateGetRangeActionInputOperationForTransferType").input = t; - s.getPSMBehaviourOperationEquivalent().input = t; + s.getBehaviourOperationDeclarationEquivalent().input = t; log.debug("Created CreateGetRangeActionInputOperationForTransferTypeInputParameter: " + t.name); } @@ -94,9 +94,9 @@ rule CreateGetRangeActionInputOperationForTransferTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateGetRangeActionInputOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForGetRangeActionInputTransferTypeOutput"); t.name = "return"; - t.type = s.parameterType.getPSMEquivalent(); + t.type = s.parameterType.getTransferDeclarationEquivalent(); //s.equivalent("CreateGetRangeActionInputOperationForTransferType").output = t; - s.getPSMBehaviourOperationEquivalent().output = t; + s.getBehaviourOperationDeclarationEquivalent().output = t; log.debug("Created CreateGetRangeActionInputOperationForTransferTypeOutputParameter: " + t.name); } @@ -123,7 +123,7 @@ rule CreateGetRangeActionInputOperationForEntityTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateGetRangeActionInputOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForGetRangeActionInputEntityTypeOutput"); t.name = "return"; - t.type = s.parameterType.getPSMEquivalent(); + t.type = s.parameterType.getTransferDeclarationEquivalent(); s.equivalent("CreateGetRangeActionInputOperationForEntityType").output = t; log.debug("Created CreateGetRangeActionInputOperationForEntityTypeOutputParameter: " + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/getTemplateBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/getTemplateBehaviour.etl index c160b4de..58da7ed3 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/getTemplateBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/getTemplateBehaviour.etl @@ -10,7 +10,7 @@ rule CreateGetTemplateBehaviourForTransferType t.setId("(jsl/" + s.getId() + ")/CreateGetTemplateBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#GET_TEMPLATE; - t.owner = s.getPSMEquivalent(); + t.owner = s.getTransferDeclarationEquivalent(); log.debug("Created CreateGetTemplateBehaviourForTransferType: " + s.name); } @@ -29,7 +29,7 @@ rule CreateGetTemplateOperationForTransferType t.immutable = true; t.behaviour = s.equivalent("CreateGetTemplateBehaviourForTransferType"); - s.getPSMEquivalent().operations.add(t); + s.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateGetTemplateOperationForTransferType: " + t.name); } @@ -43,7 +43,7 @@ rule CreateGetTemplateOperationForTransferTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateGetTemplateOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForGetTemplateTransferTypeOutput"); t.name = "return"; - t.type = s.getPSMEquivalent(); + t.type = s.getTransferDeclarationEquivalent(); s.equivalent("CreateGetTemplateOperationForTransferType").output = t; log.debug("Created CreateGetTemplateOperationForTransferTypeOutputParameter: " + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/getUploadTokenBehaviour.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/getUploadTokenBehaviour.etl index 89b9e09a..7c65502d 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/getUploadTokenBehaviour.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/action/getUploadTokenBehaviour.etl @@ -42,7 +42,7 @@ rule CreateGetUploadTokenBehaviour t.setId("(jsl/" + s.getId() + ")/CreateGetUploadTokenOperation"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#GET_UPLOAD_TOKEN; - t.owner = s.getPSMEquivalent(); + t.owner = s.getTransferFieldDeclarationEquivalent(); log.debug("Created CreateGetUploadTokenBehaviour: " + s.name); } @@ -61,7 +61,7 @@ rule CreateGetUploadTokenOperation t.behaviour = s.equivalent("CreateGetUploadTokenBehaviour"); t.output = s.equivalent("CreateGetUploadTokenOuptutParameter"); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateGetUploadTokenOperation: " + s.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 c875f6bc..39f9c5bd 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 @@ -7,9 +7,9 @@ rule CreateRefreshOperationForEntityType guard: generateBehaviours and not s.isActorRelated() and s.map.isDefined() t.setId("(jsl/" + s.getId() + ")/CreateRefreshOperationForEntityType"); - t.instanceRepresentation = s.getPSMEquivalent(); + t.instanceRepresentation = s.getTransferDeclarationEquivalent(); t.name = "Refresh" + s.getFqName().fqNameToCamelCase(); - s.map.entity.getPSMEquivalent().operations.add(t); + s.map.entity.getEntityDeclarationEquivalent().operations.add(t); log.debug("Created CreateRefreshOperationForEntityType: " + t.name); } @@ -21,7 +21,7 @@ rule CreateRefreshBehaviourForTransferType t.setId("(jsl/" + s.getId() + ")/CreateRefreshBehaviourForTransferType"); t.behaviourType = JUDOPSM!TransferOperationBehaviourType#REFRESH; - t.owner = s.getPSMEquivalent(); + t.owner = s.getTransferDeclarationEquivalent(); log.debug("Created CreateRefreshBehaviourForTransferType: " + s.name); } @@ -39,7 +39,7 @@ rule CreateRefreshOperationForTransferType t.binding = s.equivalent("CreateRefreshOperationForEntityType"); t.behaviour = s.equivalent("CreateRefreshBehaviourForTransferType"); - s.getPSMEquivalent().operations.add(t); + s.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateRefreshOperationForTransferType: " + t.name); } @@ -67,7 +67,7 @@ rule CreateRefreshOperationForTransferTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateRefreshOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForRefreshTransferTypeOutput"); t.name = "return"; - t.type = s.getPSMEquivalent(); + t.type = s.getTransferDeclarationEquivalent(); s.equivalent("CreateRefreshOperationForTransferType").output = t; log.debug("Created CreateRefreshOperationForTransferTypeOutputParameter: " + t.name); } @@ -95,7 +95,7 @@ rule CreateRefreshOperationForEntityTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateRefreshOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForRefreshEntityTypeOutput"); t.name = "return"; - t.type = s.getPSMEquivalent(); + t.type = s.getTransferDeclarationEquivalent(); s.equivalent("CreateRefreshOperationForEntityType").output = t; log.debug("Created CreateRefreshOperationForEntityTypeOutputParameter: " + t.name); } 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 d9ed9408..7cd07719 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 @@ -8,9 +8,9 @@ rule CreateAddReferenceOperationForEntityType guard: generateBehaviours and not s.isActorRelated() and s.isAddReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateAddReferenceOperationForEntityType"); - t.instanceRepresentation = s.eContainer.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = "addReferencesToRelation" + s.getFqName().fqNameToCamelCase(); - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().operations.add(t); log.debug("Created CreateAddReferenceOperationForEntityType: " + t.name); } @@ -44,7 +44,7 @@ rule CreateAddReferenceOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateAddReferenceOperationForTransferType: " + t.name); } @@ -58,7 +58,7 @@ rule CreateAddReferenceOperationForTransferTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateAddReferenceOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForAddReferenceTransferTypeInput"); t.name = "input"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateAddReferenceOperationForTransferType").input = t; log.debug("Created CreateAddReferenceOperationForTransferTypeInputParameter: " + t.name); } @@ -72,7 +72,7 @@ rule CreateAddReferenceOperationForEntityTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateAddReferenceOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForAddReferenceEntityTypeInput"); t.name = "input"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateAddReferenceOperationForEntityType").input = t; log.debug("Created CreateAddReferenceOperationForEntityTypeInputParameter: " + t.name); } 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 53d02fd1..b72358d9 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 @@ -8,9 +8,9 @@ rule CreateCreateOperationForEntityType 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.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = s.referenceType.getCreateEventInsteadOf().name + "ForRelation" + s.getFqName().fqNameToCamelCase(); - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().operations.add(t); log.debug("Created CreateCreateOperationForEntityType: " + t.name); } @@ -44,7 +44,7 @@ rule CreateCreateOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateCreateOperationForTransferType: " + t.name); } @@ -58,7 +58,7 @@ rule CreateCreateOperationForTransferTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateCreateOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForCreateTransferTypeInput"); t.name = "input"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateCreateOperationForTransferType").input = t; log.debug("Created CreateCreateOperationForTransferTypeInputParameter: " + t.name); } @@ -72,7 +72,7 @@ rule CreateCreateOperationForTransferTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateCreateOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForCreateTransferTypeOutput"); t.name = "return"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateCreateOperationForTransferType").output = t; log.debug("Created CreateCreateOperationForTransferTypeOutputParameter: " + t.name); } @@ -86,7 +86,7 @@ rule CreateCreateOperationForEntityTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateCreateOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForCreateEntityTypeInput"); t.name = "input"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateCreateOperationForEntityType").input = t; log.debug("Created CreateCreateOperationForEntityTypeInputParameter: " + t.name); } @@ -100,7 +100,7 @@ rule CreateCreateOperationForEntityTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateCreateOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForCreateEntityTypeOutput"); t.name = "return"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateCreateOperationForEntityType").output = t; log.debug("Created CreateCreateOperationForEntityTypeOutputParameter: " + t.name); } 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 bcc91704..fef23bee 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 @@ -8,9 +8,9 @@ rule CreateGetRangeRelationOperationForEntityType guard: generateBehaviours and not s.isActorRelated() and s.isGetRangeSupported() t.setId("(jsl/" + s.getId() + ")/CreateGetRangeRelationOperationForEntityType"); - t.instanceRepresentation = s.eContainer.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = "getRangeForRelation" + s.getFqName().fqNameToCamelCase(); - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().operations.add(t); log.debug("Created CreateGetRangeRelationOperationForEntityType: " + t.name); } @@ -44,7 +44,7 @@ rule CreateGetRangeRelationOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateGetRangeRelationOperationForTransferType: " + t.name); } @@ -72,7 +72,7 @@ rule CreateGetRangeRelationOperationForTransferTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateGetRangeRelationOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForGetRangeRelationTransferTypeOutput"); t.name = "return"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateGetRangeRelationOperationForTransferType").output = t; log.debug("Created CreateGetRangeRelationOperationForTransferTypeOutputParameter: " + t.name); } @@ -100,7 +100,7 @@ rule CreateGetRangeRelationOperationForEntityTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateGetRangeRelationOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForGetRangeRelationEntityTypeOutput"); t.name = "return"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateGetRangeRelationOperationForEntityType").output = t; log.debug("Created CreateGetRangeRelationOperationForEntityTypeOutputParameter: " + t.name); } 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 76e5727f..a167b14d 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 @@ -8,9 +8,9 @@ rule CreateListOperationForEntityType guard: generateBehaviours and not s.isActorRelated() and (s.maps() or s.reads()) t.setId("(jsl/" + s.getId() + ")/CreateListOperationForEntityType"); - t.instanceRepresentation = s.eContainer.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = "listRelation" + s.getFqName().fqNameToCamelCase(); - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().operations.add(t); log.debug("Created CreateListOperationForEntityType: " + t.name); } @@ -44,7 +44,7 @@ rule CreateListOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateListOperationForTransferType: " + t.name); } @@ -72,7 +72,7 @@ rule CreateListOperationForTransferTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateListOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForListTransferTypeOutput"); t.name = "return"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateListOperationForTransferType").output = t; log.debug("Created CreateListOperationForTransferTypeOutputParameter: " + t.name); } @@ -100,7 +100,7 @@ rule CreateListOperationForEntityTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateListOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForListEntityTypeOutput"); t.name = "return"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateListOperationForEntityType").output = t; log.debug("Created CreateListOperationForEntityTypeOutputParameter: " + t.name); } 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 1e18b231..e5b1ef0c 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 @@ -8,9 +8,9 @@ rule CreateRemoveReferenceOperationForEntityType guard: generateBehaviours and not s.isActorRelated() and s.isRemoveReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateRemoveReferenceOperationForEntityType"); - t.instanceRepresentation = s.eContainer.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = "removeReferencesFromRelation" + s.getFqName().fqNameToCamelCase(); - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().operations.add(t); log.debug("Created CreateRemoveReferenceOperationForEntityType: " + t.name); } @@ -43,7 +43,7 @@ rule CreateRemoveReferenceOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateRemoveReferenceOperationForTransferType: " + t.name); } @@ -57,7 +57,7 @@ rule CreateRemoveReferenceOperationForTransferTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateRemoveReferenceOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForRemoveReferenceTransferTypeInput"); t.name = "input"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateRemoveReferenceOperationForTransferType").input = t; log.debug("Created CreateRemoveReferenceOperationForTransferTypeInputParameter: " + t.name); } @@ -71,7 +71,7 @@ rule CreateRemoveReferenceOperationForEntityTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateRemoveReferenceOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForRemoveReferenceEntityTypeInput"); t.name = "input"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateRemoveReferenceOperationForEntityType").input = t; log.debug("Created CreateRemoveReferenceOperationForEntityTypeInputParameter: " + t.name); } 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 f35d852e..74fc9983 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 @@ -8,9 +8,9 @@ rule CreateSetReferenceOperationForEntityType guard: generateBehaviours and not s.isActorRelated() and s.isSetReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateSetReferenceOperationForEntityType"); - t.instanceRepresentation = s.eContainer.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = "setReferencesOfRelation" + s.getFqName().fqNameToCamelCase(); - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().operations.add(t); log.debug("Created CreateSetReferenceOperationForEntityType: " + t.name); } @@ -44,7 +44,7 @@ rule CreateSetReferenceOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateSetReferenceOperationForTransferType: " + t.name); } @@ -58,7 +58,7 @@ rule CreateSetReferenceOperationForTransferTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateSetReferenceOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForSetReferenceTransferTypeInput"); t.name = "input"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateSetReferenceOperationForTransferType").input = t; log.debug("Created CreateSetReferenceOperationForTransferTypeInputParameter: " + t.name); } @@ -72,7 +72,7 @@ rule CreateSetReferenceOperationForEntityTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateSetReferenceOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForSetReferenceEntityTypeInput"); t.name = "input"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateSetReferenceOperationForEntityType").input = t; log.debug("Created CreateSetReferenceOperationForEntityTypeInputParameter: " + t.name); } 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 fb37acfc..e3876e4a 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 @@ -8,9 +8,9 @@ rule CreateUnsetReferenceOperationForEntityType guard: generateBehaviours and not s.isActorRelated() and s.isUnsetReferenceAllowed() t.setId("(jsl/" + s.getId() + ")/CreateUnsetReferenceOperationForEntityType"); - t.instanceRepresentation = s.eContainer.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = "unsetReferencesOfRelation" + s.getFqName().fqNameToCamelCase(); - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().operations.add(t); log.debug("Created CreateUnsetReferenceOperationForEntityType: " + t.name); } @@ -44,7 +44,7 @@ rule CreateUnsetReferenceOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateUnsetReferenceOperationForTransferType: " + t.name); } @@ -58,7 +58,7 @@ rule CreateUnsetReferenceOperationForTransferTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateUnsetReferenceOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForUnsetReferenceTransferTypeInput"); t.name = "input"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateUnsetReferenceOperationForTransferType").input = t; log.debug("Created CreateUnsetReferenceOperationForTransferTypeInputParameter: " + t.name); } @@ -72,7 +72,7 @@ rule CreateUnsetReferenceOperationForEntityTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateUnsetReferenceOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForUnsetReferenceEntityTypeInput"); t.name = "input"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateUnsetReferenceOperationForEntityType").input = t; log.debug("Created CreateUnsetReferenceOperationForEntityTypeInputParameter: " + t.name); } 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 17417a15..bb9e7018 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 @@ -8,9 +8,9 @@ rule CreateValidateCreateOperationForEntityType 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.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = "validate" + s.referenceType.getCreateEventInsteadOf().name.firstToUpperCase() + "ForRelation" + s.getFqName().fqNameToCamelCase(); - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().operations.add(t); log.debug("Created CreateValidateCreateOperationForEntityType: " + t.name); } @@ -44,7 +44,7 @@ rule CreateValidateCreateOperationForTransferType t.updateOnResult = s.referenceType.isUpdateSupported(); t.deleteOnResult = s.referenceType.isDeleteSupported(); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateValidateCreateOperationForTransferType: " + t.name); } @@ -58,7 +58,7 @@ rule CreateValidateCreateOperationForTransferTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateValidateCreateOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForValidateCreateTransferTypeInput"); t.name = "input"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateValidateCreateOperationForTransferType").input = t; log.debug("Created CreateValidateCreateOperationForTransferTypeInputParameter: " + t.name); } @@ -72,7 +72,7 @@ rule CreateValidateCreateOperationForTransferTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateValidateCreateOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForValidateCreateTransferTypeOutput"); t.name = "return"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateValidateCreateOperationForTransferType").output = t; log.debug("Created CreateValidateCreateOperationForTransferTypeOutputParameter: " + t.name); } @@ -86,7 +86,7 @@ rule CreateValidateCreateOperationForEntityTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateValidateCreateOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForValidateCreateEntityTypeInput"); t.name = "input"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateValidateCreateOperationForEntityType").input = t; log.debug("Created CreateValidateCreateOperationForEntityTypeInputParameter: " + t.name); } @@ -100,7 +100,7 @@ rule CreateValidateCreateOperationForEntityTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateValidateCreateOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForValidateCreateEntityTypeOutput"); t.name = "return"; - t.type = s.referenceType.getPSMEquivalent(); + t.type = s.referenceType.getTransferDeclarationEquivalent(); s.equivalent("CreateValidateCreateOperationForEntityType").output = t; log.debug("Created CreateValidateCreateOperationForEntityTypeOutputParameter: " + t.name); } 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 2f48c864..ebfc8c92 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,9 +9,9 @@ rule CreateUpdateOperationForEntityType guard: generateBehaviours and s.instead ?: false t.setId("(jsl/" + s.getId() + ")/CreateUpdateOperationForEntityType"); - t.instanceRepresentation = s.eContainer.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = s.name + s.eContainer.getFqName().fqNameToCamelCase(); - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().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.getPSMEquivalent(); + t.owner = s.eContainer.getTransferDeclarationEquivalent(); 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.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateUpdateOperationForTransferType: " + t.name); } @@ -51,7 +51,7 @@ rule CreateUpdateOperationForTransferTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateUpdateOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForUpdateTransferTypeInput"); t.name = "input"; - t.type = s.eContainer.getPSMEquivalent(); + t.type = s.eContainer.getTransferDeclarationEquivalent(); s.equivalent("CreateUpdateOperationForTransferType").input = t; log.debug("Created CreateUpdateOperationForTransferTypeInputParameter: " + t.name); } @@ -65,7 +65,7 @@ rule CreateUpdateOperationForTransferTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateUpdateOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForUpdateTransferTypeOutput"); t.name = "return"; - t.type = s.eContainer.getPSMEquivalent(); + t.type = s.eContainer.getTransferDeclarationEquivalent(); s.equivalent("CreateUpdateOperationForTransferType").output = t; log.debug("Created CreateUpdateOperationForTransferTypeOutputParameter: " + t.name); } @@ -79,7 +79,7 @@ rule CreateUpdateOperationForEntityTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateUpdateOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForUpdateEntityTypeInput"); t.name = "input"; - t.type = s.eContainer.getPSMEquivalent(); + t.type = s.eContainer.getTransferDeclarationEquivalent(); s.equivalent("CreateUpdateOperationForEntityType").input = t; log.debug("Created CreateUpdateOperationForEntityTypeInputParameter: " + t.name); } @@ -93,7 +93,7 @@ rule CreateUpdateOperationForEntityTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateUpdateOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForUpdateEntityTypeOutput"); t.name = "return"; - t.type = s.eContainer.getPSMEquivalent(); + t.type = s.eContainer.getTransferDeclarationEquivalent(); s.equivalent("CreateUpdateOperationForEntityType").output = t; log.debug("Created CreateUpdateOperationForEntityTypeOutputParameter: " + 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 0be34b03..e534d4ad 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,9 +9,9 @@ rule CreateValidateUpdateOperationForEntityType guard: generateBehaviours and s.instead ?: false t.setId("(jsl/" + s.getId() + ")/CreateValidateUpdateOperationForEntityType"); - t.instanceRepresentation = s.eContainer.getPSMEquivalent(); + t.instanceRepresentation = s.eContainer.getTransferDeclarationEquivalent(); t.name = "validate" + s.name.firstToUpperCase() + s.eContainer.getFqName().fqNameToCamelCase(); - s.eContainer.map.entity.getPSMEquivalent().operations.add(t); + s.eContainer.map.entity.getEntityDeclarationEquivalent().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.getPSMEquivalent(); + t.owner = s.eContainer.getTransferDeclarationEquivalent(); log.debug("Created CreateValidateUpdateBehaviourForTransferType: " + s.name); } @@ -40,7 +40,7 @@ rule CreateValidateUpdateOperationForTransferType } t.binding = s.equivalent("CreateValidateUpdateOperationForEntityType"); t.behaviour = s.equivalent("CreateValidateUpdateBehaviourForTransferType"); - s.eContainer.getPSMEquivalent().operations.add(t); + s.eContainer.getTransferDeclarationEquivalent().operations.add(t); log.debug("Created CreateValidateUpdateOperationForTransferType: " + t.name); } @@ -54,7 +54,7 @@ rule CreateValidateUpdateOperationForTransferTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateValidateUpdateOperationForTransferTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForValidateUpdateTransferTypeInput"); t.name = "input"; - t.type = s.eContainer.getPSMEquivalent(); + t.type = s.eContainer.getTransferDeclarationEquivalent(); s.equivalent("CreateValidateUpdateOperationForTransferType").input = t; log.debug("Created CreateValidateUpdateOperationForTransferTypeInputParameter: " + t.name); } @@ -68,7 +68,7 @@ rule CreateValidateUpdateOperationForTransferTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateValidateUpdateOperationForTransferTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForValidateUpdateTransferTypeOutput"); t.name = "return"; - t.type = s.eContainer.getPSMEquivalent(); + t.type = s.eContainer.getTransferDeclarationEquivalent(); s.equivalent("CreateValidateUpdateOperationForTransferType").output = t; log.debug("Created CreateValidateUpdateOperationForTransferTypeOutputParameter: " + t.name); } @@ -82,7 +82,7 @@ rule CreateValidateUpdateOperationForEntityTypeInputParameter t.setId("(jsl/" + s.getId() + ")/CreateValidateUpdateOperationForEntityTypeInputParameter"); t.cardinality = s.equivalent("CreateCardinalityForValidateUpdateEntityTypeInput"); t.name = "input"; - t.type = s.eContainer.getPSMEquivalent(); + t.type = s.eContainer.getTransferDeclarationEquivalent(); s.equivalent("CreateValidateUpdateOperationForEntityType").input = t; log.debug("Created CreateValidateUpdateOperationForEntityTypeInputParameter: " + t.name); } @@ -96,7 +96,7 @@ rule CreateValidateUpdateOperationForEntityTypeOutputParameter t.setId("(jsl/" + s.getId() + ")/CreateValidateUpdateOperationForEntityTypeOutputParameter"); t.cardinality = s.equivalent("CreateCardinalityForValidateUpdateEntityTypeOutput"); t.name = "return"; - t.type = s.eContainer.getPSMEquivalent(); + t.type = s.eContainer.getTransferDeclarationEquivalent(); s.equivalent("CreateValidateUpdateOperationForEntityType").output = t; log.debug("Created CreateValidateUpdateOperationForEntityTypeOutputParameter: " + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/association.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/association.etl index 7fc6abbf..87011998 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/association.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/association.etl @@ -7,7 +7,7 @@ rule CreateNamedOppositeAssociationEnd t.setId("(jsl/" + s.getId() + ")/CreateNamedOppositeAssociationEnd"); t.name = s.name; - t.target = relationAddedFrom.eContainer.getPSMEquivalent(); + t.target = relationAddedFrom.eContainer.getEntityDeclarationEquivalent(); t.cardinality = s.equivalentDiscriminated("CreateCardinalityForOppositeAddedRelation", t.getId()); // Reverse cascade delete not supported yet @@ -15,7 +15,7 @@ rule CreateNamedOppositeAssociationEnd t.partner = relationAddedFrom.equivalent("CreateDeclaredAssociationEnd"); - entityToAdd.getPSMEquivalent().relations.add(t); + entityToAdd.getEntityDeclarationEquivalent().relations.add(t); log.debug("Created Association End (named opposite): " + t.name); } @@ -27,7 +27,7 @@ rule CreateDeclaredAssociationEnd t.setId("(jsl/" + s.getId() + ")/CreateDeclaredAssociationEnd"); t.name = s.name; - t.target = s.getReferenceType().getPSMEquivalent(); + t.target = s.getReferenceType().getEntityDeclarationEquivalent(); t.cardinality = s.equivalentDiscriminated("CreateCardinalityForRelationDeclaration", t.getId()); // Reverse cascade delete not supported yet @@ -44,6 +44,6 @@ rule CreateDeclaredAssociationEnd } } - s.eContainer.getPSMEquivalent().relations.add(t); + s.eContainer.getEntityDeclarationEquivalent().relations.add(t); log.debug("Created Association End: (declared)" + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/containment.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/containment.etl index 2ee5e29d..8e28629a 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/containment.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/containment.etl @@ -8,10 +8,10 @@ rule CreateContainmentFromField t.setId("(jsl/" + s.getId() + ")/CreateContainmentFromField"); t.name = s.name; - t.target = s.getReferenceType().getPSMEquivalent(); + t.target = s.getReferenceType().getEntityDeclarationEquivalent(); t.cardinality = s.equivalentDiscriminated("CreateCardinalityForFieldDeclaration", t.getId()); - s.eContainer.getPSMEquivalent().relations.add(t); + s.eContainer.getEntityDeclarationEquivalent().relations.add(t); log.debug("Created Containment: " + t.name); } @@ -45,7 +45,7 @@ rule CreateReadsStaticNavigationForUnmappedTransferObjectTransferRelationDeclara t.setId("(jsl/" + s.getId() + ")/CreateReadsStaticNavigationForUnmappedTransferObjectTransferRelationDeclaration"); t.name = defaultReadsNamePrefix + s.eContainer.name + defaultReadsNameMidfix + s.eContainer.eContainer.name + defaultReadsNamePostfix; - t.target = s.eContainer.getReferenceType().getPSMEquivalent().entityType; + t.target = s.eContainer.getReferenceType().getTransferDeclarationEquivalent().entityType; t.cardinality = s.eContainer.equivalentDiscriminated("CreateCardinalityForTransferRelationDeclaration", t.getId()); s.eContainer.eContainer.eContainer.getModelRoot().elements.add(t); @@ -62,10 +62,10 @@ rule CreateReadsNavigationPropertyForMappedTransferObjectTransferRelationDeclara t.setId("(jsl/" + s.getId() + ")/CreateReadsNavigationPropertyForMappedTransferObjectTransferRelationDeclaration"); t.name = defaultReadsNamePrefix + s.eContainer.name + defaultReadsNameMidfix + s.eContainer.eContainer.name + defaultReadsNamePostfix; - t.target = s.eContainer.getReferenceType().getPSMEquivalent().entityType; + t.target = s.eContainer.getReferenceType().getTransferDeclarationEquivalent().entityType; t.cardinality = s.eContainer.equivalentDiscriminated("CreateCardinalityForTransferRelationDeclaration", t.getId()); - s.eContainer.eContainer.map.entity.getPSMEquivalent().navigationProperties.add(t); + s.eContainer.eContainer.map.entity.getEntityDeclarationEquivalent().navigationProperties.add(t); log.debug("Created NavigationProperty for TransferRelation Reads: " + s); } @@ -96,9 +96,9 @@ rule CreateDefaultNavigationPropertyForMappedTransferObjectConstructor t.setId("(jsl/" + s.eContainer.getId() + ")/CreateDefaultNavigationPropertyForMappedTransferObjectConstructor"); t.name = defaultDefaultNamePrefix + s.eContainer.name + defaultDefaultNameMidfix + s.eContainer.eContainer.name + defaultDefaultNamePostfix; - t.target = s.eContainer.getReferenceType().getPSMEquivalent().entityType; + t.target = s.eContainer.getReferenceType().getTransferDeclarationEquivalent().entityType; t.cardinality = s.eContainer.equivalentDiscriminated("CreateCardinalityForTransferRelationDeclaration", t.getId()); - s.eContainer.eContainer.map.entity.getPSMEquivalent().navigationProperties.add(t); + s.eContainer.eContainer.map.entity.getEntityDeclarationEquivalent().navigationProperties.add(t); log.debug("Created NavigationProperty for Transfer Object Default Value: " + s); } @@ -124,7 +124,7 @@ rule CreateDefaultStaticNavigationForUnmappedTransferObjectConstructor t.setId("(jsl/" + s.eContainer.getId() + ")/CreateDefaultStaticNavigationForUnmappedTransferObjectConstructor"); t.name = defaultDefaultNamePrefix + s.eContainer.name + defaultDefaultNameMidfix + s.eContainer.eContainer.name + defaultDefaultNamePostfix; - t.target = s.eContainer.getReferenceType().getPSMEquivalent().entityType; + t.target = s.eContainer.getReferenceType().getTransferDeclarationEquivalent().entityType; t.cardinality = s.eContainer.equivalentDiscriminated("CreateCardinalityForTransferRelationDeclaration", t.getId()); s.eContainer.eContainer.eContainer.getModelRoot().elements.add(t); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/entityType.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/entityType.etl index 36fe5f17..ee564a1a 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/entityType.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/entityType.etl @@ -8,7 +8,7 @@ rule CreateEntityType t.name = entityNamePrefix + s.name + entityNamePostfix; t.`abstract` = s.`isAbstract`; for (super in s.`extends`) { - t.superEntityTypes.add(super.getPSMEquivalent()); + t.superEntityTypes.add(super.getEntityDeclarationEquivalent()); } s.eContainer.getModelRoot().elements.add(t); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/primitiveTypedElement.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/primitiveTypedElement.etl index 9ff1a451..96c5c059 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/primitiveTypedElement.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/primitiveTypedElement.etl @@ -28,10 +28,10 @@ rule CreateAttributeFromField extends CreatePrimitiveTypedElement { guard: s.getReferenceType().isKindOf(JSL!PrimitiveDeclaration) and not s.isCalculated() t.setId("(jsl/" + s.getId() + ")/CreateAttributeFromField"); - t.dataType = s.getReferenceType().getPSMEquivalent(); + t.dataType = s.getReferenceType().getPrimitiveDeclarationEquivalent(); t.identifier = s.identifier; - s.eContainer.getPSMEquivalent().attributes.add(t); + s.eContainer.getEntityDeclarationEquivalent().attributes.add(t); log.debug("Created Attribute (Field): " + t.name); } @@ -59,10 +59,10 @@ rule CreateDefaultValueForPrimitiveEntityMember t.setId("(jsl/" + s.eContainer.getId() + ")/CreateDefaultValueForPrimitiveEntityMember"); t.name = defaultDefaultNamePrefix + s.eContainer.name + defaultDefaultNameMidfix + s.eContainer.eContainer.name + defaultDefaultNamePostfix; - t.dataType = s.eContainer.getReferenceType().getPSMEquivalent(); + t.dataType = s.eContainer.getReferenceType().getPrimitiveDeclarationEquivalent(); t.required = false; - s.eContainer.eContainer.getPSMEquivalent().dataProperties.add(t); + s.eContainer.eContainer.getEntityDeclarationEquivalent().dataProperties.add(t); log.debug("Created DataProperty for Default Value: " + s); } @@ -97,7 +97,7 @@ rule CreateReadsStaticDataForUnmappedTransferObjectTransferFieldDeclaration t.setId("(jsl/" + s.getId() + ")/CreateReadsStaticDataForUnmappedTransferObjectTransferFieldDeclaration"); t.name = defaultReadsNamePrefix + s.eContainer.name + defaultReadsNameMidfix + s.eContainer.eContainer.name + defaultReadsNamePostfix; - t.dataType = s.eContainer.getReferenceType().getPSMEquivalent(); + t.dataType = s.eContainer.getReferenceType().getPrimitiveDeclarationEquivalent(); t.required = false; s.eContainer.eContainer.eContainer.getModelRoot().elements.add(t); @@ -114,10 +114,10 @@ rule CreateReadsDataPropertyForMappedTransferObjectTransferFieldDeclaration t.setId("(jsl/" + s.getId() + ")/CreateReadsDataPropertyForMappedTransferObjectTransferFieldDeclaration"); t.name = defaultReadsNamePrefix + s.eContainer.name + defaultReadsNameMidfix + s.eContainer.eContainer.name + defaultReadsNamePostfix; - t.dataType = s.eContainer.getReferenceType().getPSMEquivalent(); + t.dataType = s.eContainer.getReferenceType().getPrimitiveDeclarationEquivalent(); t.required = false; - s.eContainer.eContainer.map.entity.getPSMEquivalent().dataProperties.add(t); + s.eContainer.eContainer.map.entity.getEntityDeclarationEquivalent().dataProperties.add(t); log.debug("Created DataProperty for TransferField Reads: " + s); } @@ -147,11 +147,11 @@ rule CreateDefaultDataPropertyForMappedTransferObjectConstructor t.setId("(jsl/" + s.eContainer.getId() + ")/CreateDefaultDataPropertyForMappedTransferObjectConstructor"); t.name = defaultDefaultNamePrefix + s.eContainer.name + defaultDefaultNameMidfix + s.eContainer.eContainer.name + defaultDefaultNamePostfix; - t.dataType = s.eContainer.getReferenceType().getPSMEquivalent(); + t.dataType = s.eContainer.getReferenceType().getPrimitiveDeclarationEquivalent(); t.required = false; - s.eContainer.eContainer.map.entity.getPSMEquivalent().dataProperties.add(t); + s.eContainer.eContainer.map.entity.getEntityDeclarationEquivalent().dataProperties.add(t); log.debug("Created DataProperty for Transfer Object Default Value: " + s); } @@ -177,7 +177,7 @@ rule CreateDefaultStaticDataForUnmappedTransferObjectConstructor t.setId("(jsl/" + s.eContainer.getId() + ")/CreateDefaultStaticDataForUnmappedTransferObjectConstructor"); t.name = defaultDefaultNamePrefix + s.eContainer.name + defaultDefaultNameMidfix + s.eContainer.eContainer.name + defaultDefaultNamePostfix; - t.dataType = s.eContainer.getReferenceType().getPSMEquivalent(); + t.dataType = s.eContainer.getReferenceType().getPrimitiveDeclarationEquivalent(); t.required = false; s.eContainer.eContainer.eContainer.getModelRoot().elements.add(t); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/query.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/query.etl index e854d57f..6cf9b8a0 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/query.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/data/query.etl @@ -6,7 +6,7 @@ rule AbstractCreateEntityQueryTransferAttributeForStaticQuery t.name = s.name; t.binding = s.equivalent("CreateDataPropertyForStaticQuery"); - t.dataType = s.getReferenceType().getPSMEquivalent(); + t.dataType = s.getReferenceType().getPrimitiveDeclarationEquivalent(); } rule CreateEntityQueryTransferAttributeForStaticQuery @@ -146,7 +146,11 @@ rule CreateTransferObjectForStaticQueryParameterDeclaration t.setId("(jsl/" + s.getId() + ")/CreateTransferObjectForStaticQueryParameterDeclaration"); t.name = s.name; - t.dataType = s.referenceType.getPSMEquivalent(); + if (s.referenceType.isKindOf(JSL!PrimitiveDeclaration)) { + t.dataType = s.referenceType.getPrimitiveDeclarationEquivalent(); + } else { + t.dataType = s.referenceType.getEntityDeclarationEquivalent(); + } s.eContainer.equivalent("CreateUnmappedTransferObjectForStaticQuery").attributes.add(t); log.debug("Created Transfer Attribute for Query Declaration: " + s.name); @@ -160,7 +164,7 @@ rule CreateStaticDataForStaticQuery t.name = s.name; t.setId("(jsl/" + s.getId() + ")/CreateStaticDataForStaticQuery"); t.getterExpression = s.equivalent("CreateGetterExpressionForStaticQueryParametrizedDataType"); - t.dataType = s.referenceType.getPSMEquivalent(); + t.dataType = s.referenceType.getPrimitiveDeclarationEquivalent(); s.eContainer.getModelRoot().elements.add(t); log.debug("Created Query Static Data: " + t.name); @@ -174,9 +178,9 @@ rule CreateDataPropertyForStaticQuery t.name = s.name; t.setId("(jsl/" + s.getId() + ")/CreateDataPropertyForStaticQuery"); t.getterExpression = s.equivalent("CreateGetterExpressionForStaticQueryParametrizedDataType"); - t.dataType = s.getReferenceType().getPSMEquivalent(); + t.dataType = s.getReferenceType().getPrimitiveDeclarationEquivalent(); - s.entity.getPSMEquivalent().dataProperties.add(t); + s.entity.getEntityDeclarationEquivalent().dataProperties.add(t); log.debug("Created Query Data Property: " + t.name); } @@ -189,7 +193,7 @@ rule CreateStaticNavigationForStaticQuery t.setId("(jsl/" + s.getId() + ")/CreateStaticNavigationForStaticQuery"); t.getterExpression = s.equivalent("CreateGetterExpressionForStaticQueryParametrizedReferenceType"); t.cardinality = s.equivalentDiscriminated("CreateCardinalityForStaticQueryDeclaration", t.getId()); - t.target = s.referenceType.getPSMEquivalent(); + t.target = s.referenceType.getEntityDeclarationEquivalent(); s.eContainer.getModelRoot().elements.add(t); log.debug("Created Query Static Navigation: " + t.name); @@ -205,9 +209,9 @@ rule CreateNavigationPropertyForStaticQuery t.setId("(jsl/" + s.getId() + ")/CreateNavigationPropertyForStaticQuery"); t.getterExpression = s.equivalent("CreateGetterExpressionForStaticQueryParametrizedReferenceType"); t.cardinality = s.equivalentDiscriminated("CreateCardinalityForStaticQueryDeclaration", t.getId()); - t.target = s.getReferenceType().getPSMEquivalent(); + t.target = s.getReferenceType().getEntityDeclarationEquivalent(); - s.entity.getPSMEquivalent().navigationProperties.add(t); + s.entity.getEntityDeclarationEquivalent().navigationProperties.add(t); log.debug("Created Query Navigation Property: " + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/derived/dataProperty.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/derived/dataProperty.etl index 50826055..767a0bd6 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/derived/dataProperty.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/derived/dataProperty.etl @@ -9,9 +9,9 @@ rule CreateDataProperty t.name = s.name; t.setId("(jsl/" + s.getId() + ")/CreateDataProperty"); t.getterExpression = s.equivalent("CreateGetterExpressionForDataType"); - t.dataType = s.getReferenceType().getPSMEquivalent(); + t.dataType = s.getReferenceType().getPrimitiveDeclarationEquivalent(); - s.eContainer.getPSMEquivalent().dataProperties.add(t); + s.eContainer.getEntityDeclarationEquivalent().dataProperties.add(t); log.debug("Created Data Property: " + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/derived/entityQuery.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/derived/entityQuery.etl index f7d00f29..eedcea14 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/derived/entityQuery.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/derived/entityQuery.etl @@ -18,9 +18,9 @@ rule CreateDataPropertyForEntityQuery t.name = s.name; t.setId("(jsl/" + s.getId() + ")/CreateDataPropertyForEntityQuery"); t.getterExpression = s.equivalent("CreateGetterExpressionForEntityQuery"); - t.dataType = s.getReferenceType().getPSMEquivalent(); + t.dataType = s.getReferenceType().getPrimitiveDeclarationEquivalent(); - s.eContainer.getPSMEquivalent().dataProperties.add(t); + s.eContainer.getEntityDeclarationEquivalent().dataProperties.add(t); log.debug("Created Query Data Property: " + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/derived/navigationProperty.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/derived/navigationProperty.etl index 83c567e6..bf47f9ec 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/derived/navigationProperty.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/derived/navigationProperty.etl @@ -7,8 +7,8 @@ rule CreateNavigationProperty t.setId("(jsl/" + s.getId() + ")/CreateNavigationProperty"); t.getterExpression = s.equivalent("CreateGetterExpressionForReferenceType"); t.cardinality = s.equivalentDiscriminated("CreateCardinalityForDerivedDeclaration", t.getId()); - t.target = s.getReferenceType().getPSMEquivalent(); + t.target = s.getReferenceType().getEntityDeclarationEquivalent(); - s.eContainer.getPSMEquivalent().navigationProperties.add(t); + s.eContainer.getEntityDeclarationEquivalent().navigationProperties.add(t); log.debug("Created Navigation Property: " + t.name); } diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/entityDeclarationDefaultTransferAttribute.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/entityDeclarationDefaultTransferAttribute.etl index 5a3d9ed6..39474690 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/entityDeclarationDefaultTransferAttribute.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/entityDeclarationDefaultTransferAttribute.etl @@ -14,7 +14,7 @@ rule AbstractCreateTransferAttributeForDefaultTransferObjectType t.required = s.isRequired; t.name = s.name; t.binding = s.equivalent("CreateAttributeFromField"); - t.dataType = s.getReferenceType().getPSMEquivalent(); + t.dataType = s.getReferenceType().getPrimitiveDeclarationEquivalent(); if (s.getDefault().isDefined()) { t.defaultValue = s.getDefault().equivalent("CreateDefaultValueForPrimitiveEntityMember"); @@ -62,7 +62,11 @@ rule AbstractCreateDerivedTransferAttributeForDefaultTransferObjectType t.name = s.name; t.binding = s.equivalent("CreateDataProperty"); - t.dataType = s.getReferenceType().getPSMEquivalent(); + if (s.getReferenceType().isKindOf(JSL!PrimitiveDeclaration)) { + t.dataType = s.getReferenceType().getPrimitiveDeclarationEquivalent(); + } else { + t.dataType = s.getReferenceType().getEntityDeclarationEquivalent(); + } } @greedy @@ -102,7 +106,11 @@ rule AbstractCreateEntityQueryTransferAttributeForDefaultTransferObjectType t.name = s.name; t.binding = s.equivalent("CreateDataPropertyForEntityQuery"); - t.dataType = s.getReferenceType().getPSMEquivalent(); + if (s.getReferenceType().isKindOf(JSL!PrimitiveDeclaration)) { + t.dataType = s.getReferenceType().getPrimitiveDeclarationEquivalent(); + } else { + t.dataType = s.getReferenceType().getEntityDeclarationEquivalent(); + } } @greedy @@ -143,7 +151,7 @@ rule AbstractCreateTransferDefaultValueAttributeForDefaultTransferObjectType t.name = defaultDefaultNamePrefix + s.eContainer.name + defaultDefaultNameMidfix + s.eContainer.eContainer.name + defaultDefaultNamePostfix; t.binding = s.equivalent("CreateDefaultValueForPrimitiveEntityMember"); - t.dataType = s.eContainer.getReferenceType().getPSMEquivalent(); + t.dataType = s.eContainer.getReferenceType().getPrimitiveDeclarationEquivalent(); } // Create default transfer object attribute for default value expression and add it to default transfer object diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/entityDeclarationDefaultTransferObjectType.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/entityDeclarationDefaultTransferObjectType.etl index 2e2b6b7c..a69aae2b 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/entityDeclarationDefaultTransferObjectType.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/entityDeclarationDefaultTransferObjectType.etl @@ -9,7 +9,7 @@ rule CreateEntityDefaultTransferObjectType to t : JUDOPSM!MappedTransferObjectType { guard: generateDefaultTransferObject t.setId("(jsl/" + s.getId() + ")/CreateEntityDefaultTransferObjectType"); - t.entityType = s.getPSMEquivalent(); + t.entityType = s.getEntityDeclarationEquivalent(); t.entityType.defaultRepresentation = t; diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationQueryCustomizer.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationQueryCustomizer.etl index e457860d..9dc42640 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationQueryCustomizer.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationQueryCustomizer.etl @@ -200,7 +200,7 @@ rule CreateQueryCustomizerSeekLastItemAttribute guard: generateBehaviours and s.eContainer.map.isDefined() and (s.isFilterable() or s.isSortable()) t.setId("(jsl/" + s.getId() + ")/CreateQueryCustomizerSeekLastItemAttribute"); t.name = s.name; - t.dataType = s.referenceType.getPSMEquivalent(); + t.dataType = s.referenceType.getPrimitiveDeclarationEquivalent(); t.required = false; s.eContainer.equivalent("CreateQueryCustomizerSeekLastItem").attributes.add(t); log.debug("CreateQueryCustomizerSeekLastItemAttribute: " + t.name); diff --git a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationTransferAttribute.etl b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationTransferAttribute.etl index 8c21d9df..bccae245 100644 --- a/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationTransferAttribute.etl +++ b/judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/structure/transferDeclarationTransferAttribute.etl @@ -12,7 +12,7 @@ rule AbstractCreateTransferAttributeForTransferFieldDeclaration guard: s.referenceType.isKindOf(JSL!PrimitiveDeclaration) t.required = s.isRequired; t.name = s.name; - t.dataType = s.referenceType.getPSMEquivalent(); + t.dataType = s.referenceType.getPrimitiveDeclarationEquivalent(); } @greedy @@ -32,7 +32,7 @@ rule CreateTransientTransferAttribute } } - s.eContainer.getPSMEquivalent().attributes.add(t); + s.eContainer.getTransferDeclarationEquivalent().attributes.add(t); log.debug("Created TransferAttribute (Field) for TransferFieldDeclaration: [" + t.name + "] into [" + t.eContainer.name + "]"); } @@ -50,7 +50,7 @@ rule CreateDerivedTransferAttribute t.binding = s.getterExpr.equivalent("CreateReadsStaticDataForUnmappedTransferObjectTransferFieldDeclaration"); } - s.eContainer.getPSMEquivalent().attributes.add(t); + s.eContainer.getTransferDeclarationEquivalent().attributes.add(t); log.debug("Created TransferAttribute (Derived) for TransferFieldDeclaration: [" + t.name + "] into [" + t.eContainer.name + "]"); } @@ -73,7 +73,7 @@ rule CreateMappedTransferAttribute } else if (s.getterExpr.features.first.member.getDefault().isDefined()) { t.defaultValue = s.getterExpr.features.first.member.getDefault().equivalent("CreateDefaultValueForPrimitiveEntityMember"); } - s.eContainer.getPSMEquivalent().attributes.add(t); + s.eContainer.getTransferDeclarationEquivalent().attributes.add(t); log.debug("Created TransferAttribute (Field) for TransferFieldDeclaration: [" + t.name + "] into [" + t.eContainer.name + "]"); } @@ -88,9 +88,9 @@ rule CreateMappedTransferAttributeEntityDefault t.name = defaultDefaultNamePrefix + s.name + defaultDefaultNameMidfix + s.eContainer.eContainer.name + defaultDefaultNamePostfix; t.setId("(jsl/" + s.getId() + ")/CreateMappedTransferAttributeEntityDefault"); t.binding = s.getterExpr.features.first.member.getDefault().equivalent("CreateDefaultValueForPrimitiveEntityMember"); - t.dataType = s.referenceType.getPSMEquivalent(); + t.dataType = s.referenceType.getPrimitiveDeclarationEquivalent(); t.required = false; - s.eContainer.getPSMEquivalent().attributes.add(t); + s.eContainer.getTransferDeclarationEquivalent().attributes.add(t); log.debug("Created TransferAttribute DefaultValue (Field) for EntityDefault: [" + t.name + "] into [" + t.eContainer.name + "]"); } @@ -102,9 +102,9 @@ rule CreateTransferEntityDefaultValueAttributeForMappedTransferObjectConstructor guard: s.eContainer.isKindOf(JSL!TransferFieldDeclaration) and s.eContainer.eContainer.map.isDefined() t.name = defaultDefaultNamePrefix + s.eContainer.name + defaultDefaultNameMidfix + s.eContainer.eContainer.name + defaultDefaultNamePostfix; t.binding = s.equivalent("CreateDefaultDataPropertyForMappedTransferObjectConstructor"); - t.dataType = s.eContainer.referenceType.getPSMEquivalent(); + t.dataType = s.eContainer.referenceType.getPrimitiveDeclarationEquivalent(); t.setId("(jsl/" + s.eContainer.getId() + ")/CreateTransferEntityDefaultValueAttributeForMappedTransferObjectConstructor"); - s.eContainer.eContainer.getPSMEquivalent().attributes.add(t); + s.eContainer.eContainer.getTransferDeclarationEquivalent().attributes.add(t); log.debug("Created TransferAttribute DefaultValue (Field) for MappedTransferObjectConstructor: [" + t.name + "] into [" + t.eContainer.name + "]"); } @@ -115,10 +115,10 @@ rule CreateTransferEntityDefaultValueAttributeForUnmappedTransferObjectConstruct guard: s.eContainer.isKindOf(JSL!TransferFieldDeclaration) and s.eContainer.eContainer.map.isUndefined() t.name = defaultDefaultNamePrefix + s.eContainer.name + defaultDefaultNameMidfix + s.eContainer.eContainer.name + defaultDefaultNamePostfix; t.binding = s.equivalent("CreateDefaultStaticDataForUnmappedTransferObjectConstructor"); - t.dataType = s.eContainer.referenceType.getPSMEquivalent(); + t.dataType = s.eContainer.referenceType.getPrimitiveDeclarationEquivalent(); t.setId("(jsl/" + s.eContainer.getId() + ")/CreateTransferEntityDefaultValueAttributeForUnmappedTransferObjectConstructor"); - s.eContainer.eContainer.getPSMEquivalent().attributes.add(t); + s.eContainer.eContainer.getTransferDeclarationEquivalent().attributes.add(t); log.debug("Created TransferAttribute DefaultValue (Field) for UnmappedTransferObjectConstructor: [" + t.name + "] into [" + t.eContainer.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 b3f0a67e..3f4a51df 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 @@ -31,7 +31,7 @@ rule CreateMappedTransferObjectType t.setId("(jsl/" + s.getId() + ")/CreateMappedTransferObjectType"); - t.entityType = s.map.entity.getPSMEquivalent(); + t.entityType = s.map.entity.getEntityDeclarationEquivalent(); t.name = s.name; 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 c1cc3f82..fcc7bad5 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 @@ -8,7 +8,7 @@ rule AbstractCreateTransferObjectRelationForTransferRelationDeclaration transform s: JSL!TransferRelationDeclaration to t: JUDOPSM!TransferObjectRelation { t.name = s.name; - t.target = s.getReferenceType().getPSMEquivalent(); + t.target = s.getReferenceType().getTransferDeclarationEquivalent(); if (s.isCreateAllowed()) { t.embeddedCreate = true; @@ -22,7 +22,7 @@ rule AbstractCreateTransferObjectRelationForTransferRelationDeclaration t.embedded = s.isAggregation(); if (s.isGetRangeSupported()) { - t.range = s.getPSMRangeEquivalent(); + t.range = s.getTransferActionRangeEquivalent(); } } @@ -45,7 +45,7 @@ rule CreateTransientTransferObjectRelationForTransferRelationDeclaration } } - s.eContainer.getPSMEquivalent().relations.add(t); + s.eContainer.getTransferDeclarationEquivalent().relations.add(t); log.debug("Created TransferObjectRelation for TransferRelationDeclaration: [" + t.name + "] into [" + t.eContainer.name + "]"); } @@ -66,7 +66,7 @@ rule CreateDerivedTransferObjectEmbeddedRelationForTransferRelationDeclaration t.binding = s.getterExpr.equivalent("CreateReadsReferenceExpressionForUnmappedTransferObjectTransferRelationDeclaration"); } - s.eContainer.getPSMEquivalent().relations.add(t); + s.eContainer.getTransferDeclarationEquivalent().relations.add(t); log.debug("Created TransferObjectRelation for TransferRelationDeclaration: [" + t.name + "] into [" + t.eContainer.name + "]"); } @@ -96,7 +96,7 @@ rule CreateMappedTransferObjectEmbeddedRelationForTransferRelationDeclaration t.defaultValue = s.getDefault().equivalent("CreateDefaultNavigationPropertyForMappedTransferObjectConstructor"); } - s.eContainer.getPSMEquivalent().relations.add(t); + s.eContainer.getTransferDeclarationEquivalent().relations.add(t); log.debug("Created TransferObjectRelation for TransferRelationDeclaration: [" + t.name + "] into [" + t.eContainer.name + "]"); } @@ -113,9 +113,9 @@ rule CreateTransferEntityDefaultValueRelationForMappedTransferObjectConstructor t.setId("(jsl/" + s.getId() + ")/CreateTransferEntityDefaultValueRelationForMappedTransferObjectConstructor"); t.name = defaultDefaultNamePrefix + s.eContainer.name + defaultDefaultNameMidfix + s.eContainer.eContainer.name + defaultDefaultNamePostfix; t.binding = s.equivalent("CreateDefaultNavigationPropertyForMappedTransferObjectConstructor"); - t.target = s.eContainer.getReferenceType().getPSMEquivalent(); + t.target = s.eContainer.getReferenceType().getTransferDeclarationEquivalent(); t.cardinality = s.eContainer.equivalentDiscriminated("CreateCardinalityForTransferRelationDeclaration", t.getId()); - s.eContainer.eContainer.getPSMEquivalent().relations.add(t); + s.eContainer.eContainer.getTransferDeclarationEquivalent().relations.add(t); } @@ -128,9 +128,9 @@ rule CreateTransferEntityDefaultValueRelationForUnmappedTransferObjectConstructo t.setId("(jsl/" + s.getId() + ")/CreateTransferEntityDefaultValueRelationForUnmappedTransferObjectConstructor"); t.name = defaultDefaultNamePrefix + s.eContainer.name + defaultDefaultNameMidfix + s.eContainer.eContainer.name + defaultDefaultNamePostfix; t.binding = s.equivalent("CreateDefaultStaticNavigationForUnmappedTransferObjectConstructor"); - t.target = s.eContainer.getReferenceType().getPSMEquivalent(); + t.target = s.eContainer.getReferenceType().getPrimitiveDeclarationEquivalent(); t.cardinality = s.eContainer.equivalentDiscriminated("CreateCardinalityForTransferRelationDeclaration", t.getId()); - s.eContainer.eContainer.getPSMEquivalent().relations.add(t); + s.eContainer.eContainer.getTransferDeclarationEquivalent().relations.add(t); } @@ -158,9 +158,9 @@ rule CreateRelationRangeNavigationPropertyForMappedTransferObjectRelation t.setId("(jsl/" + s.eContainer.getId() + ")/CreateRelationRangeNavigationPropertyForMappedTransferObjectRelation"); t.name = defaultRelationRangeNamePrefix + s.eContainer.name + defaultRelationRangeNameMidfix + s.eContainer.eContainer.name + defaultRelationRangeNamePostfix; - t.target = s.eContainer.getReferenceType().getPSMEquivalent().entityType; + t.target = s.eContainer.getReferenceType().getTransferDeclarationEquivalent().entityType; t.cardinality = s.eContainer.equivalentDiscriminated("CreateCardinalityForGetRelationRangeEntityRelation", t.getId()); - s.eContainer.eContainer.map.entity.getPSMEquivalent().navigationProperties.add(t); + s.eContainer.eContainer.map.entity.getEntityDeclarationEquivalent().navigationProperties.add(t); log.debug("Created NavigationProperty for Transfer Object Default Value: " + s); } @@ -186,7 +186,7 @@ rule CreateRelationRangStaticNavigationForUnmappedTransferObjectRelation t.setId("(jsl/" + s.eContainer.getId() + ")/CreateRelationRangStaticNavigationForUnmappedTransferObjectRelation"); t.name = defaultRelationRangeNamePrefix + s.eContainer.name + defaultRelationRangeNameMidfix + s.eContainer.eContainer.name + defaultRelationRangeNamePostfix; - t.target = s.eContainer.getReferenceType().getPSMEquivalent().entityType; + t.target = s.eContainer.getReferenceType().getTransferDeclarationEquivalent().entityType; t.cardinality = s.eContainer.equivalentDiscriminated("CreateCardinalityForGetRelationRangeEntityRelation", t.getId()); s.eContainer.eContainer.eContainer.getModelRoot().elements.add(t); @@ -203,12 +203,12 @@ rule CreateRelationRangeTransferObjectRelation t.setId("(esm/" + s.getId() + ")/CreateRelationRangeTransferObjectRelation"); - t.name = s.eContainer.getPSMRangeEquivalent().name; + t.name = s.eContainer.getTransferActionRangeEquivalent().name; t.cardinality = s.eContainer.equivalent("CreateCardinalityForGetRelationRangeTransferObjectRelation"); - t.target = s.eContainer.getReferenceType().getPSMEquivalent(); - t.binding = s.eContainer.getPSMRangeEquivalent(); + t.target = s.eContainer.getReferenceType().getTransferDeclarationEquivalent(); + t.binding = s.eContainer.getTransferActionRangeEquivalent(); - s.eContainer.eContainer.getPSMEquivalent().relations.add(t); + s.eContainer.eContainer.getTransferDeclarationEquivalent().relations.add(t); } 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 66e34116..31787b44 100644 --- a/judo-tatami-jsl-jsl2psm/src/test/resources/actor/ActorTestModel.jsl +++ b/judo-tatami-jsl-jsl2psm/src/test/resources/actor/ActorTestModel.jsl @@ -11,16 +11,18 @@ type timestamp Timestamp; entity User { identifier String email; + field Boolean isActive; } transfer UserTransfer maps User as u { field String email <= u.email update: true; } -actor Actor +actor Actor(User user) realm: "COMPANY" claim: "email" identity: UserTransfer::email + guard: user.isActive { access UserTransfer[] manager <= User.all(); };