public abstract class BaseCDORevision extends AbstractCDORevision
DEPTH_INFINITE, DEPTH_NONE, FIRST_VERSION, MAIN_BRANCH_ID, PERMISSION_PROVIDER, UNCHUNKED
INVALID_DATE, UNSPECIFIED_DATE
UNSPECIFIED_VERSION
NIL
Modifier | Constructor and Description |
---|---|
protected |
BaseCDORevision(BaseCDORevision source) |
|
BaseCDORevision(EClass eClass) |
Modifier and Type | Method and Description |
---|---|
void |
add(EStructuralFeature feature,
int index,
Object value) |
void |
adjustBranches(CDOBranchManager newBranchManager) |
boolean |
adjustReferences(CDOReferenceAdjuster referenceAdjuster) |
boolean |
bypassPermissionChecks(boolean on)
Enables or disables permission checking for this revision.
|
static void |
checkNoFeatureMap(EStructuralFeature feature) |
void |
clear(EStructuralFeature feature) |
EStructuralFeature[] |
clearValues() |
InternalCDORevisionDelta |
compare(CDORevision origin) |
boolean |
contains(EStructuralFeature feature,
Object value) |
void |
convertEObjects(CDOIDProvider idProvider) |
protected abstract Object |
doGetValue(int featureIndex) |
protected abstract void |
doSetValue(int featureIndex,
Object value) |
static String |
formatFlags(BaseCDORevision revision) |
void |
freeze() |
Object |
get(EStructuralFeature feature,
int index) |
InternalCDOBranch |
getBranch()
Returns the branch of this branch version.
|
Object |
getContainerID() |
int |
getContainingFeatureID()
Provides the input to the calculation of the feature in the container revision that actually holds this revision.
|
CDOID |
getID() |
CDOList |
getList(EStructuralFeature feature) |
CDOList |
getList(EStructuralFeature feature,
int size) |
CDOPermission |
getPermission() |
CDOID |
getResourceID() |
String |
getResourceNodeName() |
long |
getRevised() |
long |
getTimeStamp()
Returns the time stamp of this branch point, or the fixed special time stamp
unspecified if this branch point marks the head of a branch. |
Object |
getValue(EStructuralFeature feature)
Should never return
CDORevisionData.NIL |
protected Object |
getValue(int featureIndex) |
int |
getVersion()
Returns the version number of this branch version.
|
int |
hashCode(EStructuralFeature feature) |
int |
indexOf(EStructuralFeature feature,
Object value) |
protected abstract void |
initValues(EStructuralFeature[] allPersistentFeatures) |
boolean |
isEmpty(EStructuralFeature feature) |
boolean |
isFrozen() |
boolean |
isListPreserving() |
boolean |
isUnchunked() |
int |
lastIndexOf(EStructuralFeature feature,
Object value) |
void |
merge(CDORevisionDelta delta) |
Object |
move(EStructuralFeature feature,
int targetIndex,
int sourceIndex) |
void |
read(CDODataInput in) |
protected void |
readSystemValues(CDODataInput in) |
boolean |
readValues(CDODataInput in) |
static Object |
remapID(Object value,
Map<CDOID,CDOID> idMappings,
boolean allowUnmappedTempIDs) |
Object |
remove(EStructuralFeature feature,
int index) |
Object |
set(EStructuralFeature feature,
int index,
Object value) |
void |
setBranchPoint(CDOBranchPoint branchPoint) |
void |
setContainerID(Object containerID) |
void |
setContainingFeatureID(int containingFeatureID) |
void |
setID(CDOID id) |
void |
setList(EStructuralFeature feature,
InternalCDOList list) |
void |
setListPreserving()
The default behavior of a revision for calls to the
InternalCDORevision.clear(EStructuralFeature) and
InternalCDORevision.unset(EStructuralFeature) methods is to set the feature's value to null (discarding the
value itself, a List). |
void |
setPermission(CDOPermission permission) |
void |
setResourceID(CDOID resourceID) |
void |
setRevised(long revised) |
void |
setUnchunked() |
Object |
setValue(EStructuralFeature feature,
Object value) |
protected void |
setValue(int featureIndex,
Object value) |
void |
setVersion(int version) |
int |
size(EStructuralFeature feature) |
Object[] |
toArray(EStructuralFeature feature) |
<T> T[] |
toArray(EStructuralFeature feature,
T[] array) |
void |
unset(EStructuralFeature feature) |
void |
write(CDODataOutput out,
int referenceChunk) |
void |
write(CDODataOutput out,
int referenceChunk,
CDOBranchPoint securityContext) |
protected void |
writeSystemValues(CDODataOutput out) |
void |
writeValues(CDODataOutput out,
int referenceChunk) |
accept, accept, adjustForCommit, data, equals, getAllPersistentFeatures, getClassInfo, getEClass, getFeatureIndex, getProperRevision, getRevisionForID, hashCode, initClassInfo, isHistorical, isReadable, isResource, isResourceFolder, isResourceNode, isValid, isValid, isWritable, revision, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
copy
public BaseCDORevision(EClass eClass)
protected BaseCDORevision(BaseCDORevision source)
public void read(CDODataInput in) throws IOException
IOException
protected void readSystemValues(CDODataInput in) throws IOException
IOException
public boolean readValues(CDODataInput in) throws IOException
IOException
public void write(CDODataOutput out, int referenceChunk) throws IOException
IOException
public void write(CDODataOutput out, int referenceChunk, CDOBranchPoint securityContext) throws IOException
IOException
protected void writeSystemValues(CDODataOutput out) throws IOException
IOException
public void writeValues(CDODataOutput out, int referenceChunk) throws IOException
IOException
public void convertEObjects(CDOIDProvider idProvider)
write(CDODataOutput, int)
public CDOID getID()
public void setID(CDOID id)
public InternalCDOBranch getBranch()
CDOBranchVersion
public long getTimeStamp()
CDOBranchPoint
unspecified
if this branch point marks the head
of a branch.public void setBranchPoint(CDOBranchPoint branchPoint)
public int getVersion()
CDOBranchVersion
public void setVersion(int version)
public long getRevised()
public void setRevised(long revised)
public InternalCDORevisionDelta compare(CDORevision origin)
public void merge(CDORevisionDelta delta)
public CDOID getResourceID()
public void setResourceID(CDOID resourceID)
public Object getContainerID()
public void setContainerID(Object containerID)
public int getContainingFeatureID()
CDORevisionData
Usage Example:
CDORevision revision = ...;
CDORevision container = Util.getRevision(revision.data().getContainerID());
int containingFeatureID = revision.data().getContainingFeatureID();
EStructuralFeature feature = containingFeatureID <= InternalEObject.EOPPOSITE_FEATURE_BASE ?
container.getEClass().getEStructuralFeature(InternalEObject.EOPPOSITE_FEATURE_BASE - containingFeatureID) :
((EReference)revision.getEClass().getEStructuralFeature(containingFeatureID)).getEOpposite();
public void setContainingFeatureID(int containingFeatureID)
public int hashCode(EStructuralFeature feature)
public Object get(EStructuralFeature feature, int index)
public boolean contains(EStructuralFeature feature, Object value)
public int indexOf(EStructuralFeature feature, Object value)
public int lastIndexOf(EStructuralFeature feature, Object value)
public boolean isEmpty(EStructuralFeature feature)
public int size(EStructuralFeature feature)
public Object[] toArray(EStructuralFeature feature)
public <T> T[] toArray(EStructuralFeature feature, T[] array)
public void add(EStructuralFeature feature, int index, Object value)
public void clear(EStructuralFeature feature)
public Object move(EStructuralFeature feature, int targetIndex, int sourceIndex)
public Object remove(EStructuralFeature feature, int index)
public Object set(EStructuralFeature feature, int index, Object value)
public void unset(EStructuralFeature feature)
public boolean adjustReferences(CDOReferenceAdjuster referenceAdjuster)
public void adjustBranches(CDOBranchManager newBranchManager)
public Object getValue(EStructuralFeature feature)
InternalCDORevision
CDORevisionData.NIL
public Object setValue(EStructuralFeature feature, Object value)
public CDOList getList(EStructuralFeature feature)
public CDOList getList(EStructuralFeature feature, int size)
size
- the initialCapacity of a new list to be created if this revision has no list so far (its size will always
be 0), or -1 to skip list creation and return null
in this case.public void setList(EStructuralFeature feature, InternalCDOList list)
public EStructuralFeature[] clearValues()
public String getResourceNodeName()
public CDOPermission getPermission()
public void setPermission(CDOPermission permission)
public boolean bypassPermissionChecks(boolean on)
InternalCDORevision
This method is used on the client side if the framework changes the revision on another user's behalf, e.g., during invalidation or general revision copying. It's safe to offer this method on the client side because the server is always the permission checking authority (during load or commit).
public boolean isListPreserving()
public void setListPreserving()
InternalCDORevision
InternalCDORevision.clear(EStructuralFeature)
and
InternalCDORevision.unset(EStructuralFeature)
methods is to set the feature's value to null (discarding the
value itself, a List). By calling this InternalCDORevision.setListPreserving()
method the default behavior
is changed; instead of setting the feature's value to null, the List.clear()
method is
called on the feature's list instance.public void freeze()
public boolean isFrozen()
public boolean isUnchunked()
public void setUnchunked()
protected Object getValue(int featureIndex)
protected void setValue(int featureIndex, Object value)
protected abstract void initValues(EStructuralFeature[] allPersistentFeatures)
protected abstract Object doGetValue(int featureIndex)
protected abstract void doSetValue(int featureIndex, Object value)
public static void checkNoFeatureMap(EStructuralFeature feature)
public static Object remapID(Object value, Map<CDOID,CDOID> idMappings, boolean allowUnmappedTempIDs)
public static String formatFlags(BaseCDORevision revision)
Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html