Class: OData::AbstractSchema::NavigationProperty
- Inherits:
-
SchemaObject
- Object
- SchemaObject
- OData::AbstractSchema::NavigationProperty
- Defined in:
- lib/o_data/abstract_schema/navigation_property.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#association ⇒ Object
Returns the value of attribute association.
-
#entity_type ⇒ Object
readonly
Returns the value of attribute entity_type.
-
#from_end ⇒ Object
Returns the value of attribute from_end.
-
#to_end ⇒ Object
Returns the value of attribute to_end.
Attributes inherited from SchemaObject
Instance Method Summary collapse
- #find_all(one, key_values = {}) ⇒ Object
- #find_one(one, key_value = nil) ⇒ Object
-
#initialize(schema, entity_type, name, association, options = {}) ⇒ NavigationProperty
constructor
A new instance of NavigationProperty.
- #return_type ⇒ Object
Methods inherited from SchemaObject
#<=>, #inspect, #plural_name, #qualified_name, #singular_name
Methods included from Comparable
Constructor Details
#initialize(schema, entity_type, name, association, options = {}) ⇒ NavigationProperty
Returns a new instance of NavigationProperty.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/o_data/abstract_schema/navigation_property.rb', line 7 def initialize(schema, entity_type, name, association, = {}) super(schema, name) @entity_type = entity_type @association = association .reverse_merge!(:source => true) if [:source] @from_end = @association.from_end @to_end = @association.to_end else @to_end = @association.to_end @from_end = @association.from_end end end |
Instance Attribute Details
#association ⇒ Object
Returns the value of attribute association.
5 6 7 |
# File 'lib/o_data/abstract_schema/navigation_property.rb', line 5 def association @association end |
#entity_type ⇒ Object (readonly)
Returns the value of attribute entity_type.
4 5 6 |
# File 'lib/o_data/abstract_schema/navigation_property.rb', line 4 def entity_type @entity_type end |
#from_end ⇒ Object
Returns the value of attribute from_end.
5 6 7 |
# File 'lib/o_data/abstract_schema/navigation_property.rb', line 5 def from_end @from_end end |
#to_end ⇒ Object
Returns the value of attribute to_end.
5 6 7 |
# File 'lib/o_data/abstract_schema/navigation_property.rb', line 5 def to_end @to_end end |
Instance Method Details
#find_all(one, key_values = {}) ⇒ Object
28 29 30 |
# File 'lib/o_data/abstract_schema/navigation_property.rb', line 28 def find_all(one, key_values = {}) nil end |
#find_one(one, key_value = nil) ⇒ Object
32 33 34 |
# File 'lib/o_data/abstract_schema/navigation_property.rb', line 32 def find_one(one, key_value = nil) nil end |
#return_type ⇒ Object
24 25 26 |
# File 'lib/o_data/abstract_schema/navigation_property.rb', line 24 def return_type @to_end.return_type end |