public abstract class DelegatingCDORevision extends java.lang.Object implements InternalCDORevision
DO_NOT_CREATE_LISTDEPTH_INFINITE, DEPTH_NONE, FIRST_VERSION, MAIN_BRANCH_ID, PERMISSION_PROVIDER, UNCHUNKEDINVALID_DATE, UNSPECIFIED_DATEUNSPECIFIED_VERSIONNIL| Constructor and Description |
|---|
DelegatingCDORevision() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(CDORevisionValueVisitor visitor) |
void |
accept(CDORevisionValueVisitor visitor,
Predicate<EStructuralFeature> filter) |
void |
add(EStructuralFeature feature,
int index,
java.lang.Object value) |
void |
adjustBranches(CDOBranchManager newBranchManager) |
void |
adjustForCommit(CDOBranch branch,
long timeStamp) |
boolean |
adjustReferences(CDOReferenceAdjuster referenceAdjuster) |
boolean |
bypassPermissionChecks(boolean on)
Enables or disables permission checking for this revision.
|
void |
clear(EStructuralFeature feature) |
EStructuralFeature[] |
clearValues() |
InternalCDORevisionDelta |
compare(CDORevision origin) |
boolean |
contains(EStructuralFeature feature,
java.lang.Object value) |
void |
convertEObjects(CDOIDProvider oidProvider) |
InternalCDORevision |
copy() |
CDORevisionData |
data() |
void |
freeze() |
java.lang.Object |
get(EStructuralFeature feature,
int index) |
InternalCDOBranch |
getBranch()
Returns the branch of this branch version.
|
InternalCDOClassInfo |
getClassInfo() |
java.lang.Object |
getContainerID() |
int |
getContainingFeatureID()
Provides the input to the calculation of the feature in the container revision that actually holds this revision.
|
abstract InternalCDORevision |
getDelegate() |
EClass |
getEClass() |
CDOID |
getID() |
CDOList |
getList(EStructuralFeature feature)
Deprecated.
|
CDOList |
getList(EStructuralFeature feature,
int initialCapacity)
Deprecated.
|
CDOList |
getListOrNull(EStructuralFeature feature) |
CDOList |
getOrCreateList(EStructuralFeature feature)
Same as
getOrCreateList(feature, 0). |
CDOList |
getOrCreateList(EStructuralFeature feature,
int size)
Returns the list that represents the passed feature, possibly creates it if needed.
|
CDOPermission |
getPermission() |
InternalCDORevision |
getProperRevision() |
CDOID |
getResourceID() |
java.lang.String |
getResourceNodeName() |
long |
getRevised() |
InternalCDORevision |
getRevisionForID(CDOID id) |
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. |
java.lang.Object |
getValue(EStructuralFeature feature)
Should never return
CDORevisionData.NIL |
int |
getVersion()
Returns the version number of this branch version.
|
int |
hashCode(EStructuralFeature feature) |
int |
indexOf(EStructuralFeature feature,
java.lang.Object value) |
boolean |
isEmpty(EStructuralFeature feature) |
boolean |
isFrozen() |
boolean |
isHistorical()
Returns
true exactly if CDOBranchPoint.getTimeStamp() does not return CDOBranchPoint.UNSPECIFIED_DATE,
false otherwise. |
boolean |
isListPreserving() |
boolean |
isReadable() |
boolean |
isResource() |
boolean |
isResourceFolder() |
boolean |
isResourceNode() |
boolean |
isUnchunked() |
boolean |
isValid(CDOBranchPoint branchPoint) |
boolean |
isValid(long timeStamp) |
boolean |
isWritable() |
int |
lastIndexOf(EStructuralFeature feature,
java.lang.Object value) |
void |
merge(CDORevisionDelta delta) |
java.lang.Object |
move(EStructuralFeature feature,
int targetIndex,
int sourceIndex) |
void |
read(CDODataInput in) |
boolean |
readValues(CDODataInput in) |
java.lang.Object |
remove(EStructuralFeature feature,
int index) |
CDORevision |
revision() |
java.lang.Object |
set(EStructuralFeature feature,
int index,
java.lang.Object value) |
void |
setBranchPoint(CDOBranchPoint branchPoint) |
void |
setContainerID(java.lang.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() |
java.lang.Object |
setValue(EStructuralFeature feature,
java.lang.Object value) |
void |
setVersion(int version) |
int |
size(EStructuralFeature feature) |
java.lang.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) |
void |
writeValues(CDODataOutput out,
int referenceChunk) |
public abstract InternalCDORevision getDelegate()
public InternalCDORevision getRevisionForID(CDOID id)
getRevisionForID in interface InternalCDORevisionpublic InternalCDORevision getProperRevision()
getProperRevision in interface InternalCDORevisionpublic boolean adjustReferences(CDOReferenceAdjuster referenceAdjuster)
adjustReferences in interface CDOReferenceAdjustablepublic void adjustBranches(CDOBranchManager newBranchManager)
adjustBranches in interface CDOBranchAdjustablepublic long getTimeStamp()
CDOBranchPointunspecified if this branch point marks the head of a branch.getTimeStamp in interface CDOBranchPointgetTimeStamp in interface CDOTimeProviderpublic InternalCDOBranch getBranch()
CDOBranchVersiongetBranch in interface CDOBranchPointgetBranch in interface CDOBranchProvidergetBranch in interface CDOBranchVersiongetBranch in interface InternalCDORevisionpublic boolean isHistorical()
CDORevisiontrue exactly if CDOBranchPoint.getTimeStamp() does not return CDOBranchPoint.UNSPECIFIED_DATE,
false otherwise.isHistorical in interface CDORevisionpublic CDOID getID()
getID in interface CDOIdentifiablepublic CDORevision revision()
revision in interface CDORevisionDatapublic CDOID getResourceID()
getResourceID in interface CDORevisionDatapublic java.lang.Object getContainerID()
getContainerID in interface CDORevisionDatapublic int getContainingFeatureID()
CDORevisionDataUsage 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();getContainingFeatureID in interface CDORevisionDataBasicEObjectImpl.eContainingFeature(),
CDORevisionData.getContainerID()public java.lang.Object get(EStructuralFeature feature, int index)
get in interface CDORevisionDatapublic EClass getEClass()
getEClass in interface CDORevisionpublic int getVersion()
CDOBranchVersiongetVersion in interface CDOBranchVersiongetVersion in interface CDOIDAndVersiongetVersion in interface CDOVersionProviderpublic int size(EStructuralFeature feature)
size in interface CDORevisionDatapublic long getRevised()
getRevised in interface CDORevisablepublic boolean isEmpty(EStructuralFeature feature)
isEmpty in interface CDORevisionDatapublic boolean isValid(long timeStamp)
isValid in interface CDORevisionpublic boolean isValid(CDOBranchPoint branchPoint)
isValid in interface CDORevisionpublic InternalCDORevision copy()
copy in interface CDORevisioncopy in interface InternalCDORevisionpublic InternalCDOClassInfo getClassInfo()
getClassInfo in interface CDORevisiongetClassInfo in interface InternalCDORevisionpublic void setID(CDOID id)
setID in interface InternalCDORevisionpublic boolean contains(EStructuralFeature feature, java.lang.Object value)
contains in interface CDORevisionDatapublic boolean isResourceNode()
isResourceNode in interface CDORevisionpublic void setVersion(int version)
setVersion in interface InternalCDORevisionpublic boolean isResourceFolder()
isResourceFolder in interface CDORevisionpublic int indexOf(EStructuralFeature feature, java.lang.Object value)
indexOf in interface CDORevisionDatapublic boolean isResource()
isResource in interface CDORevisionpublic void setBranchPoint(CDOBranchPoint branchPoint)
setBranchPoint in interface InternalCDORevisionpublic void adjustForCommit(CDOBranch branch, long timeStamp)
adjustForCommit in interface InternalCDORevisionpublic CDORevisionData data()
data in interface CDORevisionpublic int lastIndexOf(EStructuralFeature feature, java.lang.Object value)
lastIndexOf in interface CDORevisionDatapublic void setRevised(long revised)
setRevised in interface InternalCDORevisionpublic InternalCDORevisionDelta compare(CDORevision origin)
compare in interface CDORevisioncompare in interface InternalCDORevisionpublic void setResourceID(CDOID resourceID)
setResourceID in interface InternalCDORevisionpublic void merge(CDORevisionDelta delta)
merge in interface CDORevisionpublic <T> T[] toArray(EStructuralFeature feature, T[] array)
toArray in interface CDORevisionDatapublic void setContainerID(java.lang.Object containerID)
setContainerID in interface InternalCDORevisionpublic void setContainingFeatureID(int containingFeatureID)
setContainingFeatureID in interface InternalCDORevisionpublic java.lang.Object[] toArray(EStructuralFeature feature)
toArray in interface CDORevisionDatapublic void add(EStructuralFeature feature, int index, java.lang.Object value)
add in interface InternalCDORevisionpublic int hashCode(EStructuralFeature feature)
hashCode in interface CDORevisionDatapublic void clear(EStructuralFeature feature)
clear in interface InternalCDORevisionpublic java.lang.Object move(EStructuralFeature feature, int targetIndex, int sourceIndex)
move in interface InternalCDORevisionpublic java.lang.Object remove(EStructuralFeature feature, int index)
remove in interface InternalCDORevisionpublic java.lang.Object set(EStructuralFeature feature, int index, java.lang.Object value)
set in interface InternalCDORevisionpublic void unset(EStructuralFeature feature)
unset in interface InternalCDORevisionpublic java.lang.Object getValue(EStructuralFeature feature)
InternalCDORevisionCDORevisionData.NILgetValue in interface InternalCDORevisionpublic java.lang.Object setValue(EStructuralFeature feature, java.lang.Object value)
setValue in interface InternalCDORevisionpublic void setList(EStructuralFeature feature, InternalCDOList list)
setList in interface InternalCDORevision@Deprecated public CDOList getList(EStructuralFeature feature)
getList in interface InternalCDORevision@Deprecated public CDOList getList(EStructuralFeature feature, int initialCapacity)
getList in interface InternalCDORevisionpublic CDOList getListOrNull(EStructuralFeature feature)
getListOrNull in interface InternalCDORevisionpublic CDOList getOrCreateList(EStructuralFeature feature)
InternalCDORevisiongetOrCreateList(feature, 0).
Warning: Must be used with caution because list creation for an unsettable
feature implies a transition from UNSET to SET!
getOrCreateList in interface InternalCDORevisionpublic CDOList getOrCreateList(EStructuralFeature feature, int size)
InternalCDORevision
Warning: Must be used with caution because list creation for an unsettable
feature implies a transition from UNSET to SET!
getOrCreateList in interface InternalCDORevisionsize - 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.InternalCDORevision.DO_NOT_CREATE_LISTpublic void read(CDODataInput in) throws java.io.IOException
read in interface InternalCDORevisionjava.io.IOExceptionpublic boolean readValues(CDODataInput in) throws java.io.IOException
readValues in interface InternalCDORevisionjava.io.IOExceptionpublic void write(CDODataOutput out, int referenceChunk) throws java.io.IOException
write in interface InternalCDORevisionjava.io.IOExceptionpublic void write(CDODataOutput out, int referenceChunk, CDOBranchPoint securityContext) throws java.io.IOException
write in interface InternalCDORevisionjava.io.IOExceptionpublic void writeValues(CDODataOutput out, int referenceChunk) throws java.io.IOException
writeValues in interface InternalCDORevisionjava.io.IOExceptionpublic void convertEObjects(CDOIDProvider oidProvider)
convertEObjects in interface InternalCDORevisionpublic EStructuralFeature[] clearValues()
clearValues in interface InternalCDORevisionpublic java.lang.String getResourceNodeName()
getResourceNodeName in interface InternalCDORevisionpublic CDOPermission getPermission()
getPermission in interface CDORevisionpublic void setPermission(CDOPermission permission)
setPermission in interface InternalCDORevisionpublic boolean isReadable()
isReadable in interface CDORevisionpublic boolean isWritable()
isWritable in interface CDORevisionpublic void accept(CDORevisionValueVisitor visitor)
accept in interface CDORevisionDatapublic void accept(CDORevisionValueVisitor visitor, Predicate<EStructuralFeature> filter)
accept in interface CDORevisionDatapublic boolean bypassPermissionChecks(boolean on)
InternalCDORevisionThis 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).
bypassPermissionChecks in interface InternalCDORevisionpublic boolean isListPreserving()
isListPreserving in interface InternalCDORevisionpublic void setListPreserving()
InternalCDORevisionInternalCDORevision.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.setListPreserving in interface InternalCDORevisionpublic void freeze()
freeze in interface InternalCDORevisionpublic boolean isFrozen()
isFrozen in interface InternalCDORevisionpublic boolean isUnchunked()
isUnchunked in interface InternalCDORevisionpublic void setUnchunked()
setUnchunked in interface InternalCDORevisionCopyright (c) 2004-2019 Eike Stepper (Loehne, 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