| Class | Ribs::MetaData |
| In: |
lib/ribs/definition.rb
|
| Parent: | Object |
Collects all the meta data about a specific Ribs model
| identity_map | [RW] | Should this object be saved in an identity map? |
| persistent_class | [RW] | The persistent class that Hibernate uses as a definition for this model. |
| rib | [RW] | The Rib that defines all the mapping data |
| table | [RW] | The table to connect to |
Return the property instance for the given name.
# File lib/ribs/definition.rb, line 56
56: def [](name)
57: self.persistent_class.get_property(name.to_s) rescue nil
58: end
Should this object be saved in an identity map?
# File lib/ribs/definition.rb, line 51
51: def identity_map?
52: self.identity_map
53: end
Return all the properties for this model.
# File lib/ribs/definition.rb, line 61
61: def properties
62: self.persistent_class.property_iterator.to_a.inject({}) do |h, value|
63: if !value.respond_to?(:getRubyValue)
64: h[value.name] = value
65: end
66: h
67: end
68: end
Return all the properties for this model.
# File lib/ribs/definition.rb, line 71
71: def properties_and_identity
72: (self.persistent_class.property_iterator.to_a + [self.persistent_class.identifier_property]).inject({}) do |h, value|
73: if !value.respond_to?(:getRubyValue)
74: h[value.name] = value
75: end
76: h
77: end
78: end