Enterprise pattern to be used in apex