Class: Java::ComOrientechnologiesOrientCoreDbRecord::OTrackedList

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

Instance Method Summary collapse

Instance Method Details

#<<(value) ⇒ Object



107
108
109
110
111
112
113
# File 'lib/other.rb', line 107

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



102
103
104
105
# File 'lib/other.rb', line 102

def [] val
	super.from_orient

end

#first ⇒ Object



96
97
98
# File 'lib/other.rb', line 96

def first
  super.from_orient
end

#from_orient ⇒ Object

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>



81
82
83
84
# File 'lib/other.rb', line 81

def from_orient
  map &:from_orient
  self
end

#last ⇒ Object



99
100
101
# File 'lib/other.rb', line 99

def last
  super.from_orient
end

#to_a ⇒ Object

def add value puts "ASDSD" end



93
94
95
# File 'lib/other.rb', line 93

def to_a
  super.map &:from_orient
end

#to_orient ⇒ Object



85
86
87
# File 'lib/other.rb', line 85

def to_orient
  self
end