My App has a number of data classes. One of them (call it ClassA) needs to be referenced from many of the other Classes (ClassB, ClassC, ClassD). So because all of the classes than need to reference ClassA I have descended ClassB, ClassC, & ClassD from a Abstract ClassX. So ClassB inherits from ClassX.
What I want is for ClassX to be able to access ClassA data via a reference (avoiding having to have 3 copies of the data).
Do I have to convert my Data Class into a Data Page? I want the access to be from within the ClassX Data class, not having to do it all in the WORK class.
ClassB, ClassC, ClassD all have 'When's and 'Declared Expressions' which reference ClassA's data/when/DE as well as their own.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Let me rephrase what you said to see if I understand your scenario properly. It looks like you have an abstract data class X which you also have specialized classes B, C and D. You want to make another data class A accessible in the entire hierarchy, however it's a separate class that is not appropriated to be part of class X. the specialized classes B, C and D will need to access Class A in various specialized rules such as declare expressions and when rules. You have existing data class A instances already in your application database.
Given that scenario, I was naturally thinking of using a data page, Using the data page loading features could just have a data page load activity using Obj-Open-By-Handle of your existing instances of class A, and this could be implemented in class X for reuse in B, C and D. This would allow leveraging of the Data page features of on demand loading, and lifetime control. I don't know if this is what you consider "conversion", but I don't think it would be too difficult.
Do you already have a different implementation that isn't working ?