Class: CaTissue::CollectionProtocolRegistration
- Inherits:
-
Object
- Object
- CaTissue::CollectionProtocolRegistration
- Includes:
- Jinx::Unique
- Defined in:
- lib/catissue/domain/collection_protocol_registration.rb,
lib/catissue/migration/unique.rb
Overview
The CollectionProtocolRegistration domain class.
Instance Method Summary collapse
-
#consent_available ⇒ Object
Returns whether the consent available flag is equal to the String ‘true’.
-
#consent_available=(value) ⇒ Object
Sets the consent available flag to the specified value.
-
#consent_tier_responses ⇒ Java::JavaUtil::Set
The responses.
-
#delete ⇒ Object
Removes associations to this registration.
-
#initialize ⇒ CollectionProtocolRegistration
constructor
A new instance of CollectionProtocolRegistration.
-
#protocol_participant_identifier=(value) ⇒ Object
Sets the consent available flag to the specified value.
-
#specimens ⇒ Object
All specimens collected for this CollectionProtocolRegistration.
Constructor Details
#initialize ⇒ CollectionProtocolRegistration
Returns a new instance of CollectionProtocolRegistration.
74 75 76 77 78 79 80 |
# File 'lib/catissue/domain/collection_protocol_registration.rb', line 74 def initialize super # @quirk JRuby consent_tier_responses property method is not accessible until respond_to? is called. respond_to?(:consent_tier_responses) # work around caTissue Bug #64 self. ||= Java::JavaUtil::LinkedHashSet.new end |
Instance Method Details
#consent_available ⇒ Object
Returns whether the consent available flag is equal to the String ‘true’. This method converts the caTissue String to a Boolean.
18 19 20 |
# File 'lib/catissue/domain/collection_protocol_registration.rb', line 18 def getIsConsentAvailable == 'true' end |
#consent_available=(value) ⇒ Object
Sets the consent available flag to the specified value. A Boolean value is converted to a String.
23 24 25 26 |
# File 'lib/catissue/domain/collection_protocol_registration.rb', line 23 def (value) value = value.to_s if value setIsConsentAvailable(value) end |
#consent_tier_responses ⇒ Java::JavaUtil::Set
Returns the responses.
12 13 14 |
# File 'lib/catissue/domain/collection_protocol_registration.rb', line 12 def getConsentTierResponseCollection or (self. = Java::JavaUtil::LinkedHashSet.new) end |
#delete ⇒ Object
Removes associations to this registration
83 84 85 86 |
# File 'lib/catissue/domain/collection_protocol_registration.rb', line 83 def delete participant.collection_registrations.delete(self) if participant protocol.registrations.delete(self) if protocol end |
#protocol_participant_identifier=(value) ⇒ Object
Sets the consent available flag to the specified value. An Integer value is converted to a String.
29 30 31 32 |
# File 'lib/catissue/domain/collection_protocol_registration.rb', line 29 def protocol_participant_identifier=(value) value = value.to_s if value setProtocolParticipantIdentifier(value) end |
#specimens ⇒ Object
Returns all specimens collected for this CollectionProtocolRegistration.
89 90 91 |
# File 'lib/catissue/domain/collection_protocol_registration.rb', line 89 def specimens Jinx::Flattener.new(specimen_collection_groups.map { |scg| scg.specimens }) end |