public interface Mapper extends RowMapper, XAResource
| Modifier and Type | Interface and Description | 
|---|---|
static class  | 
Mapper.Identification
Identifiers assigned by a server to identify a client mapper and its repository. 
 | 
RowMapper.CopyResult, RowMapper.IdWithTypes, RowMapper.NodeInfo, RowMapper.RowBatch, RowMapper.RowUpdate| Modifier and Type | Field and Description | 
|---|---|
static String | 
CLOSE  | 
static String | 
GET_IDENTIFICATION  | 
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY| Modifier and Type | Method and Description | 
|---|---|
int | 
cleanupDeletedRows(int max,
                  Calendar beforeTime)
Cleans up (hard-delete) any rows that have been soft-deleted in the database. 
 | 
void | 
close()  | 
void | 
connect(boolean noSharing)  | 
void | 
createClusterNode(Serializable nodeId)
Informs the cluster that this node exists. 
 | 
void | 
createDatabase(String ddlMode)
Creates the necessary structures in the database. 
 | 
void | 
disconnect()  | 
Set<Serializable> | 
getAncestorsIds(Collection<Serializable> ids)
Gets the ids for all the ancestors of the given row ids. 
 | 
Invalidations | 
getClusterInvalidations(Serializable nodeId)
Gets the invalidations from other cluster nodes. 
 | 
int | 
getClusterNodeIdType()  | 
Mapper.Identification | 
getIdentification()
Returns the repository id and mapper id assigned. 
 | 
Lock | 
getLock(Serializable id)
Gets the lock state of a document. 
 | 
Serializable | 
getRootId(String repositoryId)
Gets the root id for a given repository, if registered. 
 | 
int | 
getTableSize(String tableName)  | 
void | 
insertClusterInvalidations(Serializable nodeId,
                          Invalidations invalidations)
Inserts the invalidation rows for the other cluster nodes. 
 | 
boolean | 
isConnected()  | 
void | 
markReferencedBinaries()
Marks the binaries in use by passing them to the binary manager(s)'s GC mark() method. 
 | 
PartialList<Serializable> | 
query(String query,
     String queryType,
     QueryFilter queryFilter,
     boolean countTotal)
Makes a NXQL query to the database. 
 | 
PartialList<Serializable> | 
query(String query,
     String queryType,
     QueryFilter queryFilter,
     long countUpTo)
Makes a NXQL query to the database. 
 | 
IterableQueryResult | 
queryAndFetch(String query,
             String queryType,
             QueryFilter queryFilter,
             boolean distinctDocuments,
             Object... params)
Makes a query to the database and returns an iterable (which must be closed when done). 
 | 
PartialList<Map<String,Serializable>> | 
queryProjection(String query,
               String queryType,
               QueryFilter queryFilter,
               boolean distinctDocuments,
               long countUpTo,
               Object... params)
Makes a query to the database. 
 | 
void | 
rebuildReadAcls()  | 
void | 
removeClusterNode(Serializable nodeId)
Removes this node from the cluster. 
 | 
Lock | 
removeLock(Serializable id,
          String owner,
          boolean force)
Removes a lock from a document. 
 | 
ScrollResult<String> | 
scroll(String scrollId)
Get the next batch of results containing id of documents, the  
scrollId is part of the previous
 ScrollResult response. | 
ScrollResult<String> | 
scroll(String query,
      int batchSize,
      int keepAliveSeconds)
Executes the given query and returns the first batch of results containing id of documents, next batch must be
 requested within the  
keepAliveSeconds delay. | 
ScrollResult<String> | 
scroll(String query,
      QueryFilter queryFilter,
      int batchSize,
      int keepAliveSeconds)
Executes the given query and returns the first batch of results containing id of documents, next batch must be
 requested within the  
keepAliveSeconds delay. | 
Lock | 
setLock(Serializable id,
       Lock lock)
Sets a lock on a document. 
 | 
void | 
setRootId(Serializable repositoryId,
         Serializable id)
Records the newly generated root id for a given repository. 
 | 
void | 
updateReadAcls()  | 
clearCache, copy, generateNewId, getBinaryFulltext, getCacheSize, getDescendantsInfo, read, readCollectionRowArray, readSelectionRows, readSelectionsIds, readSimpleRow, receiveInvalidations, remove, rollback, sendInvalidations, writecommit, end, forget, getTransactionTimeout, isSameRM, prepare, recover, rollback, setTransactionTimeout, startstatic final String GET_IDENTIFICATION
static final String CLOSE
ScrollResult<String> scroll(String query, int batchSize, int keepAliveSeconds)
keepAliveSeconds delay.ScrollResult<String> scroll(String query, QueryFilter queryFilter, int batchSize, int keepAliveSeconds)
keepAliveSeconds delay.ScrollResult<String> scroll(String scrollId)
scrollId is part of the previous
 ScrollResult response.Mapper.Identification getIdentification()
This is used in remote stateless mode to be able to identify to which mapper an incoming connection is targeted, and from which repository instance.
void close()
int getTableSize(String tableName)
void createDatabase(String ddlMode)
ddlMode - the DDL execution modeSerializable getRootId(String repositoryId)
repositoryId - the repository idvoid setRootId(Serializable repositoryId, Serializable id)
repositoryId - the repository id, usually 0id - the root idPartialList<Serializable> query(String query, String queryType, QueryFilter queryFilter, boolean countTotal)
query - the queryqueryType - the query typequeryFilter - the query filtercountTotal - if true, count the total size without limit/offsetPartialList<Serializable> query(String query, String queryType, QueryFilter queryFilter, long countUpTo)
query - the queryqueryType - the query typequeryFilter - the query filtercountUpTo - if -1, count the total size without offset/limit.0, don't count the total size.n, count the total number if there are less than n documents otherwise set the size to
            -1.IterableQueryResult queryAndFetch(String query, String queryType, QueryFilter queryFilter, boolean distinctDocuments, Object... params)
query - the queryqueryType - the query typequeryFilter - the query filterdistinctDocuments - if true then a maximum of one row per document will be returnedparams - optional query-type-dependent parametersPartialList<Map<String,Serializable>> queryProjection(String query, String queryType, QueryFilter queryFilter, boolean distinctDocuments, long countUpTo, Object... params)
query - the queryqueryType - the query typequeryFilter - the query filterdistinctDocuments - if true then a maximum of one row per document will be returnedcountUpTo - if -1, also count the total size without offset/limit.0, don't count the total size.n, count the total number if there are less than n documents otherwise set the size to
            -1.params - optional query-type-dependent parametersSet<Serializable> getAncestorsIds(Collection<Serializable> ids)
ids - the idsvoid updateReadAcls()
void rebuildReadAcls()
int getClusterNodeIdType()
void createClusterNode(Serializable nodeId)
void removeClusterNode(Serializable nodeId)
void insertClusterInvalidations(Serializable nodeId, Invalidations invalidations)
Invalidations getClusterInvalidations(Serializable nodeId)
Lock getLock(Serializable id)
 If the document does not exist, null is returned.
id - the document idnull when there is no lockLock setLock(Serializable id, Lock lock)
 If the document is already locked, returns its existing lock status (there is no re-locking, removeLock(java.io.Serializable, java.lang.String, boolean)
 must be called first).
id - the document idlock - the lock object to setnull if locking succeeded, or the existing lock if locking failed, or aLock removeLock(Serializable id, String owner, boolean force)
The previous lock is returned.
 If owner is null then the lock is unconditionally removed.
 
 If owner is not null, it must match the existing lock owner for the lock to be removed. If it
 doesn't match, the returned lock will return true for Lock.getFailed().
id - the document idowner - the owner to check, or null for no checkforce - true to just do the remove and not return the previous lockvoid markReferencedBinaries()
int cleanupDeletedRows(int max, Calendar beforeTime)
max - the maximum number of rows to delete at a timebeforeTime - the maximum deletion time of the rows to deleteboolean isConnected()
void connect(boolean noSharing)
void disconnect()
Copyright © 2019 Nuxeo. All rights reserved.