public class WGDocumentListCache
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addDocuments(java.util.List<? extends WGDocument> docs,
int offset) |
java.util.List<WGDocument> |
buildDocumentList(WGDatabase db)
Rebuilds the document list from cache
The method will return null if the number of documents in the list that must be gathered
from backend exceeds the database configuration on
WGDatabase.getListCacheRebuildThreshold() |
java.util.List |
buildDocumentSubList(WGDatabase db,
int offset,
int size)
Rebuilds the document list from cache
The method will return null if the number of documents in the list that must be gathered
from backend exceeds the database configuration on
WGDatabase.getListCacheRebuildThreshold() |
static WGDocumentListCache |
buildFromContentKeys(java.util.Collection<WGContentKey> col)
Builds a document list cache from a collection containing
WGContentKey objects |
static WGDocumentListCache |
buildFromDocumentCores(java.util.Collection<WGDocumentCore> col,
WGDatabase db)
Builds a document list cache from a collection containing
WGDocumentCore objects |
static WGDocumentListCache |
buildFromDocuments(java.util.Collection<? extends WGDocument> col) |
static WGDocumentListCache |
buildFromDocuments(java.util.List<? extends WGDocument> col,
int offset)
Builds a document list cache from a collection containing
WGDocument objects |
static WGDocumentListCache |
buildFromKeys(java.util.Collection<WGDocumentKey> col)
Builds a document list cache from a collection containing
WGDocumentKey objects |
static WGDocumentListCache |
buildFromKeyStrings(java.util.Collection<java.lang.String> col)
Builds a document list cache from a collection containing document key strings
|
boolean |
isComplete() |
void |
remove(WGDocument doc) |
void |
remove(WGDocumentKey docKey) |
void |
setComplete(boolean complete) |
int |
size() |
public boolean isComplete()
public static WGDocumentListCache buildFromDocuments(java.util.List<? extends WGDocument> col, int offset)
WGDocument
objectscol
- The collectionpublic static WGDocumentListCache buildFromDocuments(java.util.Collection<? extends WGDocument> col)
public static WGDocumentListCache buildFromDocumentCores(java.util.Collection<WGDocumentCore> col, WGDatabase db)
WGDocumentCore
objectscol
- The collectionpublic static WGDocumentListCache buildFromKeys(java.util.Collection<WGDocumentKey> col)
WGDocumentKey
objectscol
- The collectionpublic static WGDocumentListCache buildFromContentKeys(java.util.Collection<WGContentKey> col)
WGContentKey
objectscol
- The collectionpublic static WGDocumentListCache buildFromKeyStrings(java.util.Collection<java.lang.String> col)
col
- The collectionpublic java.util.List<WGDocument> buildDocumentList(WGDatabase db)
WGDatabase.getListCacheRebuildThreshold()
db
- The database that the documents belong topublic java.util.List buildDocumentSubList(WGDatabase db, int offset, int size)
WGDatabase.getListCacheRebuildThreshold()
db
- The database that the documents belong tooffset
- The offset from which to return entries, 0 being the first onesize
- The number of entries to return at maximumpublic void remove(WGDocument doc)
public void remove(WGDocumentKey docKey)
public int size()
public void setComplete(boolean complete)
public void addDocuments(java.util.List<? extends WGDocument> docs, int offset)