Class: Lutaml::Qea::Models::EaStatusType

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/lutaml/qea/models/ea_status_type.rb

Overview

Represents a status type definition from t_statustypes table

This table provides reference data for status values that can be assigned to UML elements (Approved, Implemented, Mandatory, etc.).

Examples:

status_type = EaStatusType.new
status_type.status #=> "Approved"
status_type.description #=> "Item is approved"

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

from_db_row, #primary_key

Class Method Details

.primary_key_columnObject

Primary key is Status (text)



26
27
28
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 26

def self.primary_key_column
  "Status"
end

.table_nameObject



21
22
23
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 21

def self.table_name
  "t_statustypes"
end

Instance Method Details

#approved?Boolean

Check if this is the Approved status

Returns:

  • (Boolean)


38
39
40
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 38

def approved?
  status == "Approved"
end

#implemented?Boolean

Check if this is the Implemented status

Returns:

  • (Boolean)


44
45
46
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 44

def implemented?
  status == "Implemented"
end

#mandatory?Boolean

Check if this is the Mandatory status

Returns:

  • (Boolean)


50
51
52
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 50

def mandatory?
  status == "Mandatory"
end

#nameString

Friendly name for status

Returns:

  • (String)


32
33
34
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 32

def name
  status
end

#proposed?Boolean

Check if this is the Proposed status

Returns:

  • (Boolean)


56
57
58
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 56

def proposed?
  status == "Proposed"
end

#validated?Boolean

Check if this is the Validated status

Returns:

  • (Boolean)


62
63
64
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 62

def validated?
  status == "Validated"
end