Class DelegatingCDORevision
- java.lang.Object
- 
- org.eclipse.emf.cdo.spi.common.revision.DelegatingCDORevision
 
- 
- All Implemented Interfaces:
- CDOBranchPoint,- CDOBranchProvider,- CDOBranchVersion,- CDOIdentifiable,- CDOIDAndVersion,- CDORevisable,- CDORevision,- CDORevisionData,- CDORevisionKey,- CDOTimeProvider,- CDOVersionProvider,- CDOBranchAdjustable,- CDOReferenceAdjustable,- InternalCDORevision
 
 public abstract class DelegatingCDORevision extends java.lang.Object implements InternalCDORevision If the meaning of this type isn't clear, there really should be more of a description here...- Since:
- 3.0
- Author:
- Eike Stepper
 
- 
- 
Field Summary- 
Fields inherited from interface org.eclipse.emf.cdo.common.branch.CDOBranchPointINVALID_DATE, UNSPECIFIED_DATE
 - 
Fields inherited from interface org.eclipse.emf.cdo.common.branch.CDOBranchVersionUNSPECIFIED_VERSION
 - 
Fields inherited from interface org.eclipse.emf.cdo.common.revision.CDORevisionDEPTH_INFINITE, DEPTH_NONE, FIRST_VERSION, MAIN_BRANCH_ID, PERMISSION_PROVIDER, UNCHUNKED
 - 
Fields inherited from interface org.eclipse.emf.cdo.common.revision.CDORevisionDataNIL
 - 
Fields inherited from interface org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionDO_NOT_CREATE_LIST
 
- 
 - 
Constructor SummaryConstructors Constructor Description DelegatingCDORevision()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaccept(CDORevisionValueVisitor visitor)voidaccept(CDORevisionValueVisitor visitor, java.util.function.Predicate<org.eclipse.emf.ecore.EStructuralFeature> filter)voidaccept(CDORevisionValueVisitor visitor, org.eclipse.net4j.util.Predicate<org.eclipse.emf.ecore.EStructuralFeature> filter)Deprecated.voidadd(org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.Object value)voidadjustBranches(CDOBranchManager newBranchManager)voidadjustForCommit(CDOBranch branch, long timeStamp)booleanadjustReferences(CDOReferenceAdjuster referenceAdjuster)booleanbypassPermissionChecks(boolean on)Enables or disables permission checking for this revision.voidclear(org.eclipse.emf.ecore.EStructuralFeature feature)org.eclipse.emf.ecore.EStructuralFeature[]clearValues()InternalCDORevisionDeltacompare(CDORevision origin)booleancontains(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)voidconvertEObjects(CDOIDProvider oidProvider)InternalCDORevisioncopy()CDORevisionDatadata()voidfreeze()java.lang.Objectget(org.eclipse.emf.ecore.EStructuralFeature feature, int index)InternalCDOBranchgetBranch()Returns the branch of this branch version.InternalCDOClassInfogetClassInfo()java.lang.ObjectgetContainerID()intgetContainingFeatureID()Provides the input to the calculation of the feature in the container revision that actually holds this revision.abstract InternalCDORevisiongetDelegate()org.eclipse.emf.ecore.EClassgetEClass()CDOIDgetID()CDOListgetList(org.eclipse.emf.ecore.EStructuralFeature feature)Deprecated.CDOListgetList(org.eclipse.emf.ecore.EStructuralFeature feature, int initialCapacity)Deprecated.CDOListgetListOrNull(org.eclipse.emf.ecore.EStructuralFeature feature)CDOListgetOrCreateList(org.eclipse.emf.ecore.EStructuralFeature feature)Same asgetOrCreateList(feature, 0).CDOListgetOrCreateList(org.eclipse.emf.ecore.EStructuralFeature feature, int size)Returns the list that represents the passed feature, possibly creates it if needed.CDOPermissiongetPermission()InternalCDORevisiongetProperRevision()CDOIDgetResourceID()java.lang.StringgetResourceNodeName()longgetRevised()InternalCDORevisiongetRevisionForID(CDOID id)longgetTimeStamp()Returns the time stamp of this branch point, or the fixed special time stampunspecifiedif this branch point marks theheadof a branch.java.lang.ObjectgetValue(org.eclipse.emf.ecore.EStructuralFeature feature)Should never returnCDORevisionData.NILintgetVersion()Returns the version number of this branch version.inthashCode(org.eclipse.emf.ecore.EStructuralFeature feature)intindexOf(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)booleanisEmpty(org.eclipse.emf.ecore.EStructuralFeature feature)booleanisFrozen()booleanisHistorical()Returnstrueexactly ifCDOBranchPoint.getTimeStamp()does not returnCDOBranchPoint.UNSPECIFIED_DATE,falseotherwise.booleanisListPreserving()booleanisReadable()booleanisResource()booleanisResourceFolder()booleanisResourceNode()booleanisUnchunked()booleanisValid(long timeStamp)booleanisValid(CDOBranchPoint branchPoint)booleanisWritable()intlastIndexOf(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)voidmerge(CDORevisionDelta delta)java.lang.Objectmove(org.eclipse.emf.ecore.EStructuralFeature feature, int targetIndex, int sourceIndex)voidread(CDODataInput in)booleanreadValues(CDODataInput in)java.lang.Objectremove(org.eclipse.emf.ecore.EStructuralFeature feature, int index)CDORevisionrevision()java.lang.Objectset(org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.Object value)voidsetBranchPoint(CDOBranchPoint branchPoint)voidsetContainerID(java.lang.Object containerID)voidsetContainingFeatureID(int containingFeatureID)voidsetID(CDOID id)voidsetList(org.eclipse.emf.ecore.EStructuralFeature feature, InternalCDOList list)voidsetListPreserving()The default behavior of a revision for calls to theInternalCDORevision.clear(EStructuralFeature)andInternalCDORevision.unset(EStructuralFeature)methods is to set the feature's value to null (discarding the value itself, a List).voidsetPermission(CDOPermission permission)voidsetResourceID(CDOID resourceID)voidsetRevised(long revised)voidsetUnchunked()java.lang.ObjectsetValue(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)voidsetVersion(int version)intsize(org.eclipse.emf.ecore.EStructuralFeature feature)java.lang.Object[]toArray(org.eclipse.emf.ecore.EStructuralFeature feature)<T> T[]toArray(org.eclipse.emf.ecore.EStructuralFeature feature, T[] array)voidunset(org.eclipse.emf.ecore.EStructuralFeature feature)voidwrite(CDODataOutput out, int referenceChunk)voidwrite(CDODataOutput out, int referenceChunk, CDOBranchPoint securityContext)voidwriteValues(CDODataOutput out, int referenceChunk)
 
- 
- 
- 
Method Detail- 
getDelegatepublic abstract InternalCDORevision getDelegate() 
 - 
getRevisionForIDpublic InternalCDORevision getRevisionForID(CDOID id) - Specified by:
- getRevisionForIDin interface- InternalCDORevision
- Since:
- 4.2
 
 - 
getProperRevisionpublic InternalCDORevision getProperRevision() - Specified by:
- getProperRevisionin interface- InternalCDORevision
- Since:
- 4.2
 
 - 
adjustReferencespublic boolean adjustReferences(CDOReferenceAdjuster referenceAdjuster) - Specified by:
- adjustReferencesin interface- CDOReferenceAdjustable
- Since:
- 4.0
 
 - 
adjustBranchespublic void adjustBranches(CDOBranchManager newBranchManager) - Specified by:
- adjustBranchesin interface- CDOBranchAdjustable
- Since:
- 4.3
 
 - 
getTimeStamppublic long getTimeStamp() Description copied from interface:CDOBranchPointReturns the time stamp of this branch point, or the fixed special time stampunspecifiedif this branch point marks theheadof a branch.- Specified by:
- getTimeStampin interface- CDOBranchPoint
- Specified by:
- getTimeStampin interface- CDOTimeProvider
 
 - 
getBranchpublic InternalCDOBranch getBranch() Description copied from interface:CDOBranchVersionReturns the branch of this branch version.- Specified by:
- getBranchin interface- CDOBranchPoint
- Specified by:
- getBranchin interface- CDOBranchProvider
- Specified by:
- getBranchin interface- CDOBranchVersion
- Specified by:
- getBranchin interface- InternalCDORevision
- Since:
- 4.2
 
 - 
isHistoricalpublic boolean isHistorical() Description copied from interface:CDORevisionReturnstrueexactly ifCDOBranchPoint.getTimeStamp()does not returnCDOBranchPoint.UNSPECIFIED_DATE,falseotherwise.- Specified by:
- isHistoricalin interface- CDORevision
 
 - 
getIDpublic CDOID getID() - Specified by:
- getIDin interface- CDOIdentifiable
 
 - 
revisionpublic CDORevision revision() - Specified by:
- revisionin interface- CDORevisionData
 
 - 
getResourceIDpublic CDOID getResourceID() - Specified by:
- getResourceIDin interface- CDORevisionData
 
 - 
getContainerIDpublic java.lang.Object getContainerID() - Specified by:
- getContainerIDin interface- CDORevisionData
 
 - 
getContainingFeatureIDpublic int getContainingFeatureID() Description copied from interface:CDORevisionDataProvides the input to the calculation of the feature in the container revision that actually holds this revision.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();- Specified by:
- getContainingFeatureIDin interface- CDORevisionData
- See Also:
- BasicEObjectImpl.eContainingFeature(),- CDORevisionData.getContainerID()
 
 - 
getpublic java.lang.Object get(org.eclipse.emf.ecore.EStructuralFeature feature, int index)- Specified by:
- getin interface- CDORevisionData
 
 - 
getEClasspublic org.eclipse.emf.ecore.EClass getEClass() - Specified by:
- getEClassin interface- CDORevision
 
 - 
getVersionpublic int getVersion() Description copied from interface:CDOBranchVersionReturns the version number of this branch version.- Specified by:
- getVersionin interface- CDOBranchVersion
- Specified by:
- getVersionin interface- CDOIDAndVersion
- Specified by:
- getVersionin interface- CDOVersionProvider
 
 - 
sizepublic int size(org.eclipse.emf.ecore.EStructuralFeature feature) - Specified by:
- sizein interface- CDORevisionData
 
 - 
getRevisedpublic long getRevised() - Specified by:
- getRevisedin interface- CDORevisable
 
 - 
isEmptypublic boolean isEmpty(org.eclipse.emf.ecore.EStructuralFeature feature) - Specified by:
- isEmptyin interface- CDORevisionData
 
 - 
isValidpublic boolean isValid(long timeStamp) - Specified by:
- isValidin interface- CDORevision
 
 - 
isValidpublic boolean isValid(CDOBranchPoint branchPoint) - Specified by:
- isValidin interface- CDORevision
- Since:
- 4.0
 
 - 
copypublic InternalCDORevision copy() - Specified by:
- copyin interface- CDORevision
- Specified by:
- copyin interface- InternalCDORevision
- Since:
- 4.0
 
 - 
getClassInfopublic InternalCDOClassInfo getClassInfo() - Specified by:
- getClassInfoin interface- CDORevision
- Specified by:
- getClassInfoin interface- InternalCDORevision
- Since:
- 4.2
 
 - 
setIDpublic void setID(CDOID id) - Specified by:
- setIDin interface- InternalCDORevision
 
 - 
containspublic boolean contains(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)- Specified by:
- containsin interface- CDORevisionData
 
 - 
isResourceNodepublic boolean isResourceNode() - Specified by:
- isResourceNodein interface- CDORevision
 
 - 
setVersionpublic void setVersion(int version) - Specified by:
- setVersionin interface- InternalCDORevision
 
 - 
isResourceFolderpublic boolean isResourceFolder() - Specified by:
- isResourceFolderin interface- CDORevision
 
 - 
indexOfpublic int indexOf(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)- Specified by:
- indexOfin interface- CDORevisionData
 
 - 
isResourcepublic boolean isResource() - Specified by:
- isResourcein interface- CDORevision
 
 - 
setBranchPointpublic void setBranchPoint(CDOBranchPoint branchPoint) - Specified by:
- setBranchPointin interface- InternalCDORevision
 
 - 
adjustForCommitpublic void adjustForCommit(CDOBranch branch, long timeStamp) - Specified by:
- adjustForCommitin interface- InternalCDORevision
 
 - 
datapublic CDORevisionData data() - Specified by:
- datain interface- CDORevision
 
 - 
lastIndexOfpublic int lastIndexOf(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)- Specified by:
- lastIndexOfin interface- CDORevisionData
 
 - 
setRevisedpublic void setRevised(long revised) - Specified by:
- setRevisedin interface- InternalCDORevision
 
 - 
comparepublic InternalCDORevisionDelta compare(CDORevision origin) - Specified by:
- comparein interface- CDORevision
- Specified by:
- comparein interface- InternalCDORevision
 
 - 
setResourceIDpublic void setResourceID(CDOID resourceID) - Specified by:
- setResourceIDin interface- InternalCDORevision
 
 - 
mergepublic void merge(CDORevisionDelta delta) - Specified by:
- mergein interface- CDORevision
 
 - 
toArraypublic <T> T[] toArray(org.eclipse.emf.ecore.EStructuralFeature feature, T[] array)- Specified by:
- toArrayin interface- CDORevisionData
 
 - 
setContainerIDpublic void setContainerID(java.lang.Object containerID) - Specified by:
- setContainerIDin interface- InternalCDORevision
 
 - 
setContainingFeatureIDpublic void setContainingFeatureID(int containingFeatureID) - Specified by:
- setContainingFeatureIDin interface- InternalCDORevision
 
 - 
toArraypublic java.lang.Object[] toArray(org.eclipse.emf.ecore.EStructuralFeature feature) - Specified by:
- toArrayin interface- CDORevisionData
 
 - 
addpublic void add(org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.Object value)- Specified by:
- addin interface- InternalCDORevision
 
 - 
hashCodepublic int hashCode(org.eclipse.emf.ecore.EStructuralFeature feature) - Specified by:
- hashCodein interface- CDORevisionData
 
 - 
clearpublic void clear(org.eclipse.emf.ecore.EStructuralFeature feature) - Specified by:
- clearin interface- InternalCDORevision
 
 - 
movepublic java.lang.Object move(org.eclipse.emf.ecore.EStructuralFeature feature, int targetIndex, int sourceIndex)- Specified by:
- movein interface- InternalCDORevision
 
 - 
removepublic java.lang.Object remove(org.eclipse.emf.ecore.EStructuralFeature feature, int index)- Specified by:
- removein interface- InternalCDORevision
 
 - 
setpublic java.lang.Object set(org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.Object value)- Specified by:
- setin interface- InternalCDORevision
 
 - 
unsetpublic void unset(org.eclipse.emf.ecore.EStructuralFeature feature) - Specified by:
- unsetin interface- InternalCDORevision
 
 - 
getValuepublic java.lang.Object getValue(org.eclipse.emf.ecore.EStructuralFeature feature) Description copied from interface:InternalCDORevisionShould never returnCDORevisionData.NIL- Specified by:
- getValuein interface- InternalCDORevision
 
 - 
setValuepublic java.lang.Object setValue(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)- Specified by:
- setValuein interface- InternalCDORevision
 
 - 
setListpublic void setList(org.eclipse.emf.ecore.EStructuralFeature feature, InternalCDOList list)- Specified by:
- setListin interface- InternalCDORevision
 
 - 
getList@Deprecated public CDOList getList(org.eclipse.emf.ecore.EStructuralFeature feature) Deprecated.- Specified by:
- getListin interface- InternalCDORevision
 
 - 
getList@Deprecated public CDOList getList(org.eclipse.emf.ecore.EStructuralFeature feature, int initialCapacity) Deprecated.- Specified by:
- getListin interface- InternalCDORevision
 
 - 
getListOrNullpublic CDOList getListOrNull(org.eclipse.emf.ecore.EStructuralFeature feature) - Specified by:
- getListOrNullin interface- InternalCDORevision
 
 - 
getOrCreateListpublic CDOList getOrCreateList(org.eclipse.emf.ecore.EStructuralFeature feature) Description copied from interface:InternalCDORevisionSame asgetOrCreateList(feature, 0).Warning: Must be used with caution because list creation for an unsettablefeature implies a transition from UNSET to SET!- Specified by:
- getOrCreateListin interface- InternalCDORevision
 
 - 
getOrCreateListpublic CDOList getOrCreateList(org.eclipse.emf.ecore.EStructuralFeature feature, int size) Description copied from interface:InternalCDORevisionReturns the list that represents the passed feature, possibly creates it if needed.Warning: Must be used with caution because list creation for an unsettablefeature implies a transition from UNSET to SET!- Specified by:
- getOrCreateListin interface- InternalCDORevision
- 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- nullin this case.
- See Also:
- InternalCDORevision.DO_NOT_CREATE_LIST
 
 - 
readpublic void read(CDODataInput in) throws java.io.IOException - Specified by:
- readin interface- InternalCDORevision
- Throws:
- java.io.IOException
 
 - 
readValuespublic boolean readValues(CDODataInput in) throws java.io.IOException - Specified by:
- readValuesin interface- InternalCDORevision
- Throws:
- java.io.IOException
- Since:
- 4.3
 
 - 
writepublic void write(CDODataOutput out, int referenceChunk) throws java.io.IOException - Specified by:
- writein interface- InternalCDORevision
- Throws:
- java.io.IOException
 
 - 
writepublic void write(CDODataOutput out, int referenceChunk, CDOBranchPoint securityContext) throws java.io.IOException - Specified by:
- writein interface- InternalCDORevision
- Throws:
- java.io.IOException
- Since:
- 4.1
 
 - 
writeValuespublic void writeValues(CDODataOutput out, int referenceChunk) throws java.io.IOException - Specified by:
- writeValuesin interface- InternalCDORevision
- Throws:
- java.io.IOException
- Since:
- 4.3
 
 - 
convertEObjectspublic void convertEObjects(CDOIDProvider oidProvider) - Specified by:
- convertEObjectsin interface- InternalCDORevision
 
 - 
clearValuespublic org.eclipse.emf.ecore.EStructuralFeature[] clearValues() - Specified by:
- clearValuesin interface- InternalCDORevision
- Since:
- 4.2
 
 - 
getResourceNodeNamepublic java.lang.String getResourceNodeName() - Specified by:
- getResourceNodeNamein interface- InternalCDORevision
- Since:
- 4.3
 
 - 
getPermissionpublic CDOPermission getPermission() - Specified by:
- getPermissionin interface- CDORevision
- Since:
- 4.1
 
 - 
setPermissionpublic void setPermission(CDOPermission permission) - Specified by:
- setPermissionin interface- InternalCDORevision
- Since:
- 4.1
 
 - 
isReadablepublic boolean isReadable() - Specified by:
- isReadablein interface- CDORevision
- Since:
- 4.1
 
 - 
isWritablepublic boolean isWritable() - Specified by:
- isWritablein interface- CDORevision
- Since:
- 4.1
 
 - 
acceptpublic void accept(CDORevisionValueVisitor visitor) - Specified by:
- acceptin interface- CDORevisionData
- Since:
- 4.2
 
 - 
accept@Deprecated public void accept(CDORevisionValueVisitor visitor, org.eclipse.net4j.util.Predicate<org.eclipse.emf.ecore.EStructuralFeature> filter) Deprecated.- Specified by:
- acceptin interface- CDORevisionData
- Since:
- 4.2
 
 - 
acceptpublic void accept(CDORevisionValueVisitor visitor, java.util.function.Predicate<org.eclipse.emf.ecore.EStructuralFeature> filter) - Specified by:
- acceptin interface- CDORevisionData
- Since:
- 4.2
 
 - 
bypassPermissionCheckspublic boolean bypassPermissionChecks(boolean on) Description copied from interface:InternalCDORevisionEnables or disables permission checking for this revision.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). - Specified by:
- bypassPermissionChecksin interface- InternalCDORevision
- Since:
- 4.3
 
 - 
isListPreservingpublic boolean isListPreserving() - Specified by:
- isListPreservingin interface- InternalCDORevision
- Since:
- 4.3
 
 - 
setListPreservingpublic void setListPreserving() Description copied from interface:InternalCDORevisionThe default behavior of a revision for calls to theInternalCDORevision.clear(EStructuralFeature)andInternalCDORevision.unset(EStructuralFeature)methods is to set the feature's value to null (discarding the value itself, a List). By calling thisInternalCDORevision.setListPreserving()method the default behavior is changed; instead of setting the feature's value to null, theList.clear()method is called on the feature's list instance.- Specified by:
- setListPreservingin interface- InternalCDORevision
- Since:
- 4.3
 
 - 
freezepublic void freeze() - Specified by:
- freezein interface- InternalCDORevision
- Since:
- 4.0
 
 - 
isFrozenpublic boolean isFrozen() - Specified by:
- isFrozenin interface- InternalCDORevision
- Since:
- 4.2
 
 - 
isUnchunkedpublic boolean isUnchunked() - Specified by:
- isUnchunkedin interface- InternalCDORevision
- Since:
- 4.1
 
 - 
setUnchunkedpublic void setUnchunked() - Specified by:
- setUnchunkedin interface- InternalCDORevision
- Since:
- 4.1
 
 
- 
 
-