Class: CaTissue::CollectionProtocolEvent
- Inherits:
-
Object
- Object
- CaTissue::CollectionProtocolEvent
- Defined in:
- lib/catissue/domain/collection_protocol_event.rb
Overview
The CollectionProtocolRegistration domain class.
Constant Summary collapse
- DEFAULT_EVENT_POINT =
The event point used for saving this CollectionProtocolEvent if none other is set.
1.0
Instance Method Summary collapse
-
#delete ⇒ Object
Removes associations to this registration.
-
#direct_dependents(attribute) ⇒ Object
Overrides CaRuby::Resource#references in the case of the specimen_requirements attribute to select only top-level SpecimenRequirements not derived from another SpecimenRequirement.
-
#initialize(params = nil) ⇒ CollectionProtocolEvent
constructor
A new instance of CollectionProtocolEvent.
-
#specimen_collection_groups ⇒ Java::JavaUtil::Set
caTissue alert - Bug #64: Some domain collection properties not initialized.
Methods included from Resource
#database, included, #tolerant_match?
Methods included from Annotatable
#annotation_proxy, #create_proxy, #method_missing
Methods included from HashCode
Constructor Details
#initialize(params = nil) ⇒ CollectionProtocolEvent
Returns a new instance of CollectionProtocolEvent.
43 44 45 46 47 48 |
# File 'lib/catissue/domain/collection_protocol_event.rb', line 43 def initialize(params=nil) super respond_to?(:specimen_collection_groups) # work around caTissue Bug #64 self.specimen_collection_groups ||= Java::JavaUtil::LinkedHashSet.new end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CaTissue::Annotatable
Instance Method Details
#delete ⇒ Object
Removes associations to this registration
51 52 53 |
# File 'lib/catissue/domain/collection_protocol_event.rb', line 51 def delete protocol.events.delete(self) if protocol end |
#direct_dependents(attribute) ⇒ Object
Overrides CaRuby::Resource#references in the case of the specimen_requirements attribute to select only top-level SpecimenRequirements not derived from another SpecimenRequirement.
57 58 59 60 61 62 63 |
# File 'lib/catissue/domain/collection_protocol_event.rb', line 57 def direct_dependents(attribute) if attribute == :specimen_requirements then super.reject { |spc| spc.parent } else super end end |
#specimen_collection_groups ⇒ Java::JavaUtil::Set
caTissue alert - Bug #64: Some domain collection properties not initialized. Initialize specimen_collection_groups if necessary.
16 17 18 |
# File 'lib/catissue/domain/collection_protocol_event.rb', line 16 def specimen_collection_groups getSpecimenCollectionGroupCollection or (self.specimen_collection_groups = Java::JavaUtil::LinkedHashSet.new) end |