I'm trying to figure out how to define default values for the name of my entities in a meta-model, in order to speed up the creation of a specific model out of that meta-model.
An example follows, taken from the domain of a company and its partner network (customers, providers, brokers, mediators, ...):
In one specific model, one instance of a Company (say MyCompany), could have two Partner instances: MyCustomer and MyBroker. For each one of those I would then create a specific instance of order, invoice and contactInfo.
When I start creating them, say for MyCustomer and for the first relationship, contactInfo ...
... I'd like to show a proposed default value like MyCustomerContactInfo, taken from the following "hypothetical" formula:
- Code: Select all
PartnerContactInfo.name.defaultValue = Partner.name + "ContactInfo"
Then I would be able to accept the default proposed name, or change it as needed.
Of course the same thing would be done for PartnerOrder instances (with a default name like "MyCustomerOrder"), and for PartnerInvoice (with a default name like "MyBrokerInvoice" for MyBroker partner instance).
Is this possible, whether without or with Java code?
Thanks for your attention