Class BaseCDORevision
- java.lang.Object
- 
- org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision
- 
- org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision
 
 
- 
- All Implemented Interfaces:
- CDOBranchPoint,- CDOBranchProvider,- CDOBranchVersion,- CDOIdentifiable,- CDOIDAndVersion,- CDORevisable,- CDORevision,- CDORevisionData,- CDORevisionKey,- CDOTimeProvider,- CDOVersionProvider,- CDOBranchAdjustable,- CDOReferenceAdjustable,- InternalCDORevision
 
 public abstract class BaseCDORevision extends AbstractCDORevision If the meaning of this type isn't clear, there really should be more of a description here...- Since:
- 3.0
- Author:
- Eike Stepper
- No Extend
- This class is not intended to be subclassed by clients.
 
- 
- 
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 Modifier Constructor Description protectedBaseCDORevision(BaseCDORevision source)BaseCDORevision(org.eclipse.emf.ecore.EClass eClass)
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadd(org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.Object value)voidadjustBranches(CDOBranchManager newBranchManager)booleanadjustReferences(CDOReferenceAdjuster referenceAdjuster)booleanbypassPermissionChecks(boolean on)Enables or disables permission checking for this revision.static voidcheckNoFeatureMap(org.eclipse.emf.ecore.EStructuralFeature feature)Deprecated.As of 4.5feature mapsare no longer supported.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 idProvider)protected abstract java.lang.ObjectdoGetValue(int featureIndex)protected abstract voiddoSetValue(int featureIndex, java.lang.Object value)static java.lang.StringformatFlags(BaseCDORevision revision)voidfreeze()java.lang.Objectget(org.eclipse.emf.ecore.EStructuralFeature feature, int index)InternalCDOBranchgetBranch()Returns the branch of this branch version.java.lang.ObjectgetContainerID()intgetContainingFeatureID()Provides the input to the calculation of the feature in the container revision that actually holds this revision.CDOIDgetID()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()CDOIDgetResourceID()java.lang.StringgetResourceNodeName()longgetRevised()longgetTimeStamp()Returns the time stamp of this branch point, or the fixed special time stampunspecifiedif this branch point marks theheadof a branch.protected java.lang.ObjectgetValue(int featureIndex)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)protected abstract voidinitValues(org.eclipse.emf.ecore.EStructuralFeature[] allPersistentFeatures)booleanisEmpty(org.eclipse.emf.ecore.EStructuralFeature feature)booleanisFrozen()booleanisListPreserving()booleanisUnchunked()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)protected voidreadSystemValues(CDODataInput in)booleanreadValues(CDODataInput in)static java.lang.ObjectremapID(java.lang.Object value, java.util.Map<CDOID,CDOID> idMappings, boolean allowUnmappedTempIDs)java.lang.Objectremove(org.eclipse.emf.ecore.EStructuralFeature feature, int index)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()protected voidsetValue(int featureIndex, java.lang.Object value)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)voidunfreeze()voidunset(org.eclipse.emf.ecore.EStructuralFeature feature)voidwrite(CDODataOutput out, int referenceChunk)voidwrite(CDODataOutput out, int referenceChunk, CDOBranchPoint securityContext)protected voidwriteSystemValues(CDODataOutput out)voidwriteValues(CDODataOutput out, int referenceChunk)- 
Methods inherited from class org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevisionaccept, accept, accept, adjustForCommit, data, equals, getAllPersistentFeatures, getClassInfo, getEClass, getFeatureIndex, getList, getList, getProperRevision, getRevisionForID, hashCode, initClassInfo, isHistorical, isReadable, isResource, isResourceFolder, isResourceNode, isValid, isValid, isWritable, revision, toString
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisioncopy
 
- 
 
- 
- 
- 
Constructor Detail- 
BaseCDORevisionpublic BaseCDORevision(org.eclipse.emf.ecore.EClass eClass) - Since:
- 3.0
 
 - 
BaseCDORevisionprotected BaseCDORevision(BaseCDORevision source) 
 
- 
 - 
Method Detail- 
readpublic void read(CDODataInput in) throws java.io.IOException - Throws:
- java.io.IOException
- Since:
- 3.0
 
 - 
readSystemValuesprotected void readSystemValues(CDODataInput in) throws java.io.IOException - Throws:
- java.io.IOException
- Since:
- 4.0
 
 - 
readValuespublic boolean readValues(CDODataInput in) throws java.io.IOException - Throws:
- java.io.IOException
- Since:
- 4.3
 
 - 
writepublic void write(CDODataOutput out, int referenceChunk) throws java.io.IOException - Throws:
- java.io.IOException
- Since:
- 4.0
 
 - 
writepublic void write(CDODataOutput out, int referenceChunk, CDOBranchPoint securityContext) throws java.io.IOException - Throws:
- java.io.IOException
- Since:
- 4.1
 
 - 
writeSystemValuesprotected void writeSystemValues(CDODataOutput out) throws java.io.IOException - Throws:
- java.io.IOException
- Since:
- 4.0
 
 - 
writeValuespublic void writeValues(CDODataOutput out, int referenceChunk) throws java.io.IOException - Throws:
- java.io.IOException
- Since:
- 4.3
 
 - 
convertEObjectspublic void convertEObjects(CDOIDProvider idProvider) - Since:
- 3.0
- See Also:
- write(CDODataOutput, int)
 
 - 
getIDpublic CDOID getID() 
 - 
setIDpublic void setID(CDOID id) 
 - 
getBranchpublic InternalCDOBranch getBranch() Description copied from interface:CDOBranchVersionReturns the branch of this branch version.- Since:
- 4.2
 
 - 
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.- Since:
- 3.0
 
 - 
setBranchPointpublic void setBranchPoint(CDOBranchPoint branchPoint) - Since:
- 3.0
 
 - 
getVersionpublic int getVersion() Description copied from interface:CDOBranchVersionReturns the version number of this branch version.
 - 
setVersionpublic void setVersion(int version) 
 - 
getRevisedpublic long getRevised() 
 - 
setRevisedpublic void setRevised(long revised) 
 - 
comparepublic InternalCDORevisionDelta compare(CDORevision origin) 
 - 
mergepublic void merge(CDORevisionDelta delta) 
 - 
getResourceIDpublic CDOID getResourceID() 
 - 
setResourceIDpublic void setResourceID(CDOID resourceID) 
 - 
getContainerIDpublic java.lang.Object getContainerID() 
 - 
setContainerIDpublic void setContainerID(java.lang.Object containerID) 
 - 
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();- See Also:
- BasicEObjectImpl.eContainingFeature(),- CDORevisionData.getContainerID()
 
 - 
setContainingFeatureIDpublic void setContainingFeatureID(int containingFeatureID) 
 - 
hashCodepublic int hashCode(org.eclipse.emf.ecore.EStructuralFeature feature) 
 - 
getpublic java.lang.Object get(org.eclipse.emf.ecore.EStructuralFeature feature, int index)
 - 
containspublic boolean contains(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)
 - 
indexOfpublic int indexOf(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)
 - 
lastIndexOfpublic int lastIndexOf(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)
 - 
isEmptypublic boolean isEmpty(org.eclipse.emf.ecore.EStructuralFeature feature) 
 - 
sizepublic int size(org.eclipse.emf.ecore.EStructuralFeature feature) 
 - 
toArraypublic java.lang.Object[] toArray(org.eclipse.emf.ecore.EStructuralFeature feature) 
 - 
toArraypublic <T> T[] toArray(org.eclipse.emf.ecore.EStructuralFeature feature, T[] array)
 - 
addpublic void add(org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.Object value)
 - 
clearpublic void clear(org.eclipse.emf.ecore.EStructuralFeature feature) 
 - 
movepublic java.lang.Object move(org.eclipse.emf.ecore.EStructuralFeature feature, int targetIndex, int sourceIndex)
 - 
removepublic java.lang.Object remove(org.eclipse.emf.ecore.EStructuralFeature feature, int index)
 - 
setpublic java.lang.Object set(org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.Object value)
 - 
unsetpublic void unset(org.eclipse.emf.ecore.EStructuralFeature feature) 
 - 
adjustReferencespublic boolean adjustReferences(CDOReferenceAdjuster referenceAdjuster) - Since:
- 4.0
 
 - 
adjustBranchespublic void adjustBranches(CDOBranchManager newBranchManager) - Since:
- 4.3
 
 - 
getValuepublic java.lang.Object getValue(org.eclipse.emf.ecore.EStructuralFeature feature) Description copied from interface:InternalCDORevisionShould never returnCDORevisionData.NIL
 - 
setValuepublic java.lang.Object setValue(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)
 - 
getListOrNullpublic CDOList getListOrNull(org.eclipse.emf.ecore.EStructuralFeature feature) - Since:
- 4.7
 
 - 
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!
 - 
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!- 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
 
 - 
setListpublic void setList(org.eclipse.emf.ecore.EStructuralFeature feature, InternalCDOList list)
 - 
clearValuespublic org.eclipse.emf.ecore.EStructuralFeature[] clearValues() - Since:
- 4.2
 
 - 
getResourceNodeNamepublic java.lang.String getResourceNodeName() - Since:
- 4.3
 
 - 
getPermissionpublic CDOPermission getPermission() - Since:
- 4.1
 
 - 
setPermissionpublic void setPermission(CDOPermission permission) - Since:
- 4.1
 
 - 
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). - Since:
- 4.3
 
 - 
isListPreservingpublic boolean isListPreserving() - 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.- Since:
- 4.3
 
 - 
freezepublic void freeze() - Since:
- 4.1
 
 - 
unfreezepublic void unfreeze() - Since:
- 4.11
 
 - 
isFrozenpublic boolean isFrozen() - Since:
- 4.2
 
 - 
isUnchunkedpublic boolean isUnchunked() - Since:
- 4.1
 
 - 
setUnchunkedpublic void setUnchunked() - Since:
- 4.1
 
 - 
getValueprotected java.lang.Object getValue(int featureIndex) 
 - 
setValueprotected void setValue(int featureIndex, java.lang.Object value)
 - 
initValuesprotected abstract void initValues(org.eclipse.emf.ecore.EStructuralFeature[] allPersistentFeatures) 
 - 
doGetValueprotected abstract java.lang.Object doGetValue(int featureIndex) - Since:
- 4.1
 
 - 
doSetValueprotected abstract void doSetValue(int featureIndex, java.lang.Object value)- Since:
- 4.1
 
 - 
checkNoFeatureMap@Deprecated public static void checkNoFeatureMap(org.eclipse.emf.ecore.EStructuralFeature feature) Deprecated.As of 4.5feature mapsare no longer supported.
 - 
remapIDpublic static java.lang.Object remapID(java.lang.Object value, java.util.Map<CDOID,CDOID> idMappings, boolean allowUnmappedTempIDs)
 - 
formatFlagspublic static java.lang.String formatFlags(BaseCDORevision revision) - Since:
- 4.3
 
 
- 
 
-