Class: Lafcadio::MapObject
- Inherits:
-
DomainObject
- Object
- DomainObject
- Lafcadio::MapObject
- Defined in:
- lib/lafcadio/domain/MapObject.rb
Overview
Any domain class that is used mostly to map between two other domain classes should be a subclass of MapObject. Subclasses of MapObject should override MapObject.mappedTypes, returning a two-element array containing the domain classes that the map object maps between.
Constant Summary
Constants inherited from DomainObject
DomainObject::COMMIT_ADD, DomainObject::COMMIT_DELETE, DomainObject::COMMIT_EDIT
Instance Attribute Summary
Attributes inherited from DomainObject
#delete, #errorMessages, #lastCommit, #pkId
Class Method Summary collapse
-
.otherMappedType(firstType) ⇒ Object
:nodoc:.
-
.subsidiaryMap ⇒ Object
:nodoc:.
Methods inherited from DomainObject
abstractSubclasses, allFields, classFields, #clone, #commit, dependentClasses, getClassField, getClassFieldByDbFieldName, getDomainDirs, getField, getObjectTypeFromString, #get_field, #get_getter_field, #get_setter_field, inherited, #initialize, isBasedOn?, isConcrete?, method_missing, #method_missing, objectType, #objectType, #postCommitTrigger, #preCommitTrigger, selfAndConcreteSuperclasses, #set_field, subclasses, #to_s
Methods included from DomainComparable
Constructor Details
This class inherits a constructor from Lafcadio::DomainObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Lafcadio::DomainObject
Class Method Details
.otherMappedType(firstType) ⇒ Object
:nodoc:
9 10 11 12 13 14 15 16 |
# File 'lib/lafcadio/domain/MapObject.rb', line 9 def MapObject.otherMappedType(firstType) #:nodoc: types = mappedTypes if types.index(firstType) == 0 types[1] else types[0] end end |
.subsidiaryMap ⇒ Object
:nodoc:
18 19 20 |
# File 'lib/lafcadio/domain/MapObject.rb', line 18 def MapObject.subsidiaryMap #:nodoc: nil end |