Well, even though my answer is very general, what I would suggest is to look at all your objects that have transactions, and either find common logic steps that all go through, or force all of them to comply to predefined logic steps.One Sentence - inability to come up with something common for all classes which must be controlled if necessary by TransactionHandler
In other words - define an interface that all these object will implement.
Then, in your handler, call these steps based on the common logic that fits your interface.
I fully agree with you, that this should be encapsulated in its own module, and should not be mixed with GUI code.
Since I am at work, I don't have the time to look deeper in your code, or suggest some code for you.
But sometimes a push in the right direction is all what people need.
From what I can see in the header you posted, it looks a step in the right direction, but is a bit different from what I suggested just now.
Your manager doesn't need to implement the interface that your query object do, it should implement the logic of calling the right actions at the right time/sequence.
In other words: you query object should the know the "how".
Your manager should know the "when".
What exactly are you tuck on? which part or detail?I am stuck with the one class I have which is to control other classes when transaction mode is on...
Bookmarks