Class ORecordLazyMap
java.lang.Object
java.util.AbstractMap<Object,OIdentifiable>
java.util.HashMap<Object,OIdentifiable>
java.util.LinkedHashMap<Object,OIdentifiable>
com.orientechnologies.orient.core.db.record.OTrackedMap<OIdentifiable>
com.orientechnologies.orient.core.db.record.ORecordLazyMap
- All Implemented Interfaces:
OSizeable,OAutoConvertToRecord,ODetachable,ORecordElement,ORecordLazyMultiValue,OTrackedMultiValue<Object,,OIdentifiable> Serializable,Cloneable,Map<Object,,OIdentifiable> SequencedMap<Object,OIdentifiable>
Lazy implementation of LinkedHashMap. It's bound to a source ORecord object to keep track of
changes. This avoid to call the makeDirty() by hand when the map is changed.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> Nested classes/interfaces inherited from interface com.orientechnologies.orient.core.db.record.ORecordElement
ORecordElement.STATUS -
Field Summary
Fields inherited from class com.orientechnologies.orient.core.db.record.OTrackedMap
genericClass, sourceRecord -
Constructor Summary
ConstructorsConstructorDescriptionORecordLazyMap(ORecordElement iSourceRecord) ORecordLazyMap(ODocument iSourceRecord, byte iRecordType) ORecordLazyMap(ODocument iSourceRecord, Map<Object, OIdentifiable> iOrigin) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleanvoidBrowse all the set to convert all the items into records.booleanBrowse all the set to convert all the items into links.booleandetach()Detaches the object.bytebooleanput(Object key, OIdentifiable value) voidsetAutoConvertToRecord(boolean convertToRecord) intsize()toString()values()Methods inherited from class com.orientechnologies.orient.core.db.record.OTrackedMap
addInternal, disableTracking, enableTracking, getGenericClass, getOwner, getTimeLine, getTransactionTimeLine, isModified, isTransactionModified, putAll, putInternal, replace, returnOriginalState, setDirty, setDirtyNoChanged, transactionClearMethods inherited from class java.util.LinkedHashMap
entrySet, forEach, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, putIfAbsent, remove, replace, replaceMethods inherited from class java.util.AbstractMap
equals, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, putIfAbsent, remove, replace, replaceMethods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Constructor Details
-
ORecordLazyMap
-
ORecordLazyMap
-
ORecordLazyMap
-
-
Method Details
-
containsValue
- Specified by:
containsValuein interfaceMap<Object,OIdentifiable> - Overrides:
containsValuein classLinkedHashMap<Object,OIdentifiable>
-
get
- Specified by:
getin interfaceMap<Object,OIdentifiable> - Overrides:
getin classLinkedHashMap<Object,OIdentifiable>
-
put
- Specified by:
putin interfaceMap<Object,OIdentifiable> - Overrides:
putin classOTrackedMap<OIdentifiable>
-
values
- Specified by:
valuesin interfaceMap<Object,OIdentifiable> - Overrides:
valuesin classLinkedHashMap<Object,OIdentifiable>
-
remove
- Specified by:
removein interfaceMap<Object,OIdentifiable> - Overrides:
removein classOTrackedMap<OIdentifiable>
-
clear
public void clear()- Specified by:
clearin interfaceMap<Object,OIdentifiable> - Overrides:
clearin classOTrackedMap<OIdentifiable>
-
toString
- Overrides:
toStringin classAbstractMap<Object,OIdentifiable>
-
isAutoConvertToRecord
public boolean isAutoConvertToRecord()- Specified by:
isAutoConvertToRecordin interfaceOAutoConvertToRecord
-
setAutoConvertToRecord
public void setAutoConvertToRecord(boolean convertToRecord) - Specified by:
setAutoConvertToRecordin interfaceOAutoConvertToRecord
-
convertLinks2Records
public void convertLinks2Records()Description copied from interface:ORecordLazyMultiValueBrowse all the set to convert all the items into records.It converts only items that already loaded into memory from storage. To convert records that will be fetched from disk later use
OAutoConvertToRecord.setAutoConvertToRecord(boolean)- Specified by:
convertLinks2Recordsin interfaceORecordLazyMultiValue
-
convertRecords2Links
public boolean convertRecords2Links()Description copied from interface:ORecordLazyMultiValueBrowse all the set to convert all the items into links.- Specified by:
convertRecords2Linksin interfaceORecordLazyMultiValue- Returns:
-
getRecordType
public byte getRecordType() -
rawIterator
- Specified by:
rawIteratorin interfaceORecordLazyMultiValue
-
detach
public boolean detach()Description copied from interface:ODetachableDetaches the object.- Specified by:
detachin interfaceODetachable- Returns:
- true if the object has been fully detached, otherwise false
-
size
public int size()- Specified by:
sizein interfaceMap<Object,OIdentifiable> - Specified by:
sizein interfaceOSizeable- Overrides:
sizein classHashMap<Object,OIdentifiable>
-