domain class code example