Class: Lorj::BaseProcess
- Defined in:
- lib/core/lorj_baseprocess.rb,
lib/core/lorj_baseprocess.rb,
lib/core/lorj_baseprocess.rb,
lib/core/lorj_baseprocess.rb
Overview
internal functions
Instance Attribute Summary collapse
-
#base_object ⇒ Object
writeonly
Sets the attribute base_object.
Instance Method Summary collapse
- #controller_connect(sObjectType, hParams = {}) ⇒ Object
- #controller_create(sObjectType, hParams = {}) ⇒ Object
- #controller_delete(sObjectType, hParams = {}) ⇒ Object
- #controller_get(sObjectType, sId, hParams = {}) ⇒ Object
- #controller_query(sObjectType, sQuery, hParams = {}) ⇒ Object
- #controller_update(sObjectType, hParams = {}) ⇒ Object
-
#initialize ⇒ BaseProcess
constructor
A new instance of BaseProcess.
- #process_create(sObjectType) ⇒ Object
- #process_delete(sObjectType) ⇒ Object
-
#process_error(msg, *p) ⇒ Object
Simply raise an error.
- #process_get(sObjectType, sId) ⇒ Object
- #process_query(sObjectType, sQuery) ⇒ Object
- #process_update(sObjectType) ⇒ Object
Constructor Details
#initialize ⇒ BaseProcess
Returns a new instance of BaseProcess.
32 33 34 |
# File 'lib/core/lorj_baseprocess.rb', line 32 def initialize @definition = nil end |
Instance Attribute Details
#base_object=(value) ⇒ Object (writeonly)
Sets the attribute base_object
49 50 51 |
# File 'lib/core/lorj_baseprocess.rb', line 49 def base_object=(value) @base_object = value end |
Instance Method Details
#controller_connect(sObjectType, hParams = {}) ⇒ Object
51 52 53 54 |
# File 'lib/core/lorj_baseprocess.rb', line 51 def controller_connect(sObjectType, hParams = {}) fail Lorj::PrcError.new, 'No Controler object loaded.' unless @definition @definition.controller_connect(sObjectType, hParams) end |
#controller_create(sObjectType, hParams = {}) ⇒ Object
56 57 58 59 |
# File 'lib/core/lorj_baseprocess.rb', line 56 def controller_create(sObjectType, hParams = {}) fail Lorj::PrcError.new, 'No Controler object loaded.' unless @definition @definition.controller_create(sObjectType, hParams) end |
#controller_delete(sObjectType, hParams = {}) ⇒ Object
71 72 73 74 |
# File 'lib/core/lorj_baseprocess.rb', line 71 def controller_delete(sObjectType, hParams = {}) fail Lorj::PrcError.new, 'No Controler object loaded.' unless @definition @definition.controller_delete(sObjectType, hParams) end |
#controller_get(sObjectType, sId, hParams = {}) ⇒ Object
76 77 78 79 |
# File 'lib/core/lorj_baseprocess.rb', line 76 def controller_get(sObjectType, sId, hParams = {}) fail Lorj::PrcError.new, 'No Controler object loaded.' unless @definition @definition.controller_get(sObjectType, sId, hParams) end |
#controller_query(sObjectType, sQuery, hParams = {}) ⇒ Object
61 62 63 64 |
# File 'lib/core/lorj_baseprocess.rb', line 61 def controller_query(sObjectType, sQuery, hParams = {}) fail Lorj::PrcError.new, 'No Controler object loaded.' unless @definition @definition.controller_query(sObjectType, sQuery, hParams) end |
#controller_update(sObjectType, hParams = {}) ⇒ Object
66 67 68 69 |
# File 'lib/core/lorj_baseprocess.rb', line 66 def controller_update(sObjectType, hParams = {}) fail Lorj::PrcError.new, 'No Controler object loaded.' unless @definition @definition.controller_update(sObjectType, hParams) end |
#process_create(sObjectType) ⇒ Object
85 86 87 88 |
# File 'lib/core/lorj_baseprocess.rb', line 85 def process_create(sObjectType) fail Lorj::PrcError.new, 'No Base object loaded.' unless @definition @definition.process_create(sObjectType) end |
#process_delete(sObjectType) ⇒ Object
105 106 107 108 |
# File 'lib/core/lorj_baseprocess.rb', line 105 def process_delete(sObjectType) fail Lorj::PrcError.new, 'No Base object loaded.' unless @definition @definition.process_delete(sObjectType) end |
#process_error(msg, *p) ⇒ Object
Simply raise an error
-
Args :
-
Msg: Error message to print out.
-
-
Returns :
-
nil
-
-
Raises :
-
Lorj::PrcError
44 45 46 47 |
# File 'lib/core/lorj_baseprocess.rb', line 44 def process_error(msg, *p) msg = format(msg, *p) runtime_fail '%s: %s', self.class, msg end |
#process_get(sObjectType, sId) ⇒ Object
100 101 102 103 |
# File 'lib/core/lorj_baseprocess.rb', line 100 def process_get(sObjectType, sId) fail Lorj::PrcError.new, 'No Base object loaded.' unless @definition @definition.process_get(sObjectType, sId) end |
#process_query(sObjectType, sQuery) ⇒ Object
90 91 92 93 |
# File 'lib/core/lorj_baseprocess.rb', line 90 def process_query(sObjectType, sQuery) fail Lorj::PrcError.new, 'No Base object loaded.' unless @definition @definition.process_query(sObjectType, sQuery) end |
#process_update(sObjectType) ⇒ Object
95 96 97 98 |
# File 'lib/core/lorj_baseprocess.rb', line 95 def process_update(sObjectType) fail Lorj::PrcError.new, 'No Base object loaded.' unless @definition @definition.process_update(sObjectType) end |