Class BaseCDORevision

    • Constructor Detail

      • BaseCDORevision

        public BaseCDORevision​(EClass eClass)
        Since:
        3.0
    • Method Detail

      • read

        public void read​(CDODataInput in)
                  throws java.io.IOException
        Throws:
        java.io.IOException
        Since:
        3.0
      • readSystemValues

        protected void readSystemValues​(CDODataInput in)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
        Since:
        4.0
      • readValues

        public boolean readValues​(CDODataInput in)
                           throws java.io.IOException
        Throws:
        java.io.IOException
        Since:
        4.3
      • write

        public void write​(CDODataOutput out,
                          int referenceChunk)
                   throws java.io.IOException
        Throws:
        java.io.IOException
        Since:
        4.0
      • write

        public void write​(CDODataOutput out,
                          int referenceChunk,
                          CDOBranchPoint securityContext)
                   throws java.io.IOException
        Throws:
        java.io.IOException
        Since:
        4.1
      • writeSystemValues

        protected void writeSystemValues​(CDODataOutput out)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
        Since:
        4.0
      • writeValues

        public void writeValues​(CDODataOutput out,
                                int referenceChunk)
                         throws java.io.IOException
        Throws:
        java.io.IOException
        Since:
        4.3
      • getID

        public CDOID getID()
      • setID

        public void setID​(CDOID id)
      • 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)
      • getResourceID

        public CDOID getResourceID()
      • setResourceID

        public void setResourceID​(CDOID resourceID)
      • getContainerID

        public java.lang.Object getContainerID()
      • setContainerID

        public void setContainerID​(java.lang.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)
      • contains

        public boolean contains​(EStructuralFeature feature,
                                java.lang.Object value)
      • lastIndexOf

        public int lastIndexOf​(EStructuralFeature feature,
                               java.lang.Object value)
      • add

        public void add​(EStructuralFeature feature,
                        int index,
                        java.lang.Object value)
      • move

        public java.lang.Object move​(EStructuralFeature feature,
                                     int targetIndex,
                                     int sourceIndex)
      • set

        public java.lang.Object set​(EStructuralFeature feature,
                                    int index,
                                    java.lang.Object value)
      • adjustReferences

        public boolean adjustReferences​(CDOReferenceAdjuster referenceAdjuster)
        Since:
        4.0
      • adjustBranches

        public void adjustBranches​(CDOBranchManager newBranchManager)
        Since:
        4.3
      • setValue

        public java.lang.Object setValue​(EStructuralFeature feature,
                                         java.lang.Object value)
      • getOrCreateList

        public CDOList getOrCreateList​(EStructuralFeature feature,
                                       int size)
        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!

        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.
        See Also:
        InternalCDORevision.DO_NOT_CREATE_LIST
      • getResourceNodeName

        public java.lang.String getResourceNodeName()
        Since:
        4.3
      • getPermission

        public CDOPermission getPermission()
        Since:
        4.1
      • setPermission

        public void setPermission​(CDOPermission permission)
        Since:
        4.1
      • 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).

        Since:
        4.3
      • isListPreserving

        public boolean isListPreserving()
        Since:
        4.3
      • freeze

        public void freeze()
        Since:
        4.1
      • unfreeze

        public void unfreeze()
        Since:
        4.11
      • isFrozen

        public boolean isFrozen()
        Since:
        4.2
      • isUnchunked

        public boolean isUnchunked()
        Since:
        4.1
      • setUnchunked

        public void setUnchunked()
        Since:
        4.1
      • getValue

        protected java.lang.Object getValue​(int featureIndex)
      • setValue

        protected void setValue​(int featureIndex,
                                java.lang.Object value)
      • initValues

        protected abstract void initValues​(EStructuralFeature[] allPersistentFeatures)
      • doGetValue

        protected abstract java.lang.Object doGetValue​(int featureIndex)
        Since:
        4.1
      • doSetValue

        protected abstract void doSetValue​(int featureIndex,
                                           java.lang.Object value)
        Since:
        4.1
      • checkNoFeatureMap

        @Deprecated
        public static void checkNoFeatureMap​(EStructuralFeature feature)
        Deprecated.
        As of 4.5 feature maps are no longer supported.
      • remapID

        public static java.lang.Object remapID​(java.lang.Object value,
                                               java.util.Map<CDOID,​CDOID> idMappings,
                                               boolean allowUnmappedTempIDs)
      • formatFlags

        public static java.lang.String formatFlags​(BaseCDORevision revision)
        Since:
        4.3