def validate_owner
      # If there is an unambigous owner, then we are done.
      return unless owner.nil?
      # If there is more than one owner attribute, then check that there is at most one
      # unambiguous owner reference. The owner method returns nil if the owner is ambiguous.
      if self.class.owner_attributes.size > 1 then
        vh = value_hash(self.class.owner_attributes)
        if vh.size > 1 then
          raise ValidationError.new("Dependent #{self} references multiple owners #{vh.pp_s}:\n#{dump}")
        end
      end
      # If there is an owner reference attribute, then there must be an owner.
      if self.class.bidirectional_java_dependent? then
        raise ValidationError.new("Dependent #{self} does not reference an owner")
      end
    end
def validate_owner
      # If there is an unambigous owner, then we are done.
      return unless owner.nil?
      # If there is more than one owner attribute, then check that there is at most one
      # unambiguous owner reference. The owner method returns nil if the owner is ambiguous.
      if self.class.owner_attributes.size > 1 then
        vh = value_hash(self.class.owner_attributes)
        if vh.size > 1 then
          raise ValidationError.new("Dependent #{self} references multiple owners #{vh.pp_s}:\n#{dump}")
        end
      end
      # If there is an owner reference attribute, then there must be an owner.
      if self.class.bidirectional_java_dependent? then
        raise ValidationError.new("Dependent #{self} does not reference an owner")
      end
    end
Validates that this domain object either doesn't have an owner attribute or has a unique
 effective owner.

 @raise [ValidationError] if there is an owner reference attribute that is not set
 @raise [ValidationError] if there is more than effective owner