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)



27
28
29
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 27

def self.primary_key_column
  "Object_Type"
end

.table_nameObject



22
23
24
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 22

def self.table_name
  "t_objecttypes"
end

Instance Method Details

#actor_type?Boolean

Check if this is an Actor type

Returns:

  • (Boolean)


67
68
69
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 67

def actor_type?
  object_type == "Actor"
end

#class_type?Boolean

Check if this is a Class type

Returns:

  • (Boolean)


49
50
51
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 49

def class_type?
  object_type == "Class"
end

#design_object?Boolean

Check if this is a design object

Returns:

  • (Boolean)


39
40
41
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 39

def design_object?
  designobject == 1
end

#interface_type?Boolean

Check if this is an Interface type

Returns:

  • (Boolean)


55
56
57
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 55

def interface_type?
  object_type == "Interface"
end

#nameString

Friendly name for object type

Returns:

  • (String)


33
34
35
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 33

def name
  object_type
end

#package_type?Boolean

Check if this is a Package type

Returns:

  • (Boolean)


61
62
63
# File 'lib/lutaml/qea/models/ea_object_type.rb', line 61

def package_type?
  object_type == "Package"
end