I would say XMLPersister has to write down the model instead of making a decision which object store will be persisted. IMO these boolean switchers are broken by design and with allowed expressions it would be even worse. It needs a single attribute based by an enum of all available object store types.