Class: Java::ComOrientechnologiesOrientCoreDbRecord::OTrackedList

Inherits:
Object
  • Object
show all
Defined in:
lib/other.rb

Instance Method Summary collapse

Instance Method Details

#<<(value) ⇒ Object



391
392
393
394
395
396
397
# File 'lib/other.rb', line 391

def << value
  #put "I will perform the insert"
  value =  value.document if value.is_a?( ActiveOrient::Model ) && value.document.present?
  add value
  #save

end

#[](val) ⇒ Object



386
387
388
389
# File 'lib/other.rb', line 386

def [] val
	super.from_orient

end

#firstObject



380
381
382
# File 'lib/other.rb', line 380

def first
  super.from_orient
end

#from_orientObject

Basisklasse

Java::ComOrientechnologiesOrientCoreDbRecord::ORecordLazyList

Methode get(Index): gibt das Dokument (Java::ComOrientechnologiesOrientCoreRecordImpl::ODocument) zurück base = ActiveOrient::Model::Base.first base.document.first_list

> #<OrientDB::RecordList:[#21:0, #22:0, #23:0, #24:0, #21:1, #22:1, #23:1, #24:1, #21:2, #22:2]>

base.first_list.get(3)

> <OrientDB::Document:first_list:#24:0 second_list:#<OrientDB::RecordList:[#27:17, #28:17, #25:18, #26:18, #27:18, #28:18, #25:19, #26:19, #27:19, #28:19]> label:3>

base.first_list

=> #<ActiveOrient::Model::FirstList:0x18df26a1  (...)

base.first_list.second_list

 => #<ActiveOrient::Model::SecondList: (...)
base.first_list.get(3).second_list.get(5)
  => <OrientDB::Document:second_list:#28:18 label:5>


365
366
367
368
# File 'lib/other.rb', line 365

def from_orient
  map &:from_orient
  self
end

#lastObject



383
384
385
# File 'lib/other.rb', line 383

def last
  super.from_orient
end

#to_aObject

def add value

puts "ASDSD"

end



377
378
379
# File 'lib/other.rb', line 377

def to_a
  super.map &:from_orient
end

#to_orientObject



369
370
371
# File 'lib/other.rb', line 369

def to_orient
  self
end