Class: Lafcadio::MapObject

Inherits:
DomainObject show all
Defined in:
lib/lafcadio/domain.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.mapped_classes, returning a two-element array containing the domain classes that the map object maps between.

Instance Attribute Summary

Attributes inherited from DomainObject

#delete, #last_commit_type

Class Method Summary collapse

Methods inherited from DomainObject

[], abstract_subclass?, abstract_subclasses, all, all_fields, class_field, class_fields, #clone, #commit, commit_mock, create_field, create_field_att_hash, create_fields, custom_mock, default_args, default_field_setup_hash, default_mock, default_mock_available, #delete!, dependent_classes, domain_class, #domain_class, domain_dirs, exist?, field, #field_value, first, get, get_class_fields, #getter_field, #initialize, is_child_domain_class?, last, link_field, maybe_call_default_mock, method_missing, #method_missing, method_missing_try_create_field, method_missing_try_create_fields, mock_value, mock_values, only, #post_commit_trigger, postgres_pk_id_seq, #pre_commit_trigger, #preprocess_field_hash, require_domain_file, #reset_original_values_hash, self_and_concrete_superclasses, #set_field_value, #setter_field, singleton_method_added, sql_primary_key_name, subclass_record, subclasses, table_name, try_load_xml_parser, #update!, #verify

Methods included from DomainComparable

#<=>, #eql?, #hash

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

.other_mapped_type(firstType) ⇒ Object

:nodoc:



857
858
859
860
861
# File 'lib/lafcadio/domain.rb', line 857

def self.other_mapped_type(firstType) #:nodoc:
	mt = mapped_classes.clone
	mt.delete firstType
	mt.only
end

.subsidiary_mapObject

:nodoc:



863
864
865
# File 'lib/lafcadio/domain.rb', line 863

def self.subsidiary_map #:nodoc:
	nil
end