Class: DSRequest
- Inherits:
-
Object
- Object
- DSRequest
- Defined in:
- lib/DSRequest.rb
Overview
<summary>
reference to the RPCManager executing this request will be stored in DSRequest.
This has to be done because, while the request is being.executed, access will be required to various items such as
the DataSource object, etc - These items will all be provided by the RPCManager class.
</summary>
Constant Summary collapse
- @@obj =
nil
Instance Attribute Summary collapse
-
#advancedCriteria ⇒ Object
Returns the value of attribute advancedCriteria.
-
#data ⇒ Object
Returns the value of attribute data.
-
#dataSource ⇒ Object
Returns the value of attribute dataSource.
-
#endRow ⇒ Object
Returns the value of attribute endRow.
-
#oldValues ⇒ Object
Returns the value of attribute oldValues.
-
#operationType ⇒ Object
Returns the value of attribute operationType.
-
#sortBy ⇒ Object
Returns the value of attribute sortBy.
-
#startRow ⇒ Object
Returns the value of attribute startRow.
-
#textMatchStyle ⇒ Object
Returns the value of attribute textMatchStyle.
Instance Method Summary collapse
-
#execute ⇒ Object
<summary> The execute() method itself only loads the DataSource object then calls the DataSource’s execute method for processing the request.
-
#initialize(data, model) ⇒ DSRequest
constructor
A new instance of DSRequest.
Constructor Details
#initialize(data, model) ⇒ DSRequest
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/DSRequest.rb', line 23 def initialize(data, model) @componentId = data[:componentId] @dataSource = data[:dataSource] @operationType = data[:operationType] @startRow = data[:startRow] @endRow = data[:endRow] @textMatchStyle = data[:textMatchStyle] @data = data[:data] @sortBy = data[:sortBy] @oldValues = data[:oldValues] @@obj = model end |
Instance Attribute Details
#advancedCriteria ⇒ Object
Returns the value of attribute advancedCriteria.
10 11 12 |
# File 'lib/DSRequest.rb', line 10 def advancedCriteria @advancedCriteria end |
#data ⇒ Object
Returns the value of attribute data.
10 11 12 |
# File 'lib/DSRequest.rb', line 10 def data @data end |
#dataSource ⇒ Object
Returns the value of attribute dataSource.
10 11 12 |
# File 'lib/DSRequest.rb', line 10 def dataSource @dataSource end |
#endRow ⇒ Object
Returns the value of attribute endRow.
10 11 12 |
# File 'lib/DSRequest.rb', line 10 def endRow @endRow end |
#oldValues ⇒ Object
Returns the value of attribute oldValues.
10 11 12 |
# File 'lib/DSRequest.rb', line 10 def oldValues @oldValues end |
#operationType ⇒ Object
Returns the value of attribute operationType.
10 11 12 |
# File 'lib/DSRequest.rb', line 10 def operationType @operationType end |
#sortBy ⇒ Object
Returns the value of attribute sortBy.
10 11 12 |
# File 'lib/DSRequest.rb', line 10 def sortBy @sortBy end |
#startRow ⇒ Object
Returns the value of attribute startRow.
10 11 12 |
# File 'lib/DSRequest.rb', line 10 def startRow @startRow end |
#textMatchStyle ⇒ Object
Returns the value of attribute textMatchStyle.
10 11 12 |
# File 'lib/DSRequest.rb', line 10 def textMatchStyle @textMatchStyle end |
Instance Method Details
#execute ⇒ Object
<summary>
The execute() method itself only loads the DataSource object then calls the DataSource's execute method for
processing the request.
</summary>
<params>
@datasource: DataSource object from the RPCManager helper class
@@obj: model object that is mapped to the table
</params>
46 47 48 49 50 51 52 53 |
# File 'lib/DSRequest.rb', line 46 def execute ds = DataSource.new(@dataSource, @@obj) if ds.nil? return nil else return ds.execute(self) end end |