Add factory to RegistrationQuery.