Question about extending a persistent class and storage
I created a persistent class with all the associated classmethods that will be needed. I am going to use it as a temp storage for data.
Class tempPersistentClass As %Persistent
{
Property Name As %String;
Property Department As %String;
Property Title As %String;
ClassMethod GetItems(Output param) As %Status
{
//This class retrieves rows from $This and returns it as an output parameter to the caller
}
ClassMethod ProcessResponse(param) As %Status
{
// processes the param by doing the following
Depending on the returned values, move the data over to the correct extended table and delete the content from this table
}
}
At the same time, I created more persistent classes that extends the original class.
Class Customers Extends tempPersistentClass
{
}
Class Suppliers Extends temPersistentClass
{
}
I have a task that does the following:
1. Calls class method GetItems in tempPersistentClass and uses the output as part of an API request
2. Checks the API response and sends it back to the class method ProcessReponse in tempPersistentClass
I am aware that it would have been easier to create a single persistent table with just and indicator like "type". However, we currently have 14 of these types and each of them will potentially have millions of rows each with the possibility of adding more types. The question is, how do I separate the storage for the main table and the extensions? When I tried testing it, they contained the same values but I need them all separate from each other.