#
#= global_areas モデル
# Authors:: Sumiyo Yamamoto
# Copyright:: Copyright (C) OrbusNeich Medical K.K.  2010.
#--
# date        name                   note
# 2010.2.26   Sumiyo Yamamoto        新規登録
#-------------------------------------------------------------------------------
#++
class GlobalArea < Comm::BaseModel::PermanentMaster
  def validate
    ars = GlobalArea.disp_name_is(self.disp_name).valid.id_is_not(self.id)
    record_num = ars.length
    if record_num > 0
       ids = ars.collect{|ar| ar.id}
       emsg = ''
       emsg << EMJ0005
       emsg << "指定の表示名は既に登録されています。"
       emsg << "ID:"+ids.inspect
       raise UserOperationError, emsg
    end
  end
end
