Interface IListMapping
- All Superinterfaces:
org.eclipse.net4j.db.ddl.IDBTable.Provider,IFeatureMapping
- All Known Subinterfaces:
IListMapping2,IListMapping3,IListMappingUnitSupport
Interface for mapping features with
isMany() == true.- Since:
- 2.0
- Author:
- Eike Stepper, Stefan Winkler
-
Method Summary
Modifier and TypeMethodDescriptionCollection<org.eclipse.net4j.db.ddl.IDBTable> Returns all DB tables which are used by this feature.default org.eclipse.net4j.db.DBTypeReturn the mapped feature.default org.eclipse.net4j.db.ddl.IDBFieldgetField()default org.eclipse.net4j.db.ddl.IDBTablegetTable()Returns the primary table for this list mapping.default ITypeMappingvoidobjectDetached(IDBStoreAccessor accessor, CDOID id, long revised) Hook with which a list mapping is notified that a containing object has been revised.booleanqueryXRefs(IDBStoreAccessor accessor, String mainTableName, String mainTableWhere, IStoreAccessor.QueryXRefsContext context, String idString) Retrieve cross-references from DB.voidreadChunks(IDBStoreChunkReader dbStoreChunkReader, List<IStoreChunkReader.Chunk> chunks, String where) Used to load-on-demand chunks of a list.voidreadValues(IDBStoreAccessor accessor, InternalCDORevision revision, int listChunk) Read the list size and the complete list or the first part of it.voidwriteValues(IDBStoreAccessor accessor, InternalCDORevision revision) Write a complete list of values to the database.Methods inherited from interface org.eclipse.emf.cdo.server.db.mapping.IFeatureMapping
getDBAdapter, getMappingStrategy, getStore
-
Method Details
-
getFeature
EStructuralFeature getFeature()Return the mapped feature.- Specified by:
getFeaturein interfaceIFeatureMapping- Returns:
- the mapped feature.
-
getTypeMapping
- Specified by:
getTypeMappingin interfaceIFeatureMapping- Returns:
- The type mapping which is used for this feature mapping.
-
getField
default org.eclipse.net4j.db.ddl.IDBField getField()- Specified by:
getFieldin interfaceIFeatureMapping- Returns:
- The value field which is associated with this feature mapping.
-
getDBType
default org.eclipse.net4j.db.DBType getDBType()- Specified by:
getDBTypein interfaceIFeatureMapping- Returns:
- The value type which is associated with this feature mapping.
-
getDBTables
Collection<org.eclipse.net4j.db.ddl.IDBTable> getDBTables()Returns all DB tables which are used by this feature.- Returns:
- a collection of all tables of this feature.
-
getTable
default org.eclipse.net4j.db.ddl.IDBTable getTable()Returns the primary table for this list mapping. When multiple tables are returned bygetDBTables(), implementations must place the primary table first or override this method.- Specified by:
getTablein interfaceorg.eclipse.net4j.db.ddl.IDBTable.Provider- Returns:
- the first table in iteration order, or
nullwhen the collection is empty - Since:
- 4.15
-
writeValues
Write a complete list of values to the database.- Parameters:
accessor- the accessor to use.revision- the revision containing the list to be written.
-
readValues
Read the list size and the complete list or the first part of it.- Parameters:
accessor- the accessor to use.revision- the revision into which the list values should be read.listChunk- indicating the lazy loading behavior:CDORevision.UNCHUNKEDmeans that the whole list should be read. Else, iflistChunk >= 0, the list is filled withInternalCDOList.UNINITIALIZEDand only the firstlistChunkvalues are read.
-
readChunks
void readChunks(IDBStoreChunkReader dbStoreChunkReader, List<IStoreChunkReader.Chunk> chunks, String where) Used to load-on-demand chunks of a list.- Parameters:
dbStoreChunkReader- the chunkReader to usechunks- the chunks to readwhere- the where-clause to use in order to read the chunks.
-
objectDetached
Hook with which a list mapping is notified that a containing object has been revised. Can be implemented in order to clean up lists of revised objects.- Parameters:
accessor- the accessor to use.id- the ID of the object which has been revised.revised- the timestamp at which the object was revised.- Since:
- 3.0
-
queryXRefs
boolean queryXRefs(IDBStoreAccessor accessor, String mainTableName, String mainTableWhere, IStoreAccessor.QueryXRefsContext context, String idString) Retrieve cross-references from DB.- Since:
- 4.0
- See Also:
-