Class: Lutaml::Qea::Models::EaOperation
- Defined in:
- lib/lutaml/qea/models/ea_operation.rb
Overview
Represents an operation from the t_operation table in EA database This represents class methods/operations
Class Method Summary collapse
-
.from_db_row(row) ⇒ EaOperation?
Create from database row.
- .primary_key_column ⇒ Object
- .table_name ⇒ Object
Instance Method Summary collapse
-
#abstract? ⇒ Boolean
Check if operation is abstract.
-
#constant? ⇒ Boolean
Check if operation is constant.
-
#leaf? ⇒ Boolean
Check if operation is leaf.
-
#private? ⇒ Boolean
Check if operation is private.
-
#protected? ⇒ Boolean
Check if operation is protected.
-
#public? ⇒ Boolean
Check if operation is public.
-
#pure? ⇒ Boolean
Check if operation is pure virtual.
-
#query? ⇒ Boolean
Check if operation is a query.
-
#root? ⇒ Boolean
Check if operation is root.
-
#static? ⇒ Boolean
Check if operation is static.
-
#synchronized? ⇒ Boolean
Check if operation is synchronized.
Methods inherited from BaseModel
Class Method Details
.from_db_row(row) ⇒ EaOperation?
Create from database row
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 51 def self.from_db_row(row) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength return nil if row.nil? new( operationid: row["OperationID"], ea_object_id: row["Object_ID"], name: row["Name"], scope: row["Scope"], type: row["Type"], returnarray: row["ReturnArray"], stereotype: row["Stereotype"], isstatic: row["IsStatic"], concurrency: row["Concurrency"], notes: row["Notes"], behaviour: row["Behaviour"], abstract: row["Abstract"], genoption: row["GenOption"], synchronized: row["Synchronized"], pos: row["Pos"], const: row["Const"], style: row["Style"], pure: row["Pure"], throws: row["Throws"], classifier: row["Classifier"], code: row["Code"], isroot: row["IsRoot"], isleaf: row["IsLeaf"], isquery: row["IsQuery"], stateflags: row["StateFlags"], ea_guid: row["ea_guid"], styleex: row["StyleEx"], ) end |
.primary_key_column ⇒ Object
39 40 41 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 39 def self.primary_key_column :operationid end |
.table_name ⇒ Object
43 44 45 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 43 def self.table_name "t_operation" end |
Instance Method Details
#abstract? ⇒ Boolean
Check if operation is abstract
93 94 95 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 93 def abstract? abstract == "1" end |
#constant? ⇒ Boolean
Check if operation is constant
129 130 131 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 129 def constant? const == 1 end |
#leaf? ⇒ Boolean
Check if operation is leaf
123 124 125 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 123 def leaf? isleaf == 1 end |
#private? ⇒ Boolean
Check if operation is private
141 142 143 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 141 def private? scope&.downcase == "private" end |
#protected? ⇒ Boolean
Check if operation is protected
147 148 149 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 147 def protected? scope&.downcase == "protected" end |
#public? ⇒ Boolean
Check if operation is public
135 136 137 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 135 def public? scope&.downcase == "public" end |
#pure? ⇒ Boolean
Check if operation is pure virtual
105 106 107 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 105 def pure? pure == 1 end |
#query? ⇒ Boolean
Check if operation is a query
111 112 113 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 111 def query? isquery == 1 end |
#root? ⇒ Boolean
Check if operation is root
117 118 119 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 117 def root? isroot == 1 end |
#static? ⇒ Boolean
Check if operation is static
87 88 89 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 87 def static? isstatic == "1" end |
#synchronized? ⇒ Boolean
Check if operation is synchronized
99 100 101 |
# File 'lib/lutaml/qea/models/ea_operation.rb', line 99 def synchronized? synchronized == "1" end |