Class: DynamicsCRM::Metadata::EntityQueryExpression
- Inherits:
-
Object
- Object
- DynamicsCRM::Metadata::EntityQueryExpression
- Defined in:
- lib/dynamics_crm/metadata/entity_query_expression.rb
Instance Attribute Summary collapse
-
#attribute_query ⇒ Object
Returns the value of attribute attribute_query.
-
#criteria ⇒ Object
Returns the value of attribute criteria.
-
#properties ⇒ Object
Returns the value of attribute properties.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ EntityQueryExpression
constructor
A new instance of EntityQueryExpression.
- #to_xml(options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ EntityQueryExpression
Returns a new instance of EntityQueryExpression.
8 9 10 11 12 |
# File 'lib/dynamics_crm/metadata/entity_query_expression.rb', line 8 def initialize(={}) @criteria = [:criteria] @properties = [:properties] @attribute_query = [:attribute_query] end |
Instance Attribute Details
#attribute_query ⇒ Object
Returns the value of attribute attribute_query.
6 7 8 |
# File 'lib/dynamics_crm/metadata/entity_query_expression.rb', line 6 def attribute_query @attribute_query end |
#criteria ⇒ Object
Returns the value of attribute criteria.
6 7 8 |
# File 'lib/dynamics_crm/metadata/entity_query_expression.rb', line 6 def criteria @criteria end |
#properties ⇒ Object
Returns the value of attribute properties.
6 7 8 |
# File 'lib/dynamics_crm/metadata/entity_query_expression.rb', line 6 def properties @properties end |
Instance Method Details
#to_xml(options = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/dynamics_crm/metadata/entity_query_expression.rb', line 14 def to_xml(={}) namespace = [:namespace] ? [:namespace] : "b" xml = "" xml << @criteria.to_xml({namespace: namespace}) if @criteria xml << @properties.to_xml({namespace: namespace}) if @properties xml << @attribute_query.to_xml({namespace: namespace}) if @attribute_query xml << "<#{namespace}:ExtensionData i:nil='true' />" xml << "<#{namespace}:LabelQuery i:nil='true' />" xml << "<#{namespace}:RelationshipQuery i:nil='true' />" xml end |