Implements the strategy pattern using Grails domain class