Class: Ea::Qea::Models::EaOperation

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/ea/qea/models/ea_operation.rb

Overview

Represents an operation from the t_operation table in EA database This represents class methods/operations

Constant Summary collapse

COLUMN_MAP =
{
  "Object_ID" => :ea_object_id,
}.freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

from_db_row, #primary_key

Class Method Details

.column_mapObject



50
51
52
# File 'lib/ea/qea/models/ea_operation.rb', line 50

def self.column_map
  COLUMN_MAP
end

.primary_key_columnObject



37
38
39
# File 'lib/ea/qea/models/ea_operation.rb', line 37

def self.primary_key_column
  :operationid
end

.table_nameObject



41
42
43
# File 'lib/ea/qea/models/ea_operation.rb', line 41

def self.table_name
  "t_operation"
end

Instance Method Details

#abstract?Boolean

Check if operation is abstract

Returns:

  • (Boolean)


62
63
64
# File 'lib/ea/qea/models/ea_operation.rb', line 62

def abstract?
  abstract == "1"
end

#constant?Boolean

Check if operation is constant

Returns:

  • (Boolean)


98
99
100
# File 'lib/ea/qea/models/ea_operation.rb', line 98

def constant?
  const == 1
end

#leaf?Boolean

Check if operation is leaf

Returns:

  • (Boolean)


92
93
94
# File 'lib/ea/qea/models/ea_operation.rb', line 92

def leaf?
  isleaf == 1
end

#private?Boolean

Check if operation is private

Returns:

  • (Boolean)


110
111
112
# File 'lib/ea/qea/models/ea_operation.rb', line 110

def private?
  scope&.downcase == "private"
end

#protected?Boolean

Check if operation is protected

Returns:

  • (Boolean)


116
117
118
# File 'lib/ea/qea/models/ea_operation.rb', line 116

def protected?
  scope&.downcase == "protected"
end

#public?Boolean

Check if operation is public

Returns:

  • (Boolean)


104
105
106
# File 'lib/ea/qea/models/ea_operation.rb', line 104

def public?
  scope&.downcase == "public"
end

#pure?Boolean

Check if operation is pure virtual

Returns:

  • (Boolean)


74
75
76
# File 'lib/ea/qea/models/ea_operation.rb', line 74

def pure?
  pure == 1
end

#query?Boolean

Check if operation is a query

Returns:

  • (Boolean)


80
81
82
# File 'lib/ea/qea/models/ea_operation.rb', line 80

def query?
  isquery == 1
end

#root?Boolean

Check if operation is root

Returns:

  • (Boolean)


86
87
88
# File 'lib/ea/qea/models/ea_operation.rb', line 86

def root?
  isroot == 1
end

#sort_positionInteger

Returns pos for operation ordering within parent.

Returns:

  • (Integer)

    pos for operation ordering within parent



121
122
123
# File 'lib/ea/qea/models/ea_operation.rb', line 121

def sort_position
  pos || 0
end

#static?Boolean

Check if operation is static

Returns:

  • (Boolean)


56
57
58
# File 'lib/ea/qea/models/ea_operation.rb', line 56

def static?
  isstatic == "1"
end

#synchronized?Boolean

Check if operation is synchronized

Returns:

  • (Boolean)


68
69
70
# File 'lib/ea/qea/models/ea_operation.rb', line 68

def synchronized?
  synchronized == "1"
end