|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Basic interface for class mappings.
Method Summary | |
---|---|
PreparedStatement |
createObjectIDStatement(IDBStoreAccessor accessor)
Create a prepared statement which returns all IDs of instances of the corresponding class. |
PreparedStatement |
createResourceQueryStatement(IDBStoreAccessor accessor,
CDOID folderId,
String name,
boolean exactMatch,
CDOBranchPoint branchPoint)
Create a prepared statement which returns all IDs of instances of the corresponding class. |
void |
detachObject(IDBStoreAccessor accessor,
CDOID id,
int version,
CDOBranch branch,
long timeStamp,
OMMonitor monitor)
Detaches (deletes) a CDO object leaving a "ghost" revision behind. |
List<IDBTable> |
getDBTables()
Returns all DB tables which are used by this class and all its contained features. |
EClass |
getEClass()
|
IListMapping |
getListMapping(EStructuralFeature feature)
Get the mapping of the many-valued feature. |
List<IListMapping> |
getListMappings()
|
List<ITypeMapping> |
getValueMappings()
|
void |
handleRevisions(IDBStoreAccessor accessor,
CDOBranch branch,
long timeStamp,
boolean exactTime,
CDORevisionHandler handler)
Passes all revisions of the store to the handler if all of the following
conditions are met:
The branch parameter is null or equal to revision.getBranch() . |
boolean |
queryXRefs(IDBStoreAccessor accessor,
IStoreAccessor.QueryXRefsContext context,
String idString)
Retrieve cross-references from DB |
Set<CDOID> |
readChangeSet(IDBStoreAccessor accessor,
CDOChangeSetSegment[] segments)
Returns a set of CDOIDs that have at least one revision in any of the passed branches and time ranges. |
boolean |
readRevision(IDBStoreAccessor accessor,
InternalCDORevision revision,
int listChunk)
Read a revision. |
void |
writeRevision(IDBStoreAccessor accessor,
InternalCDORevision revision,
boolean mapType,
boolean revise,
OMMonitor monitor)
Write the revision data to the database. |
Method Detail |
---|
EClass getEClass()
List<IDBTable> getDBTables()
IListMapping getListMapping(EStructuralFeature feature)
feature
- the feature for which the mapping should be returned. feature.isMany()
has to be
true
.
List<IListMapping> getListMappings()
List<ITypeMapping> getValueMappings()
boolean readRevision(IDBStoreAccessor accessor, InternalCDORevision revision, int listChunk)
CDOBranchPoint.UNSPECIFIED_DATE
and non-branching stores only
support the main branch.
accessor
- the accessor to use.revision
- the revision object into which the data should be read. The revision has to be have its ID set to the
requested object's ID. The version is ignored, as the version parameter is used to determine the version
to be read.listChunk
- the chunk size to read attribute lists.
true
, if the revision has been found and read correctly. false
if the revision
could not be found. In this case, the content of revision
is undefined.void writeRevision(IDBStoreAccessor accessor, InternalCDORevision revision, boolean mapType, boolean revise, OMMonitor monitor)
accessor
- the accessor to use.revision
- the revision to write.mapType
- true
if the type of the object is supposed to be mapped, false
otherwise.revise
- true
if the previous revision is supposed to be revised, false
otherwise.monitor
- the monitor to indicate progress.void detachObject(IDBStoreAccessor accessor, CDOID id, int version, CDOBranch branch, long timeStamp, OMMonitor monitor)
accessor
- the accessor to use.id
- the id to revise.version
- the last valid version.timeStamp
- the timestamp of detach.monitor
- the monitor to indicate progress.PreparedStatement createObjectIDStatement(IDBStoreAccessor accessor)
accessor
- the accessor to use to create the statement
result.executeQuery()
.PreparedStatement createResourceQueryStatement(IDBStoreAccessor accessor, CDOID folderId, String name, boolean exactMatch, CDOBranchPoint branchPoint)
accessor
- the accessor to use to create the statementfolderId
- the ID of the containing folder. 0
means none.name
- the name of the resource node to look upexactMatch
- if true
, name
must match exactly, otherwise all resource nodes starting with
name
are returned.branchPoint
- a branchPoint (branch and timestamp). A timestamp in the past if past versions should be looked up. In
case of no audit support, this must be CDOBranchPoint.UNSPECIFIED_DATE
. In case of non branching
support the branch id must be equal to CDOBranch.MAIN_BRANCH_ID
.
result.executeQuery()
.
ImplementationError
- if called on a mapping which does not map an EClass instanceof CDOResourceNode
.void handleRevisions(IDBStoreAccessor accessor, CDOBranch branch, long timeStamp, boolean exactTime, CDORevisionHandler handler)
handler
if all of the following
conditions are met:
branch
parameter is null
or equal to revision.getBranch()
.
timeStamp
parameter is CDOBranchPoint.UNSPECIFIED_DATE
or equal to
revision.getTimeStamp()
.
IMappingStrategy.handleRevisions(IDBStoreAccessor, org.eclipse.emf.ecore.EClass, CDOBranch, long, boolean,
CDORevisionHandler)
Set<CDOID> readChangeSet(IDBStoreAccessor accessor, CDOChangeSetSegment[] segments)
IStoreAccessor.readChangeSet(OMMonitor, CDOChangeSetSegment...)
boolean queryXRefs(IDBStoreAccessor accessor, IStoreAccessor.QueryXRefsContext context, String idString)
idString
- a string of the form "(id1, id2, id3, ...)" which can be used directly in SQL to form the where-part
"SELECT * FROM foobar WHERE foobar.target IN [idString]".IStoreAccessor.queryXRefs(QueryXRefsContext)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |