Class: Lafcadio::Query::Link

Inherits:
Condition show all
Defined in:
lib/lafcadio/query/Link.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from Condition

#objectType

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Condition

#dbFieldName, #getField, #initialize, #not, #primaryKeyField?

Constructor Details

This class inherits a constructor from Lafcadio::Query::Condition

Class Method Details

.searchTermTypeObject



6
7
8
# File 'lib/lafcadio/query/Link.rb', line 6

def Link.searchTermType
	DomainObject
end

Instance Method Details

#objectMeets(anObj) ⇒ Object



14
15
16
17
# File 'lib/lafcadio/query/Link.rb', line 14

def objectMeets(anObj)
	value = anObj.send @fieldName
	value ? value.pkId == @searchTerm.pkId : false
end

#toSqlObject



10
11
12
# File 'lib/lafcadio/query/Link.rb', line 10

def toSql
	"#{ dbFieldName } = #{ @searchTerm.pkId }"
end