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_DATE
Fields inherited from interface org.eclipse.emf.cdo.common.branch.CDOBranchVersion
UNSPECIFIED_VERSION
Fields inherited from interface org.eclipse.emf.cdo.common.revision.CDORevision
DEPTH_INFINITE, DEPTH_NONE, FIRST_VERSION, MAIN_BRANCH_ID, PERMISSION_PROVIDER, UNCHUNKED
Fields inherited from interface org.eclipse.emf.cdo.common.revision.CDORevisionData
NIL
Fields inherited from interface org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision
DO_NOT_CREATE_LIST
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(CDORevisionValueVisitor visitor) void
accept
(CDORevisionValueVisitor visitor, Predicate<EStructuralFeature> filter) void
accept
(CDORevisionValueVisitor visitor, org.eclipse.net4j.util.Predicate<EStructuralFeature> filter) Deprecated.void
add
(EStructuralFeature feature, int index, 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) compare
(CDORevision origin) boolean
contains
(EStructuralFeature feature, Object value) void
convertEObjects
(CDOIDProvider oidProvider) copy()
data()
void
freeze()
get
(EStructuralFeature feature, int index) Returns the branch of this branch version.int
Provides the input to the calculation of the feature in the container revision that actually holds this revision.abstract InternalCDORevision
getID()
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.long
long
Returns the time stamp of this branch point, or the fixed special time stampunspecified
if this branch point marks thehead
of a branch.getValue
(EStructuralFeature feature) Should never returnCDORevisionData.NIL
int
Returns the version number of this branch version.int
hashCode
(EStructuralFeature feature) int
indexOf
(EStructuralFeature feature, Object value) boolean
isEmpty
(EStructuralFeature feature) boolean
isFrozen()
boolean
Returnstrue
exactly ifCDOBranchPoint.getTimeStamp()
does not returnCDOBranchPoint.UNSPECIFIED_DATE
,false
otherwise.boolean
boolean
boolean
boolean
boolean
boolean
boolean
isValid
(long timeStamp) boolean
isValid
(CDOBranchPoint branchPoint) boolean
int
lastIndexOf
(EStructuralFeature feature, Object value) void
merge
(CDORevisionDelta delta) move
(EStructuralFeature feature, int targetIndex, int sourceIndex) void
read
(CDODataInput in) boolean
remove
(EStructuralFeature feature, int index) revision()
set
(EStructuralFeature feature, int index, Object value) void
setBranchPoint
(CDOBranchPoint branchPoint) void
setContainerID
(Object containerID) void
setContainingFeatureID
(int containingFeatureID) void
void
setList
(EStructuralFeature feature, InternalCDOList list) void
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).void
setPermission
(CDOPermission permission) void
setResourceID
(CDOID resourceID) void
setRevised
(long revised) void
setValue
(EStructuralFeature feature, Object value) void
setVersion
(int version) int
size
(EStructuralFeature feature) 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)
-
Constructor Details
-
DelegatingCDORevision
public DelegatingCDORevision()
-
-
Method Details
-
getDelegate
-
getRevisionForID
- Specified by:
getRevisionForID
in interfaceInternalCDORevision
- Since:
- 4.2
-
getProperRevision
- Specified by:
getProperRevision
in interfaceInternalCDORevision
- Since:
- 4.2
-
adjustReferences
- Specified by:
adjustReferences
in interfaceCDOReferenceAdjustable
- Since:
- 4.0
-
adjustBranches
- Specified by:
adjustBranches
in interfaceCDOBranchAdjustable
- Since:
- 4.3
-
getTimeStamp
public long getTimeStamp()Description copied from interface:CDOBranchPoint
Returns the time stamp of this branch point, or the fixed special time stampunspecified
if this branch point marks thehead
of a branch.- Specified by:
getTimeStamp
in interfaceCDOBranchPoint
- Specified by:
getTimeStamp
in interfaceCDOTimeProvider
-
getBranch
Description copied from interface:CDOBranchVersion
Returns the branch of this branch version.- Specified by:
getBranch
in interfaceCDOBranchPoint
- Specified by:
getBranch
in interfaceCDOBranchProvider
- Specified by:
getBranch
in interfaceCDOBranchVersion
- Specified by:
getBranch
in interfaceInternalCDORevision
- Since:
- 4.2
-
isHistorical
public boolean isHistorical()Description copied from interface:CDORevision
Returnstrue
exactly ifCDOBranchPoint.getTimeStamp()
does not returnCDOBranchPoint.UNSPECIFIED_DATE
,false
otherwise.- Specified by:
isHistorical
in interfaceCDORevision
-
getID
- Specified by:
getID
in interfaceCDOIdentifiable
-
revision
- Specified by:
revision
in interfaceCDORevisionData
-
getResourceID
- Specified by:
getResourceID
in interfaceCDORevisionData
-
getContainerID
- Specified by:
getContainerID
in interfaceCDORevisionData
-
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();
- Specified by:
getContainingFeatureID
in interfaceCDORevisionData
- See Also:
-
get
- Specified by:
get
in interfaceCDORevisionData
-
getEClass
- Specified by:
getEClass
in interfaceCDORevision
-
getVersion
public int getVersion()Description copied from interface:CDOBranchVersion
Returns the version number of this branch version.- Specified by:
getVersion
in interfaceCDOBranchVersion
- Specified by:
getVersion
in interfaceCDOIDAndVersion
- Specified by:
getVersion
in interfaceCDOVersionProvider
-
size
- Specified by:
size
in interfaceCDORevisionData
-
getRevised
public long getRevised()- Specified by:
getRevised
in interfaceCDORevisable
-
isEmpty
- Specified by:
isEmpty
in interfaceCDORevisionData
-
isValid
public boolean isValid(long timeStamp) - Specified by:
isValid
in interfaceCDORevision
-
isValid
- Specified by:
isValid
in interfaceCDORevision
- Since:
- 4.0
-
copy
- Specified by:
copy
in interfaceCDORevision
- Specified by:
copy
in interfaceInternalCDORevision
- Since:
- 4.0
-
getClassInfo
- Specified by:
getClassInfo
in interfaceCDORevision
- Specified by:
getClassInfo
in interfaceInternalCDORevision
- Since:
- 4.2
-
setID
- Specified by:
setID
in interfaceInternalCDORevision
-
contains
- Specified by:
contains
in interfaceCDORevisionData
-
isResourceNode
public boolean isResourceNode()- Specified by:
isResourceNode
in interfaceCDORevision
-
setVersion
public void setVersion(int version) - Specified by:
setVersion
in interfaceInternalCDORevision
-
isResourceFolder
public boolean isResourceFolder()- Specified by:
isResourceFolder
in interfaceCDORevision
-
indexOf
- Specified by:
indexOf
in interfaceCDORevisionData
-
isResource
public boolean isResource()- Specified by:
isResource
in interfaceCDORevision
-
setBranchPoint
- Specified by:
setBranchPoint
in interfaceInternalCDORevision
-
adjustForCommit
- Specified by:
adjustForCommit
in interfaceInternalCDORevision
-
data
- Specified by:
data
in interfaceCDORevision
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceCDORevisionData
-
setRevised
public void setRevised(long revised) - Specified by:
setRevised
in interfaceInternalCDORevision
-
compare
- Specified by:
compare
in interfaceCDORevision
- Specified by:
compare
in interfaceInternalCDORevision
-
setResourceID
- Specified by:
setResourceID
in interfaceInternalCDORevision
-
merge
- Specified by:
merge
in interfaceCDORevision
-
toArray
- Specified by:
toArray
in interfaceCDORevisionData
-
setContainerID
- Specified by:
setContainerID
in interfaceInternalCDORevision
-
setContainingFeatureID
public void setContainingFeatureID(int containingFeatureID) - Specified by:
setContainingFeatureID
in interfaceInternalCDORevision
-
toArray
- Specified by:
toArray
in interfaceCDORevisionData
-
add
- Specified by:
add
in interfaceInternalCDORevision
-
hashCode
- Specified by:
hashCode
in interfaceCDORevisionData
-
clear
- Specified by:
clear
in interfaceInternalCDORevision
-
move
- Specified by:
move
in interfaceInternalCDORevision
-
remove
- Specified by:
remove
in interfaceInternalCDORevision
-
set
- Specified by:
set
in interfaceInternalCDORevision
-
unset
- Specified by:
unset
in interfaceInternalCDORevision
-
getValue
Description copied from interface:InternalCDORevision
Should never returnCDORevisionData.NIL
- Specified by:
getValue
in interfaceInternalCDORevision
-
setValue
- Specified by:
setValue
in interfaceInternalCDORevision
-
setList
- Specified by:
setList
in interfaceInternalCDORevision
-
getList
Deprecated.- Specified by:
getList
in interfaceInternalCDORevision
-
getList
Deprecated.- Specified by:
getList
in interfaceInternalCDORevision
-
getListOrNull
- Specified by:
getListOrNull
in interfaceInternalCDORevision
-
getOrCreateList
Description copied from interface:InternalCDORevision
Same asgetOrCreateList(feature, 0)
.Warning: Must be used with caution because list creation for an
unsettable
feature implies a transition from UNSET to SET!- Specified by:
getOrCreateList
in interfaceInternalCDORevision
-
getOrCreateList
Description copied from interface:InternalCDORevision
Returns the list that represents the passed feature, possibly creates it if needed.Warning: Must be used with caution because list creation for an
unsettable
feature implies a transition from UNSET to SET!- Specified by:
getOrCreateList
in interfaceInternalCDORevision
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 returnnull
in this case.- See Also:
-
read
- Specified by:
read
in interfaceInternalCDORevision
- Throws:
IOException
-
readValues
- Specified by:
readValues
in interfaceInternalCDORevision
- Throws:
IOException
- Since:
- 4.3
-
write
- Specified by:
write
in interfaceInternalCDORevision
- Throws:
IOException
-
write
public void write(CDODataOutput out, int referenceChunk, CDOBranchPoint securityContext) throws IOException - Specified by:
write
in interfaceInternalCDORevision
- Throws:
IOException
- Since:
- 4.1
-
writeValues
- Specified by:
writeValues
in interfaceInternalCDORevision
- Throws:
IOException
- Since:
- 4.3
-
convertEObjects
- Specified by:
convertEObjects
in interfaceInternalCDORevision
-
clearValues
- Specified by:
clearValues
in interfaceInternalCDORevision
- Since:
- 4.2
-
getResourceNodeName
- Specified by:
getResourceNodeName
in interfaceInternalCDORevision
- Since:
- 4.3
-
getPermission
- Specified by:
getPermission
in interfaceCDORevision
- Since:
- 4.1
-
setPermission
- Specified by:
setPermission
in interfaceInternalCDORevision
- Since:
- 4.1
-
isReadable
public boolean isReadable()- Specified by:
isReadable
in interfaceCDORevision
- Since:
- 4.1
-
isWritable
public boolean isWritable()- Specified by:
isWritable
in interfaceCDORevision
- Since:
- 4.1
-
accept
- Specified by:
accept
in interfaceCDORevisionData
- Since:
- 4.2
-
accept
@Deprecated public void accept(CDORevisionValueVisitor visitor, org.eclipse.net4j.util.Predicate<EStructuralFeature> filter) Deprecated.- Specified by:
accept
in interfaceCDORevisionData
- Since:
- 4.2
-
accept
- Specified by:
accept
in interfaceCDORevisionData
- Since:
- 4.2
-
bypassPermissionChecks
public boolean bypassPermissionChecks(boolean on) Description copied from interface:InternalCDORevision
Enables 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:
bypassPermissionChecks
in interfaceInternalCDORevision
- Since:
- 4.3
-
isListPreserving
public boolean isListPreserving()- Specified by:
isListPreserving
in interfaceInternalCDORevision
- Since:
- 4.3
-
setListPreserving
public void setListPreserving()Description copied from interface:InternalCDORevision
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). 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:
setListPreserving
in interfaceInternalCDORevision
- Since:
- 4.3
-
freeze
public void freeze()- Specified by:
freeze
in interfaceInternalCDORevision
- Since:
- 4.0
-
isFrozen
public boolean isFrozen()- Specified by:
isFrozen
in interfaceInternalCDORevision
- Since:
- 4.2
-
isUnchunked
public boolean isUnchunked()- Specified by:
isUnchunked
in interfaceInternalCDORevision
- Since:
- 4.1
-
setUnchunked
public void setUnchunked()- Specified by:
setUnchunked
in interfaceInternalCDORevision
- Since:
- 4.1
-