Class: CaTissue::NewSpecimenArrayOrderItem

Inherits:
Object
  • Object
show all
Defined in:
lib/catissue/domain/new_specimen_array_order_item.rb

Overview

The NewSpecimenArrayOrderItem domain class.

Instance Method Summary collapse

Constructor Details

#initializeNewSpecimenArrayOrderItem



18
19
20
21
22
23
24
25
26
27
# File 'lib/catissue/domain/new_specimen_array_order_item.rb', line 18

def initialize
  super
  # @quirk JRuby order_items and distributions property methods are not accessible until
  # respond_to? is called.
  respond_to?(:order_items)
  respond_to?(:distributions)
  # work around caTissue Bug #64
  self.order_items ||= Java::JavaUtil::LinkedHashSet.new
  self.distributions ||= Java::JavaUtil::LinkedHashSet.new
end

Instance Method Details

#distributionsObject

in the Java constructor. Initialize it to a LinkedHashSet in caRuby.



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

def distributions
  getDistributionCollection or (self.distributions = Java::JavaUtil::LinkedHashSet.new)
end

#order_itemsJava::JavaUtil::Set



8
9
10
# File 'lib/catissue/domain/new_specimen_array_order_item.rb', line 8

def order_items
  getOrderItemCollection or (self.order_items = Java::JavaUtil::LinkedHashSet.new)
end