public class OEmbeddedRidBag extends Object implements ORidBagDelegate
ORecordElement.STATUS
Constructor and Description |
---|
OEmbeddedRidBag() |
Modifier and Type | Method and Description |
---|---|
void |
add(OIdentifiable identifiable) |
void |
addAll(Collection<OIdentifiable> values) |
void |
addEntry(OIdentifiable identifiable) |
void |
addInternal(OIdentifiable identifiable) |
boolean |
contains(OIdentifiable identifiable)
THIS IS VERY EXPENSIVE METHOD AND CAN NOT BE CALLED IN REMOTE STORAGE.
|
void |
convertLinks2Records()
Browse all the set to convert all the items into records.
|
boolean |
convertRecords2Links()
Browse all the set to convert all the items into links.
|
OEmbeddedRidBag |
copy() |
int |
deserialize(byte[] stream,
int offset) |
boolean |
detach()
Detaches the object.
|
void |
disableTracking(ORecordElement document) |
void |
enableTracking(ORecordElement parent) |
NavigableMap<OIdentifiable,Change> |
getChanges() |
Object[] |
getEntries() |
Class<?> |
getGenericClass() |
ORecordElement |
getOwner() |
int |
getSerializedSize() |
int |
getSerializedSize(byte[] stream,
int offset) |
OMultiValueChangeTimeLine<Object,Object> |
getTimeLine() |
OSimpleMultiValueTracker<OIdentifiable,OIdentifiable> |
getTracker() |
OMultiValueChangeTimeLine<OIdentifiable,OIdentifiable> |
getTransactionTimeLine() |
boolean |
isAutoConvertToRecord() |
boolean |
isEmpty() |
boolean |
isModified() |
boolean |
isTransactionModified() |
Iterator<OIdentifiable> |
iterator() |
Iterator<OIdentifiable> |
rawIterator() |
void |
remove(OIdentifiable identifiable) |
void |
replace(OMultiValueChangeEvent<Object,Object> event,
Object newValue) |
void |
requestDelete() |
Object |
returnOriginalState(List<OMultiValueChangeEvent<OIdentifiable,OIdentifiable>> multiValueChangeEvents)
Reverts all operations that were performed on collection and return original collection state.
|
int |
serialize(byte[] stream,
int offset,
UUID ownerUuid)
Writes content of bag to stream.
|
void |
setAutoConvertToRecord(boolean convertToRecord) |
<RET> RET |
setDirty()
Marks the instance as dirty.
|
void |
setDirtyNoChanged() |
void |
setOwner(ORecordElement owner) |
void |
setSize(int size) |
void |
setTracker(OSimpleMultiValueTracker<OIdentifiable,OIdentifiable> tracker) |
void |
setTransactionModified(boolean transactionDirty) |
int |
size() |
boolean |
swap(int index,
OIdentifiable newValue)
for internal use only
|
String |
toString() |
void |
transactionClear() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
nestedDisable, nestedEnabled, nestedTransactionClear
public void setSize(int size)
setSize
in interface ORidBagDelegate
public Object[] getEntries()
public ORecordElement getOwner()
getOwner
in interface ORecordElement
getOwner
in interface ORidBagDelegate
public boolean contains(OIdentifiable identifiable)
ORidBagDelegate
contains
in interface ORidBagDelegate
identifiable
- Object to check.public void setOwner(ORecordElement owner)
setOwner
in interface ORidBagDelegate
public void addAll(Collection<OIdentifiable> values)
addAll
in interface ORidBagDelegate
public void add(OIdentifiable identifiable)
add
in interface ORidBagDelegate
public OEmbeddedRidBag copy()
public void remove(OIdentifiable identifiable)
remove
in interface ORidBagDelegate
public boolean swap(int index, OIdentifiable newValue)
index
- newValue
- public boolean isEmpty()
isEmpty
in interface ORidBagDelegate
public Iterator<OIdentifiable> iterator()
iterator
in interface Iterable<OIdentifiable>
public Iterator<OIdentifiable> rawIterator()
rawIterator
in interface ORecordLazyMultiValue
public void convertLinks2Records()
ORecordLazyMultiValue
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)
convertLinks2Records
in interface ORecordLazyMultiValue
public boolean convertRecords2Links()
ORecordLazyMultiValue
convertRecords2Links
in interface ORecordLazyMultiValue
public boolean isAutoConvertToRecord()
isAutoConvertToRecord
in interface OAutoConvertToRecord
public void setAutoConvertToRecord(boolean convertToRecord)
setAutoConvertToRecord
in interface OAutoConvertToRecord
public boolean detach()
ODetachable
detach
in interface ODetachable
public String toString()
toString
in interface ORidBagDelegate
toString
in class Object
public Object returnOriginalState(List<OMultiValueChangeEvent<OIdentifiable,OIdentifiable>> multiValueChangeEvents)
OTrackedMultiValue
returnOriginalState
in interface OTrackedMultiValue<OIdentifiable,OIdentifiable>
multiValueChangeEvents
- List of operations that were performed on collection.public int getSerializedSize()
getSerializedSize
in interface ORidBagDelegate
public int getSerializedSize(byte[] stream, int offset)
getSerializedSize
in interface ORidBagDelegate
public int serialize(byte[] stream, int offset, UUID ownerUuid)
ORidBagDelegate
OwnerUuid is needed to notify db about changes of collection pointer if some happens during serialization.
serialize
in interface ORidBagDelegate
stream
- to write contentoffset
- in stream where start to write contentownerUuid
- id of delegate ownerpublic int deserialize(byte[] stream, int offset)
deserialize
in interface ORidBagDelegate
public void requestDelete()
requestDelete
in interface ORidBagDelegate
public Class<?> getGenericClass()
getGenericClass
in interface OTrackedMultiValue<OIdentifiable,OIdentifiable>
public void addInternal(OIdentifiable identifiable)
public void addEntry(OIdentifiable identifiable)
public NavigableMap<OIdentifiable,Change> getChanges()
getChanges
in interface ORidBagDelegate
public void replace(OMultiValueChangeEvent<Object,Object> event, Object newValue)
replace
in interface OTrackedMultiValue<OIdentifiable,OIdentifiable>
public void enableTracking(ORecordElement parent)
enableTracking
in interface OTrackedMultiValue<OIdentifiable,OIdentifiable>
public void disableTracking(ORecordElement document)
disableTracking
in interface OTrackedMultiValue<OIdentifiable,OIdentifiable>
public void transactionClear()
transactionClear
in interface OTrackedMultiValue<OIdentifiable,OIdentifiable>
public boolean isModified()
isModified
in interface OTrackedMultiValue<OIdentifiable,OIdentifiable>
public boolean isTransactionModified()
isTransactionModified
in interface OTrackedMultiValue<OIdentifiable,OIdentifiable>
public OMultiValueChangeTimeLine<Object,Object> getTimeLine()
getTimeLine
in interface OTrackedMultiValue<OIdentifiable,OIdentifiable>
public <RET> RET setDirty()
ORecordElement
setDirty
in interface ORecordElement
public void setTransactionModified(boolean transactionDirty)
setTransactionModified
in interface ORidBagDelegate
public void setDirtyNoChanged()
setDirtyNoChanged
in interface ORecordElement
public OSimpleMultiValueTracker<OIdentifiable,OIdentifiable> getTracker()
getTracker
in interface ORidBagDelegate
public void setTracker(OSimpleMultiValueTracker<OIdentifiable,OIdentifiable> tracker)
setTracker
in interface ORidBagDelegate
public OMultiValueChangeTimeLine<OIdentifiable,OIdentifiable> getTransactionTimeLine()
getTransactionTimeLine
in interface OTrackedMultiValue<OIdentifiable,OIdentifiable>
Copyright © 2009–2020 OrientDB. All rights reserved.