Class: CaTissue::CollectionProtocolEvent

Inherits:
Object
  • Object
show all
Includes:
HashCode, Jinx::Unique
Defined in:
lib/catissue/domain/collection_protocol_event.rb,
lib/catissue/migration/unique.rb

Overview

The CollectionProtocolEvent 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

Methods included from HashCode

#==, #hash

Instance Method Details

#deleteObject

Removes associations to this registration



48
49
50
# File 'lib/catissue/domain/collection_protocol_event.rb', line 48

def delete
  protocol.events.delete(self) if protocol
end

#direct_dependents(attribute) ⇒ Object

Overrides Jinx::Resource.references in the case of the specimen_requirements attribute to select only top-level SpecimenRequirements not derived from another SpecimenRequirement.



59
60
61
62
63
64
65
# File 'lib/catissue/domain/collection_protocol_event.rb', line 59

def direct_dependents(attribute)
  if attribute == :specimen_requirements then
    super.reject { |spc| spc.parent }
  else
    super
  end
end

#specimen_collection_groupsJava::JavaUtil::Set

Returns the SCGs.

Returns:

  • (Java::JavaUtil::Set)

    the SCGs



14
15
16
# File 'lib/catissue/domain/collection_protocol_event.rb', line 14

def specimen_collection_groups
  getSpecimenCollectionGroupCollection or (self.specimen_collection_groups = Java::JavaUtil::LinkedHashSet.new)
end

#updatable?Boolean

Returns false.

Returns:

  • (Boolean)

    false



53
54
55
# File 'lib/catissue/domain/collection_protocol_event.rb', line 53

def updatable?
  false
end