org.eclipse.emf.cdo.spi.common.revision
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, CDOBranchVersion, CDOIDAndVersion, CDORevisable, CDORevision, CDORevisionData, CDORevisionKey, CDOReferenceAdjustable, InternalCDORevision
- public abstract class BaseCDORevision
- extends AbstractCDORevision
- Since:
- 3.0
- No Extend
- This class is not intended to be subclassed by clients.
Method Summary |
void |
add(EStructuralFeature feature,
int index,
Object value)
|
boolean |
adjustReferences(CDOReferenceAdjuster referenceAdjuster)
|
static void |
checkNoFeatureMap(EStructuralFeature feature)
|
void |
clear(EStructuralFeature feature)
|
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)
|
void |
freeze()
|
Object |
get(EStructuralFeature feature,
int index)
|
CDOBranch |
getBranch()
Returns the branch of this branch point, or null if this branch point is the
base of the main branch . |
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()
|
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 |
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)
|
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 |
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)
|
|
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)
|
Methods inherited from class org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision |
adjustForCommit, data, equals, getAllPersistentFeatures, getClassInfo, getEClass, getFeatureIndex, hashCode, isHistorical, isReadable, isResource, isResourceFolder, isResourceNode, isValid, isValid, isWritable, revision, setClassInfo, toString |
BaseCDORevision
public BaseCDORevision(EClass eClass)
- Since:
- 3.0
BaseCDORevision
protected BaseCDORevision(BaseCDORevision source)
read
public void read(CDODataInput in)
throws IOException
- Throws:
IOException
- Since:
- 3.0
readSystemValues
protected void readSystemValues(CDODataInput in)
throws IOException
- Throws:
IOException
- Since:
- 4.0
write
public void write(CDODataOutput out,
int referenceChunk)
throws IOException
- Throws:
IOException
- Since:
- 4.0
write
public void write(CDODataOutput out,
int referenceChunk,
CDOBranchPoint securityContext)
throws IOException
- Throws:
IOException
- Since:
- 4.1
writeSystemValues
protected void writeSystemValues(CDODataOutput out)
throws IOException
- Throws:
IOException
- Since:
- 4.0
convertEObjects
public void convertEObjects(CDOIDProvider idProvider)
- Since:
- 3.0
- See Also:
write(CDODataOutput, int)
getID
public CDOID getID()
setID
public void setID(CDOID id)
getBranch
public CDOBranch getBranch()
- Description copied from interface:
CDOBranchPoint
- Returns the branch of this branch point, or
null
if this branch point is the
base
of the main branch
.
- Since:
- 3.0
getTimeStamp
public long getTimeStamp()
- Description copied from interface:
CDOBranchPoint
- 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.
- Since:
- 3.0
setBranchPoint
public void setBranchPoint(CDOBranchPoint branchPoint)
- Since:
- 3.0
getVersion
public int getVersion()
- Description copied from interface:
CDOBranchVersion
- Returns the version number of this branch version.
setVersion
public void setVersion(int version)
getRevised
public long getRevised()
setRevised
public void setRevised(long revised)
compare
public InternalCDORevisionDelta compare(CDORevision origin)
merge
public void merge(CDORevisionDelta delta)
getResourceID
public CDOID getResourceID()
setResourceID
public void setResourceID(CDOID resourceID)
getContainerID
public Object getContainerID()
setContainerID
public void setContainerID(Object containerID)
getContainingFeatureID
public int getContainingFeatureID()
- Description copied from interface:
CDORevisionData
- Provides 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()
setContainingFeatureID
public void setContainingFeatureID(int containingFeatureID)
hashCode
public int hashCode(EStructuralFeature feature)
get
public Object get(EStructuralFeature feature,
int index)
contains
public boolean contains(EStructuralFeature feature,
Object value)
indexOf
public int indexOf(EStructuralFeature feature,
Object value)
lastIndexOf
public int lastIndexOf(EStructuralFeature feature,
Object value)
isEmpty
public boolean isEmpty(EStructuralFeature feature)
size
public int size(EStructuralFeature feature)
toArray
public Object[] toArray(EStructuralFeature feature)
toArray
public <T> T[] toArray(EStructuralFeature feature,
T[] array)
add
public void add(EStructuralFeature feature,
int index,
Object value)
clear
public void clear(EStructuralFeature feature)
move
public Object move(EStructuralFeature feature,
int targetIndex,
int sourceIndex)
remove
public Object remove(EStructuralFeature feature,
int index)
set
public Object set(EStructuralFeature feature,
int index,
Object value)
unset
public void unset(EStructuralFeature feature)
adjustReferences
public boolean adjustReferences(CDOReferenceAdjuster referenceAdjuster)
- Since:
- 4.0
getValue
public Object getValue(EStructuralFeature feature)
- Description copied from interface:
InternalCDORevision
- Should never return
CDORevisionData.NIL
setValue
public Object setValue(EStructuralFeature feature,
Object value)
getList
public CDOList getList(EStructuralFeature feature)
getList
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.
setList
public void setList(EStructuralFeature feature,
InternalCDOList list)
getPermission
public CDOPermission getPermission()
- Since:
- 4.1
setPermission
public void setPermission(CDOPermission permission)
- Since:
- 4.1
freeze
public void freeze()
- Since:
- 4.1
isUnchunked
public boolean isUnchunked()
- Since:
- 4.1
setUnchunked
public void setUnchunked()
- Since:
- 4.1
getValue
protected Object getValue(int featureIndex)
setValue
protected void setValue(int featureIndex,
Object value)
initValues
protected abstract void initValues(EStructuralFeature[] allPersistentFeatures)
doGetValue
protected abstract Object doGetValue(int featureIndex)
- Since:
- 4.1
doSetValue
protected abstract void doSetValue(int featureIndex,
Object value)
- Since:
- 4.1
checkNoFeatureMap
public static void checkNoFeatureMap(EStructuralFeature feature)
remapID
public static Object remapID(Object value,
Map<CDOID,CDOID> idMappings,
boolean allowUnmappedTempIDs)
Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.