Class: Lafcadio::SubsetDomainObjectField

Inherits:
DomainObjectField show all
Defined in:
lib/lafcadio/objectField.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Attributes inherited from DomainObjectField

#delete_cascade, #linked_type

Attributes inherited from ObjectField

#db_field_name, #domain_class, #mock_value, #name, #not_nil

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DomainObjectField

auto_name, #default_mock_value, #value_for_sql, #value_from_sql, #verify_non_nil_value, #verify_subset_link_field

Methods inherited from ObjectField

#<=>, #bind_write?, create_from_xml, #db_column, #db_will_automatically_write?, #default_mock_value, #prev_value, #process_before_verify, #value_for_sql, #value_from_sql, value_type, #verify, #verify_non_nil_value

Constructor Details

#initialize(domain_class, linked_type, subset_field, name = linked_type.name.downcase) ⇒ SubsetDomainObjectField

Returns a new instance of SubsetDomainObjectField.



541
542
543
544
545
# File 'lib/lafcadio/objectField.rb', line 541

def initialize( domain_class, linked_type, subset_field,
                name = linked_type.name.downcase )
	super( domain_class, linked_type, name )
	@subset_field = subset_field
end

Instance Attribute Details

#subset_fieldObject

Returns the value of attribute subset_field.



539
540
541
# File 'lib/lafcadio/objectField.rb', line 539

def subset_field
  @subset_field
end

Class Method Details

.create_with_args(domain_class, parameters) ⇒ Object



528
529
530
531
# File 'lib/lafcadio/objectField.rb', line 528

def self.create_with_args( domain_class, parameters )
	self.new( domain_class, parameters['linked_type'],
	          parameters['subset_field'], parameters['name'] )
end

.creation_parameters(fieldElt) ⇒ Object



533
534
535
536
537
# File 'lib/lafcadio/objectField.rb', line 533

def self.creation_parameters( fieldElt )
	parameters = super( fieldElt )
	parameters['subset_field'] = fieldElt.attributes['subset_field']
	parameters
end