Class: Java::ComOrientechnologiesOrientCoreDbRecord::OTrackedList

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

Instance Method Summary collapse

Instance Method Details

#<<(value) ⇒ Object


348
349
350
351
352
353
354
# File 'lib/other.rb', line 348

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


343
344
345
346
# File 'lib/other.rb', line 343

def [] val
	super.from_orient

end

#firstObject


337
338
339
# File 'lib/other.rb', line 337

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>

322
323
324
325
# File 'lib/other.rb', line 322

def from_orient
  map &:from_orient
  self
end

#lastObject


340
341
342
# File 'lib/other.rb', line 340

def last
  super.from_orient
end

#to_aObject

def add value

puts "ASDSD"

end


334
335
336
# File 'lib/other.rb', line 334

def to_a
  super.map &:from_orient
end

#to_orientObject


326
327
328
# File 'lib/other.rb', line 326

def to_orient
  self
end