def validate(autogenerated=false)
      if (identifier.nil? or autogenerated) and not @validated then
        validate_local
        @validated = true
      end
      self.class.unproxied_savable_template_attributes.each do |pa|
        send(pa).enumerate { |dep| dep.validate }
      end
      self
    end
def validate(autogenerated=false)
      if (identifier.nil? or autogenerated) and not @validated then
        validate_local
        @validated = true
      end
      self.class.unproxied_savable_template_attributes.each do |pa|
        send(pa).enumerate { |dep| dep.validate }
      end
      self
    end
Validates this domain object and its #{Propertied#unproxied_savable_template_attributes}
 for consistency and completeness prior to a database create operation.
 An object is valid if it contains a non-nil value for each mandatory attribute.
 Objects which have already been validated are skipped.

 A Persistable class should not override this method, but override the
 private {#validate_local} method instead.

 @return [Persistable] this domain object
 @raise [Jinx::ValidationError] if the object state is invalid