Added static constraints to domain classes