Class: Lutaml::Qea::Models::EaObjectType

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

Overview

Represents an object type definition from t_objecttypes table

This table provides reference data for object/class types available in EA. These define what kinds of UML elements can be created.

Examples:

object_type = EaObjectType.new
object_type.object_type #=> "Class"
object_type.description #=> "UML Class"
object_type.design_object? #=> false

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 Object_Type (text)



29
30
31
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 29

def self.primary_key_column
  "Object_Type"
end

.table_nameObject



24
25
26
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 24

def self.table_name
  "t_objecttypes"
end

Instance Method Details

#actor_type?Boolean

Check if this is an Actor type

Returns:

  • (Boolean)


69
70
71
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 69

def actor_type?
  object_type == "Actor"
end

#class_type?Boolean

Check if this is a Class type

Returns:

  • (Boolean)


51
52
53
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 51

def class_type?
  object_type == "Class"
end

#design_object?Boolean

Check if this is a design object

Returns:

  • (Boolean)


41
42
43
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 41

def design_object?
  designobject == 1
end

#interface_type?Boolean

Check if this is an Interface type

Returns:

  • (Boolean)


57
58
59
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 57

def interface_type?
  object_type == "Interface"
end

#nameString

Friendly name for object type

Returns:

  • (String)


35
36
37
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 35

def name
  object_type
end

#package_type?Boolean

Check if this is a Package type

Returns:

  • (Boolean)


63
64
65
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 63

def package_type?
  object_type == "Package"
end