Schnittstelle CDOView
- Alle Superschnittstellen:
CDOBranchPoint,CDOBranchProvider,CDOCommitHistory.Provider<CDOObject,,CDOObjectHistory> CDOCommonView,CDORevisionProvider,CDOTimeProvider,CDOUpdatable,org.eclipse.net4j.util.collection.Closeable,IAdaptable,org.eclipse.net4j.util.container.IContainer<CDOResourceNode>,org.eclipse.net4j.util.event.INotifier,org.eclipse.net4j.util.options.IOptionsContainer,org.eclipse.net4j.util.properties.IPropertiesContainer
- Alle bekannten Unterschnittstellen:
CDOTransaction,InternalCDOTransaction,InternalCDOView
- Alle bekannten Implementierungsklassen:
CDOPushTransaction
session at a
specific time at a specific branch.
If the time of a view is unspecified the objects
provided and managed by that view always show the latest state the repository graph.
Objects that are accessed through this view are immutable for the client. Each attempt to call a mutator on one of
these objects or one of their feature lists will result in a ReadOnlyException being thrown immediately.
Mutable objects can be provided by a transaction.
A view is opened through API of the underlying session like this:
CDOSession session = ... CDOView view = session.openView(); ...
- Seit:
- 2.0
- Autor:
- Eike Stepper
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypSchnittstelleBeschreibungstatic interfaceEncapsulates a set of notifyingviewconfiguration options.Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.net4j.util.container.IContainer
org.eclipse.net4j.util.container.IContainer.Modifiable<E>, org.eclipse.net4j.util.container.IContainer.Persistable<E>, org.eclipse.net4j.util.container.IContainer.Persistence<E>Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.INotifier2 -
Feldübersicht
FelderVon Schnittstelle geerbte Felder org.eclipse.emf.cdo.common.branch.CDOBranchPoint
INVALID_DATE, UNSPECIFIED_DATEVon Schnittstelle geerbte Felder org.eclipse.emf.cdo.util.CDOUpdatable
NO_TIMEOUT -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddObjectHandler(CDOObjectHandler handler) voidcompareRevisions(CDOBranchPoint source) createQuery(String language, String queryString) Same ascreateQuery(language, queryString, null).createQuery(String language, String queryString, Object context) createResourceURI(String path) Returns aURIthat can be used inResourceSet.getResource(URI, boolean)to load the resource with the specified path.voiddisableDurableLocking(boolean releaseLocks) Disables the storage of all information that's needed toreopenthis view at a later point in time.Enables the storage of all information that's needed toreopenthis view at a later point in time.enableDurableLocking(boolean enable) Veraltet.getBinaryResource(String path) getLockStates(Collection<CDOID> ids) Get an array oflock statescorresponding to the specified collection ofids.getLockStates(Collection<CDOID> ids, boolean loadOnDemand) Get an array oflock statescorresponding to the specified collection ofids.getLockStatesOfObjects(Collection<? extends CDOObject> objects) Get an array oflock statescorresponding to the specified collection ofobjects.Returns the object for the given CDOID.Returns the object for the given CDOID.<T extends EObject>
TgetObject(T objectFromDifferentView) Takes an object from a (possibly) different view and contextifies it for the usage with this view.getObjects(Collection<CDOID> ids) Returns the objects with the given CDOIDs.Returns theproviderthat has opened this view.getResource(String path) Same asgetResource(String, true).getResource(String path, boolean loadOnDemand) getResourceFolder(String path) getResourceNode(String path) Returns the resource node with the given path.Returns theresource setthis view is associated with.Returns the root resource of the repository.Returns thesessionthis view was opened by.getTextResource(String path) getURI()Returns theview setthis view is associated with.booleanReturns alwaysfalse.booleanhasResource(String path) Returnstrueif a resource with the given path exists in the repository,false.booleanisDirty()Returns alwaysfalse.booleanbooleanVeraltet.As of 4.7 useisInvalidating().booleanVeraltet.As of 4.2 the legacy mode is always enabled.booleanvoidlockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, long timeout) Locks the given objects.voidlockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, long timeout, boolean recursive) options()Returns theoptionsof this view.queryInstances(EClass type) Returns a list of the instances of the given type.<T extends EObject>
org.eclipse.net4j.util.collection.CloseableIterator<T> queryInstancesAsync(EClass type) Returns an iterator over the instances of the given type.<T extends EObject>
org.eclipse.net4j.util.collection.CloseableIterator<T> queryInstancesAsync(EClass type, boolean exact) Returns an iterator over the instances of the given type.queryResources(CDOResourceFolder folder, String name, boolean exactMatch) Returns a list of the resources in the given folder with a name equal to or starting with the value of the name parameter.org.eclipse.net4j.util.collection.CloseableIterator<CDOResourceNode> queryResourcesAsync(CDOResourceFolder folder, String name, boolean exactMatch) Returns an iterator over the resources in the given folder with a name equal to or starting with the value of the name parameter.queryXRefs(Set<CDOObject> targetObjects, EReference... sourceReferences) Returns a list ofobject referencesthat represent the cross references to the specified target objects.queryXRefs(CDOObject targetObject, EReference... sourceReferences) Returns a list ofobject referencesthat represent the cross references to the specified target object.org.eclipse.net4j.util.collection.CloseableIterator<CDOObjectReference> queryXRefsAsync(Set<CDOObject> targetObjects, EReference... sourceReferences) Returns an iterator over theobject referencesthat represent the cross references to the specified target objects.voidrefreshLockStates(Consumer<CDOLockState> consumer) Refreshes thelock statesof thisviewwith the latest states from the repository.intVeraltet.As of 4.3 no longer supported because it is unsafe to reload single objects.voidremoveObjectHandler(CDOObjectHandler handler) voidbooleanSame as callingsetBranchPoint(branch, getTimeStamp()).booleansetBranch(CDOBranch branch, IProgressMonitor monitor) Same assetBranch(CDOBranch)withIProgressMonitor.booleansetBranchPoint(CDOBranch branch, long timeStamp) Sets thebranchand the point in (repository) time this view should refer to.booleansetBranchPoint(CDOBranch branch, long timeStamp, IProgressMonitor monitor) Same assetBranchPoint(CDOBranch, long)with aIProgressMonitor.booleansetBranchPoint(CDOBranchPoint branchPoint) Same as callingsetBranchPoint(branchPoint.getBranch(), branchPoint.getTimeStamp()).booleansetBranchPoint(CDOBranchPoint branchPoint, IProgressMonitor monitor) Same as callingsetBranchPoint(CDOBranchPoint)with aIProgressMonitor.voidsetResourcePathCache(Map<String, CDOID> resourcePathCache) Sets the newmapto be used as a cache for variousget*Resource*(String path)methods.booleansetTimeStamp(long timeStamp) Same as callingsetBranchPoint(getBranch(), timeStamp).booleansetTimeStamp(long timeStamp, IProgressMonitor monitor) Same assetTimeStamp(long)withIProgressMonitor.void<V> VvoidUnlocks all locked objects of this view.voidunlockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType) Unlocks the given locked objects of this view.voidunlockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, boolean recursive) Von Schnittstelle geerbte Methoden org.eclipse.emf.cdo.common.branch.CDOBranchPoint
getBranch, getTimeStampVon Schnittstelle geerbte Methoden org.eclipse.emf.cdo.common.commit.CDOCommitHistory.Provider
getHistory, getHistoryVon Schnittstelle geerbte Methoden org.eclipse.emf.cdo.common.CDOCommonView
getDurableLockingID, getLockOwner, getSessionID, getViewID, isDurableView, isHistorical, isReadOnlyVon Schnittstelle geerbte Methoden org.eclipse.emf.cdo.common.revision.CDORevisionProvider
getRevisionVon Schnittstelle geerbte Methoden org.eclipse.emf.cdo.util.CDOUpdatable
getLastUpdateTime, runAfterUpdate, waitForUpdate, waitForUpdateVon Schnittstelle geerbte Methoden org.eclipse.net4j.util.collection.Closeable
close, isClosedVon Schnittstelle geerbte Methoden org.eclipse.core.runtime.IAdaptable
getAdapterVon Schnittstelle geerbte Methoden org.eclipse.net4j.util.container.IContainer
getElements, isEmptyVon Schnittstelle geerbte Methoden org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListenerVon Schnittstelle geerbte Methoden org.eclipse.net4j.util.properties.IPropertiesContainer
properties
-
Felddetails
-
PROP_TIME_MACHINE_DISABLED
- Seit:
- 4.5
- Siehe auch:
-
PROP_LIFECYCLE_EXCEPTION_HANDLER
- Seit:
- 4.19
- Siehe auch:
-
-
Methodendetails
-
getSession
CDOSession getSession()Returns thesessionthis view was opened by.- Angegeben von:
getSessionin SchnittstelleCDOCommonView- Gibt zurück:
- The session this view was opened by, or
nullif this view is closed. - Siehe auch:
-
getProvider
CDOViewProvider getProvider()Returns theproviderthat has opened this view.- Seit:
- 4.4
-
getURI
URI getURI()- Seit:
- 4.24
-
getViewSet
CDOViewSet getViewSet()Returns theview setthis view is associated with.- Gibt zurück:
- The view set this view is associated with, never
null. - Siehe auch:
-
getViewLock
Lock getViewLock()- Seit:
- 4.5
-
syncExec
- Seit:
- 4.5
-
syncExec
- Löst aus:
Exception- Seit:
- 4.5
-
getResourceSet
ResourceSet getResourceSet()Returns theresource setthis view is associated with.Same as calling getViewSet().getResourceSet().
- Siehe auch:
-
getURIHandler
URIHandler getURIHandler() -
getUnitManager
CDOUnitManager getUnitManager()- Seit:
- 4.5
-
setBranchPoint
Sets thebranchand the point in (repository) time this view should refer to.Objectsprovided by this view will bevalidat this time. The special valueUNSPECIFIED_DATEdenotes a "floating view" that always shows the latest state of the repository.- Gibt zurück:
trueif the branch point was changed,falseotherwise.- Seit:
- 3.0
-
setBranchPoint
Same assetBranchPoint(CDOBranch, long)with aIProgressMonitor.- Seit:
- 4.4
-
setBranchPoint
Same as callingsetBranchPoint(branchPoint.getBranch(), branchPoint.getTimeStamp()).- Seit:
- 3.0
-
setBranchPoint
Same as callingsetBranchPoint(CDOBranchPoint)with aIProgressMonitor.- Seit:
- 4.4
-
setBranch
Same as callingsetBranchPoint(branch, getTimeStamp()).- Seit:
- 3.0
-
setBranch
Same assetBranch(CDOBranch)withIProgressMonitor.- Seit:
- 4.4
-
setTimeStamp
boolean setTimeStamp(long timeStamp) Same as callingsetBranchPoint(getBranch(), timeStamp).- Seit:
- 3.0
-
setTimeStamp
Same assetTimeStamp(long)withIProgressMonitor.- Seit:
- 4.4
-
isInvalidating
boolean isInvalidating()- Seit:
- 4.8
-
isInvalidationRunnerActive
Veraltet.As of 4.7 useisInvalidating().- Seit:
- 4.0
-
isLegacyModeEnabled
Veraltet.As of 4.2 the legacy mode is always enabled.- Seit:
- 3.0
- Siehe auch:
-
isDirty
boolean isDirty()Returns alwaysfalse.This method has a special implementation in
CDOTransactionas well.- Siehe auch:
-
hasConflict
boolean hasConflict()Returns alwaysfalse.This method has a special implementation in
CDOTransactionas well.- Siehe auch:
-
hasResource
Returnstrueif a resource with the given path exists in the repository,false. Applies tofile resources, as well.- Siehe auch:
-
getResource
- Löst aus:
CDOResourceNodeNotFoundException- Siehe auch:
-
getResource
Same asgetResource(String, true).- Löst aus:
CDOResourceNodeNotFoundException- Siehe auch:
-
getTextResource
- Löst aus:
CDOResourceNodeNotFoundException- Seit:
- 4.2
-
getBinaryResource
- Löst aus:
CDOResourceNodeNotFoundException- Seit:
- 4.2
-
getResourceNode
Returns the resource node with the given path.- Gibt zurück:
- never
null. - Löst aus:
CDOException- if no such resource node exists.CDOResourceNodeNotFoundException
-
getResourceFolder
- Löst aus:
CDOResourceNodeNotFoundException- Seit:
- 4.2
-
getRootResource
CDOResource getRootResource()Returns the root resource of the repository.The root resource is a special resource with only
CDOResourceNodesin its contents list. You can use it as the main entry into the new resource and folder structure. -
setResourcePathCache
Sets the newmapto be used as a cache for variousget*Resource*(String path)methods.Can be used to reset/clear the resource path cache by passing a
new HashMap<String, CDOID>(). Smarter maps could implement a LRU eviction policy to limit the map capacity. Passingnulldisables resource path caching.The default value is
new HashMap<String, CDOID>().- Seit:
- 4.2
- Siehe auch:
-
createResourceURI
Returns aURIthat can be used inResourceSet.getResource(URI, boolean)to load the resource with the specified path.- Seit:
- 4.4
-
queryResources
Returns a list of the resources in the given folder with a name equal to or starting with the value of the name parameter.- Parameter:
folder- The folder to search in, ornullfor top level resource nodes.name- the name or prefix of the resource nodes to return.exactMatch-trueif the complete name of the resource must match,falseif only a common prefix of the name must match.
-
queryResourcesAsync
org.eclipse.net4j.util.collection.CloseableIterator<CDOResourceNode> queryResourcesAsync(CDOResourceFolder folder, String name, boolean exactMatch) Returns an iterator over the resources in the given folder with a name equal to or starting with the value of the name parameter. The underlying query will be executed asynchronously.- Parameter:
folder- The folder to search in, ornullfor top level resource nodes.name- the name or prefix of the resource nodes to return.exactMatch-trueif the complete name of the resource must match,falseif only a common prefix of the name must match.
-
queryInstances
Returns a list of the instances of the given type.- Seit:
- 4.3
-
queryInstancesAsync
<T extends EObject> org.eclipse.net4j.util.collection.CloseableIterator<T> queryInstancesAsync(EClass type) Returns an iterator over the instances of the given type. The underlying query will be executed asynchronously.- Seit:
- 4.3
-
queryInstancesAsync
<T extends EObject> org.eclipse.net4j.util.collection.CloseableIterator<T> queryInstancesAsync(EClass type, boolean exact) Returns an iterator over the instances of the given type. The underlying query will be executed asynchronously.- Seit:
- 4.6
-
queryXRefs
Returns a list ofobject referencesthat represent the cross references to the specified target object.- Parameter:
targetObject- The target object that referencing objects are requested for. An external target object can be used with the help ofCDOUtil.wrapExternalObject().sourceReferences- The reference features that referencing objects are requested for, or an empty array if all reference features are to be used in the request.- Seit:
- 4.0
- Siehe auch:
-
queryXRefs
Returns a list ofobject referencesthat represent the cross references to the specified target objects.- Parameter:
targetObjects- The set of target objects that referencing objects are requested for. External target objects can be used with the help ofCDOUtil.wrapExternalObject().sourceReferences- The reference features that referencing objects are requested for, or an empty array if all reference features are to be used in the request.- Seit:
- 3.0
- Siehe auch:
-
queryXRefsAsync
org.eclipse.net4j.util.collection.CloseableIterator<CDOObjectReference> queryXRefsAsync(Set<CDOObject> targetObjects, EReference... sourceReferences) Returns an iterator over theobject referencesthat represent the cross references to the specified target objects. The underlying query will be executed asynchronously.- Parameter:
targetObjects- The set of target objects that referencing objects are requested for. External target objects can be used with the help ofCDOUtil.wrapExternalObject().sourceReferences- The reference features that referencing objects are requested for, or an empty array if all reference features are to be used in the request.- Seit:
- 3.0
- Siehe auch:
-
getObjects
Returns the objects with the given CDOIDs.If objects are missing from the local cache they are loaded from the server in one round-trip.
- Parameter:
ids- the collection of CDOIDs that identify the CDOObjects to return.- Gibt zurück:
- a map that contains the CDOObjects with the given CDOIDs.
- Seit:
- 4.13
-
getObject
Returns the object for the given CDOID.- Parameter:
loadOnDemand- whether to create and load the object, if it doesn't already exist.- Gibt zurück:
- the object resolved by the CDOID if the id is not
null, ornullif there isn't one and loadOnDemand isfalse.
-
getObject
Returns the object for the given CDOID.Same as
getObject(id, true).- Siehe auch:
-
getObject
Takes an object from a (possibly) different view and contextifies it for the usage with this view.- If the given object is contained in this view it is returned unmodified.
- If the given object can not be cast to
CDOObjectit is returned unmodified. - If the view of the given object is contained in a different session an
IllegalArgumentExceptionis thrown. - If
nullis passednullis returned.
-
isObjectRegistered
-
reload
Veraltet.As of 4.3 no longer supported because it is unsafe to reload single objects.Reloads the givenobjectsfrom the repository. -
refreshLockStates
Refreshes thelock statesof thisviewwith the latest states from the repository. If a lock state consumer is passed it is called for each resulting new lock state.- Seit:
- 4.12
-
getLockStates
Get an array oflock statescorresponding to the specified collection ofids. If the collection ofidsis empty,lock statesof all objects are returned.- Seit:
- 4.6
-
getLockStates
Get an array oflock statescorresponding to the specified collection ofids. If the collection ofidsis empty,lock statesof all objects are returned.- Seit:
- 4.19
-
getLockStatesOfObjects
Get an array oflock statescorresponding to the specified collection ofobjects. If the collection ofobjectsis empty,lock statesof all locked objects are returned.- Seit:
- 4.6
-
lockObjects
void lockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, long timeout) throws InterruptedException Locks the given objects. Once the objects are locked, they will not be changed remotely or go in conflict state.- Löst aus:
InterruptedException- Seit:
- 3.0
-
lockObjects
void lockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, long timeout, boolean recursive) throws InterruptedException - Löst aus:
InterruptedException
-
unlockObjects
void unlockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType) Unlocks the given locked objects of this view. -
unlockObjects
void unlockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, boolean recursive) -
unlockObjects
void unlockObjects()Unlocks all locked objects of this view.- Seit:
- 2.0
-
enableDurableLocking
Veraltet.UseenableDurableLocking()instead ordisableDurableLocking(boolean), respectively.- Seit:
- 4.0
-
enableDurableLocking
String enableDurableLocking()Enables the storage of all information that's needed toreopenthis view at a later point in time. This information includes thebranch point, the user ID of thesession, whether it's a read-only view or atransactionand all the locks that are acquired or will be acquired while durable locking is enabled.- Seit:
- 4.1
- Siehe auch:
-
disableDurableLocking
void disableDurableLocking(boolean releaseLocks) Disables the storage of all information that's needed toreopenthis view at a later point in time. If such information is stored when this method is called it is removed. Note that locks acquired by this view are only released iftrueis passed to thereleaseLocksparameter.- Seit:
- 4.1
- Siehe auch:
-
addObjectHandler
- Seit:
- 3.0
-
removeObjectHandler
- Seit:
- 3.0
-
getObjectHandlers
CDOObjectHandler[] getObjectHandlers()- Seit:
- 3.0
-
addRegistrationHandler
- Seit:
- 4.6
-
removeRegistrationHandler
- Seit:
- 4.6
-
getRegistrationHandlers
CDORegistrationHandler[] getRegistrationHandlers()- Seit:
- 4.6
-
createQuery
Same ascreateQuery(language, queryString, null).- Seit:
- 2.0
- Siehe auch:
-
createQuery
- Seit:
- 4.0
-
compareRevisions
- Seit:
- 4.0
-
options
CDOView.Options options()Beschreibung aus Schnittstelle kopiert:CDOCommonViewReturns theoptionsof this view.- Angegeben von:
optionsin SchnittstelleCDOCommonView- Angegeben von:
optionsin Schnittstelleorg.eclipse.net4j.util.options.IOptionsContainer- Seit:
- 2.0
-
enableDurableLocking()instead ordisableDurableLocking(boolean), respectively.