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
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.CDOBranchPoint
INVALID_DATE, UNSPECIFIED_DATEFields inherited from interface org.eclipse.emf.cdo.common.branch.CDOBranchVersion
UNSPECIFIED_VERSIONFields inherited from interface org.eclipse.emf.cdo.common.revision.CDORevision
DEPTH_INFINITE, DEPTH_NONE, FIRST_VERSION, MAIN_BRANCH_ID, PERMISSION_PROVIDER, UNCHUNKEDFields inherited from interface org.eclipse.emf.cdo.common.revision.CDORevisionData
NILFields inherited from interface org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision
DO_NOT_CREATE_LIST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(CDORevisionValueVisitor visitor) voidaccept(CDORevisionValueVisitor visitor, Predicate<EStructuralFeature> filter) voidaccept(CDORevisionValueVisitor visitor, org.eclipse.net4j.util.Predicate<EStructuralFeature> filter) Deprecated.voidadd(EStructuralFeature feature, int index, 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(EStructuralFeature feature) compare(CDORevision origin) booleancontains(EStructuralFeature feature, Object value) voidconvertEObjects(CDOIDProvider oidProvider) copy()data()voidfreeze()get(EStructuralFeature feature, int index) Returns the branch of this branch version.intProvides the input to the calculation of the feature in the container revision that actually holds this revision.abstract InternalCDORevisiongetID()getList(EStructuralFeature feature) Deprecated.getList(EStructuralFeature feature, int initialCapacity) Deprecated.getListOrNull(EStructuralFeature feature) getOrCreateList(EStructuralFeature feature) Same asgetOrCreateList(feature, 0).getOrCreateList(EStructuralFeature feature, int size) Returns the list that represents the passed feature, possibly creates it if needed.longlongReturns the time stamp of this branch point, or the fixed special time stampunspecifiedif this branch point marks theheadof a branch.getValue(EStructuralFeature feature) Should never returnCDORevisionData.NILintReturns the version number of this branch version.inthashCode(EStructuralFeature feature) intindexOf(EStructuralFeature feature, Object value) booleanisEmpty(EStructuralFeature feature) booleanisFrozen()booleanReturnstrueexactly ifCDOBranchPoint.getTimeStamp()does not returnCDOBranchPoint.UNSPECIFIED_DATE,falseotherwise.booleanbooleanbooleanbooleanbooleanbooleanbooleanisValid(long timeStamp) booleanisValid(CDOBranchPoint branchPoint) booleanintlastIndexOf(EStructuralFeature feature, Object value) voidmerge(CDORevisionDelta delta) move(EStructuralFeature feature, int targetIndex, int sourceIndex) voidread(CDODataInput in) booleanremove(EStructuralFeature feature, int index) revision()set(EStructuralFeature feature, int index, Object value) voidsetBranchPoint(CDOBranchPoint branchPoint) voidsetContainerID(Object containerID) voidsetContainingFeatureID(int containingFeatureID) voidvoidsetList(EStructuralFeature feature, InternalCDOList list) voidThe 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) voidsetValue(EStructuralFeature feature, Object value) voidsetVersion(int version) intsize(EStructuralFeature feature) Object[]toArray(EStructuralFeature feature) <T> T[]toArray(EStructuralFeature feature, T[] array) voidunset(EStructuralFeature feature) voidwrite(CDODataOutput out, int referenceChunk) voidwrite(CDODataOutput out, int referenceChunk, CDOBranchPoint securityContext) voidwriteValues(CDODataOutput out, int referenceChunk)
-
Constructor Details
-
DelegatingCDORevision
public DelegatingCDORevision()
-
-
Method Details
-
getDelegate
-
getRevisionForID
- Specified by:
getRevisionForIDin interfaceInternalCDORevision- Since:
- 4.2
-
getProperRevision
- Specified by:
getProperRevisionin interfaceInternalCDORevision- Since:
- 4.2
-
adjustReferences
- Specified by:
adjustReferencesin interfaceCDOReferenceAdjustable- Since:
- 4.0
-
adjustBranches
- Specified by:
adjustBranchesin interfaceCDOBranchAdjustable- Since:
- 4.3
-
getTimeStamp
public 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 interfaceCDOBranchPoint- Specified by:
getTimeStampin interfaceCDOTimeProvider
-
getBranch
Description copied from interface:CDOBranchVersionReturns the branch of this branch version.- Specified by:
getBranchin interfaceCDOBranchPoint- Specified by:
getBranchin interfaceCDOBranchProvider- Specified by:
getBranchin interfaceCDOBranchVersion- Specified by:
getBranchin interfaceInternalCDORevision- Since:
- 4.2
-
isHistorical
public boolean isHistorical()Description copied from interface:CDORevisionReturnstrueexactly ifCDOBranchPoint.getTimeStamp()does not returnCDOBranchPoint.UNSPECIFIED_DATE,falseotherwise.- Specified by:
isHistoricalin interfaceCDORevision
-
getID
- Specified by:
getIDin interfaceCDOIdentifiable
-
revision
- Specified by:
revisionin interfaceCDORevisionData
-
getResourceID
- Specified by:
getResourceIDin interfaceCDORevisionData
-
getContainerID
- Specified by:
getContainerIDin interfaceCDORevisionData
-
getContainingFeatureID
public 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 interfaceCDORevisionData- See Also:
-
get
- Specified by:
getin interfaceCDORevisionData
-
getEClass
- Specified by:
getEClassin interfaceCDORevision
-
getVersion
public int getVersion()Description copied from interface:CDOBranchVersionReturns the version number of this branch version.- Specified by:
getVersionin interfaceCDOBranchVersion- Specified by:
getVersionin interfaceCDOIDAndVersion- Specified by:
getVersionin interfaceCDOVersionProvider
-
size
- Specified by:
sizein interfaceCDORevisionData
-
getRevised
public long getRevised()- Specified by:
getRevisedin interfaceCDORevisable
-
isEmpty
- Specified by:
isEmptyin interfaceCDORevisionData
-
isValid
public boolean isValid(long timeStamp) - Specified by:
isValidin interfaceCDORevision
-
isValid
- Specified by:
isValidin interfaceCDORevision- Since:
- 4.0
-
copy
- Specified by:
copyin interfaceCDORevision- Specified by:
copyin interfaceInternalCDORevision- Since:
- 4.0
-
getClassInfo
- Specified by:
getClassInfoin interfaceCDORevision- Specified by:
getClassInfoin interfaceInternalCDORevision- Since:
- 4.2
-
setID
- Specified by:
setIDin interfaceInternalCDORevision
-
contains
- Specified by:
containsin interfaceCDORevisionData
-
isResourceNode
public boolean isResourceNode()- Specified by:
isResourceNodein interfaceCDORevision
-
setVersion
public void setVersion(int version) - Specified by:
setVersionin interfaceInternalCDORevision
-
isResourceFolder
public boolean isResourceFolder()- Specified by:
isResourceFolderin interfaceCDORevision
-
indexOf
- Specified by:
indexOfin interfaceCDORevisionData
-
isResource
public boolean isResource()- Specified by:
isResourcein interfaceCDORevision
-
setBranchPoint
- Specified by:
setBranchPointin interfaceInternalCDORevision
-
adjustForCommit
- Specified by:
adjustForCommitin interfaceInternalCDORevision
-
data
- Specified by:
datain interfaceCDORevision
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceCDORevisionData
-
setRevised
public void setRevised(long revised) - Specified by:
setRevisedin interfaceInternalCDORevision
-
compare
- Specified by:
comparein interfaceCDORevision- Specified by:
comparein interfaceInternalCDORevision
-
setResourceID
- Specified by:
setResourceIDin interfaceInternalCDORevision
-
merge
- Specified by:
mergein interfaceCDORevision
-
toArray
- Specified by:
toArrayin interfaceCDORevisionData
-
setContainerID
- Specified by:
setContainerIDin interfaceInternalCDORevision
-
setContainingFeatureID
public void setContainingFeatureID(int containingFeatureID) - Specified by:
setContainingFeatureIDin interfaceInternalCDORevision
-
toArray
- Specified by:
toArrayin interfaceCDORevisionData
-
add
- Specified by:
addin interfaceInternalCDORevision
-
hashCode
- Specified by:
hashCodein interfaceCDORevisionData
-
clear
- Specified by:
clearin interfaceInternalCDORevision
-
move
- Specified by:
movein interfaceInternalCDORevision
-
remove
- Specified by:
removein interfaceInternalCDORevision
-
set
- Specified by:
setin interfaceInternalCDORevision
-
unset
- Specified by:
unsetin interfaceInternalCDORevision
-
getValue
Description copied from interface:InternalCDORevisionShould never returnCDORevisionData.NIL- Specified by:
getValuein interfaceInternalCDORevision
-
setValue
- Specified by:
setValuein interfaceInternalCDORevision
-
setList
- Specified by:
setListin interfaceInternalCDORevision
-
getList
Deprecated.- Specified by:
getListin interfaceInternalCDORevision
-
getList
Deprecated.- Specified by:
getListin interfaceInternalCDORevision
-
getListOrNull
- Specified by:
getListOrNullin interfaceInternalCDORevision
-
getOrCreateList
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 interfaceInternalCDORevision
-
getOrCreateList
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 interfaceInternalCDORevisionsize- 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 returnnullin this case.- See Also:
-
read
- Specified by:
readin interfaceInternalCDORevision- Throws:
IOException
-
readValues
- Specified by:
readValuesin interfaceInternalCDORevision- Throws:
IOException- Since:
- 4.3
-
write
- Specified by:
writein interfaceInternalCDORevision- Throws:
IOException
-
write
public void write(CDODataOutput out, int referenceChunk, CDOBranchPoint securityContext) throws IOException - Specified by:
writein interfaceInternalCDORevision- Throws:
IOException- Since:
- 4.1
-
writeValues
- Specified by:
writeValuesin interfaceInternalCDORevision- Throws:
IOException- Since:
- 4.3
-
convertEObjects
- Specified by:
convertEObjectsin interfaceInternalCDORevision
-
clearValues
- Specified by:
clearValuesin interfaceInternalCDORevision- Since:
- 4.2
-
getResourceNodeName
- Specified by:
getResourceNodeNamein interfaceInternalCDORevision- Since:
- 4.3
-
getPermission
- Specified by:
getPermissionin interfaceCDORevision- Since:
- 4.1
-
setPermission
- Specified by:
setPermissionin interfaceInternalCDORevision- Since:
- 4.1
-
isReadable
public boolean isReadable()- Specified by:
isReadablein interfaceCDORevision- Since:
- 4.1
-
isWritable
public boolean isWritable()- Specified by:
isWritablein interfaceCDORevision- Since:
- 4.1
-
accept
- Specified by:
acceptin interfaceCDORevisionData- Since:
- 4.2
-
accept
@Deprecated public void accept(CDORevisionValueVisitor visitor, org.eclipse.net4j.util.Predicate<EStructuralFeature> filter) Deprecated.- Specified by:
acceptin interfaceCDORevisionData- Since:
- 4.2
-
accept
- Specified by:
acceptin interfaceCDORevisionData- Since:
- 4.2
-
bypassPermissionChecks
public 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 interfaceInternalCDORevision- Since:
- 4.3
-
isListPreserving
public boolean isListPreserving()- Specified by:
isListPreservingin interfaceInternalCDORevision- Since:
- 4.3
-
setListPreserving
public 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 interfaceInternalCDORevision- Since:
- 4.3
-
freeze
public void freeze()- Specified by:
freezein interfaceInternalCDORevision- Since:
- 4.0
-
isFrozen
public boolean isFrozen()- Specified by:
isFrozenin interfaceInternalCDORevision- Since:
- 4.2
-
isUnchunked
public boolean isUnchunked()- Specified by:
isUnchunkedin interfaceInternalCDORevision- Since:
- 4.1
-
setUnchunked
public void setUnchunked()- Specified by:
setUnchunkedin interfaceInternalCDORevision- Since:
- 4.1
-