public interface Database extends IAdaptable, AutoCloseable, DominoClientDescendant
Modifier and Type | Interface and Description |
---|---|
static interface |
Database.AccessInfo |
static class |
Database.Action |
static class |
Database.CollectionType |
static class |
Database.CreateFlags |
static class |
Database.DocFlags |
static interface |
Database.DocInfo
Data container that stores the lookup result for document info
|
static interface |
Database.DocInfoExt
Extension of
Database.DocInfo with additional note lookup data |
static interface |
Database.EncryptionInfo
Represents the local encryption information for a database.
|
static interface |
Database.FormulaQueryCallback |
static interface |
Database.ModifiedNoteInfo |
static interface |
Database.ModifiedNoteInfos |
static class |
Database.ModifiedNotesInfoFlags
Flags to control the output of
getModifiedNotesInfo(Set, Set, TemporalAccessor, boolean, TemporalAccessor) |
static class |
Database.ModifiedTableMode |
static interface |
Database.NSFVersionInfo |
static class |
Database.OpenDocumentMode
Flags to control how to open a document.
|
static class |
Database.ReplicateOption |
static interface |
Database.SearchMatch
Container with information about each document received for an NSF search,
containing the document note id / UNID, modified dates, document class
and document flags.
|
Modifier and Type | Method and Description |
---|---|
void |
addToFolder(int folderNoteId,
Collection<Integer> noteIds)
Adds note ids to a folder
|
void |
addToFolder(String folderName,
Collection<Integer> noteIds)
Adds note ids to a folder
|
void |
close()
Closes the database, releasing its handle and allowing it to be
deleted.
|
int |
copyFolder(int sourceFolderNoteId,
String newFolderName)
Creates a copy of a folder including its content
|
int |
copyFolder(String sourceFolderName,
String newFolderName)
Creates a copy of a folder including its content
|
Document |
createDocument() |
Document |
createDocument(Set<Database.CreateFlags> flags) |
DocumentSelection |
createDocumentSelection()
Creates a new
DocumentSelection to select data or design documents. |
int |
createFolder(Database formatDb,
int formatFolderNoteId,
String newFolderName)
Creates a new folder in the database with the design of the specified folder/view
in another database
|
int |
createFolder(Database formatDb,
String formatFolderName,
String newFolderName)
Creates a new folder in the database with the design of the specified folder/view
in another database
|
int |
createFolder(int formatFolderNoteId,
String newFolderName)
Creates a new folder in the database with the design of the specified folder/view
|
int |
createFolder(String newFolderName)
Creates a new folder in the database with the default view/folder design
|
int |
createFolder(String formatFolderName,
String newFolderName)
Creates a new folder in the database with the design of the specified folder/view
|
QueryResultsProcessor |
createQueryResultsProcessor()
Creates a
QueryResultsProcessor to process the results
of multi-database queries |
void |
deleteDocument(int noteId) |
void |
deleteDocument(String unid) |
void |
deleteDocuments(Collection<Integer> noteIds) |
void |
deleteDocumentsByUNID(Collection<String> unids) |
void |
deleteFolder(int folderNoteId)
Deletes a folder
|
void |
deleteFolder(String folderName)
Deletes a folder
|
void |
deleteFTIndex()
This function deletes a full text index and disables full text indexing for a database.
|
int |
findCollectionId(String name,
Database.CollectionType type)
Looks up a collection by name in the database design
|
void |
forEachCollection(BiConsumer<DominoCollectionInfo,Loop> consumer)
Iterates over all collections in this database
|
void |
forEachProfileDocument(BiConsumer<Document,Loop> consumer)
Iterates over all profile documents in the database
|
void |
forEachProfileDocument(String profileName,
BiConsumer<Document,Loop> consumer)
Iterates over all profile documents of the specified type in
the database
|
void |
forEachProfileDocument(String profileName,
String userName,
BiConsumer<Document,Loop> consumer)
Iterates over all profile documents of the specified type/username in
the database
|
FTIndexStats |
ftIndex(Set<FTIndex> options)
This function creates a new full text index for a local database.
Synchronous full text indexing of a remote database is currently not supported. |
void |
ftIndexRequest()
Requests an asynchronous update of the full text index
|
DominoOriginatorId |
generateOID()
This function generates a new Originator ID (OID) used to uniquely identify a document.
Use this function when you already have a document open and wish to create a totally new document with the same items as the open document. You do not need this method when creating a new note from scratch using createDocument() ,
because the OID is already generated for you.If the database resides on a remote Lotus Domino Server, the current user must to have the appropriate level of access to carry out this operation. |
String |
generateUNID() |
String |
getAbsoluteFilePath()
Retrieves the file path of the database.
|
Acl |
getACL() |
Optional<Agent> |
getAgent(String agentName)
Looks up and loads an agent in the database design
|
Optional<Document> |
getAgentSavedData(String agentName)
The returned document is created when you save an agent, and it is stored in
the same database as the agent.
The document replicates, but is not displayed in views. Each time you edit and re-save an agent, its saved data document is deleted and a new, blank one is created. |
Stream<DominoCollectionInfo> |
getAllCollections()
Returns a
Stream of DominoCollectionInfo objects that
contain infos about the collections in the database. |
Map<String,Map<String,Integer>> |
getAllDocumentsByPrimaryKey()
Returns the note id of all documents with assigned primary key
(via
Document.setPrimaryKey(String, String) , hashed by their category value
and object id |
Map<String,Integer> |
getAllDocumentsByPrimaryKey(String category)
Returns the note id of all documents with
category in the assigned primary key
(via Document.setPrimaryKey(String, String) , hashed by their category value
and object id |
IDTable |
getAllNoteIds(Set<DocumentClass> docClasses,
boolean includeDeletions)
This function returns an
IDTable of all note IDs in the database
with the given set of DocumentClass .If includeDeletions is set to TRUE, the returned IDTable
also contains the note IDs of deleted documents. |
BuildVersionInfo |
getBuildVersionInfo()
This function returns a
BuildVersionInfo object which contains all types of
information about the level of code running on a machine.See BuildVersionInfo for more information. |
String |
getCategories() |
DbDesign |
getDesign() |
String |
getDesignTemplateName()
The name of the design template from which a database inherits its design.
If the database does not inherit its design from a design template, it returns an empty string (""). |
Optional<Document> |
getDocumentById(int noteId)
Opens a document in the database
|
Optional<Document> |
getDocumentById(int noteId,
Set<Database.OpenDocumentMode> flags)
Opens a document in the database
|
Optional<Document> |
getDocumentByPrimaryKey(String category,
String objectId)
Uses an efficient NSF lookup mechanism to find a document that
matches the primary key specified with
category and
objectKey . |
Optional<Document> |
getDocumentByUNID(String unid)
Opens a document in the database
|
Optional<Document> |
getDocumentByUNID(String unid,
Set<Database.OpenDocumentMode> flags)
Opens a document in the database
|
Database.DocInfoExt |
getDocumentInfo(int noteId) |
Database.AccessInfo |
getEffectiveAccessInfo()
Retrieves the current effective access level and flags for the open database.
|
int |
getFolderDocCount(int folderNoteId)
This function returns the number of entries in the specified folder's index.
This is the number of documents plus the number of categories (if any) in the folder. Subfolders and documents in subfolders are not included in the count. |
int |
getFolderDocCount(String folderName)
This function returns the number of entries in the specified folder's index.
This is the number of documents plus the number of categories (if any) in the folder. Subfolders and documents in subfolders are not included in the count. |
IDTable |
getIDTableForFolder(int folderNoteId,
boolean validateIds)
This function gets the Note IDs of notes in a folder and returns a IDTable.
|
IDTable |
getIDTableForFolder(String folderName,
boolean validateIds)
This function gets the Note IDs of notes in a folder and returns a IDTable.
|
NavigableMap<String,ItemDataType> |
getItemDefinitionTable()
The extended version of the Item Definition Table for a database contains
the number of items, name and type of all the items defined in that database.
Examples are field names, form names, design names, and formula labels. Applications can obtain a copy of the extended version of the Item Definition Table by calling this method. |
Optional<DominoDateTime> |
getLastFTIndexTime()
This routine returns the last time a database was full text indexed.
|
Database.EncryptionInfo |
getLocalEncryptionInfo() |
IDTable |
getModifiedNoteIds(Set<DocumentClass> docClasses,
TemporalAccessor since,
boolean includeDeletions)
This function returns an
IDTable of Note IDs of documents which have been modified in some way
from the given starting time until "now".The ending date/time is returned in IDTable.getDateTime() , so that this
function can be performed incrementally.The returned IDTable also contains the note IDs of deleted documents. |
Database.ModifiedNoteInfos |
getModifiedNotesInfo(Set<DocumentClass> docClasses,
Set<Database.ModifiedNotesInfoFlags> infoRequested,
TemporalAccessor sinceParam,
boolean includeDeletions,
TemporalAccessor optUntilParam)
Returns information about documents modified since the specified date/time
|
void |
getModifiedTime(Ref<DominoDateTime> retDataModified,
Ref<DominoDateTime> retNonDataModified)
This function obtains the date/time of the last modified data and non-data documents
in the specified database.
|
Database.DocInfo[] |
getMultiDocumentInfo(int[] noteIds)
This method can be used to get information for a number documents in a
database from their note ids in a single call.
The data returned by this method is the note id, the UNID of the document, the sequence number and the sequence time ("Modified initially" time). In addition, the method checks whether a document exists or has been deleted. |
Database.DocInfo[] |
getMultiDocumentInfo(String[] noteUNIDs)
This method can be used to get information for a number documents in a
database from their note unids in a single call.
The data returned by this method is the note id the UNID of the document, the sequence number and the sequence time ("Modified initially" time). In addition, the method checks whether a document exists or has been deleted. |
Optional<UserNamesList> |
getNamesList()
This function returns a
UserNamesList structure. |
Database.NSFVersionInfo |
getNSFVersionInfo()
Reads information about the On-Disk-Structure (ODS) of the database.
|
boolean |
getOption(DatabaseOption option)
Gets the value of a database option
|
Set<DatabaseOption> |
getOptions()
Returns the
DatabaseOption values for the database |
Optional<Document> |
getProfileDocument(String profileName) |
Optional<Document> |
getProfileDocument(String profileName,
String userName) |
String |
getRelativeFilePath()
Retrieves the file path of the database relative to the containing host's data directory.
|
String |
getReplicaID() |
String |
getServer() |
Optional<Document> |
getSoftDeletedDocumentById(int noteId)
Opens a soft deleted document in the database
|
Optional<Document> |
getSoftDeletedDocumentByUNID(String unid)
Opens a soft deleted document in the database
|
String |
getTemplateName()
The template name of a database, if the database is a template.
|
String |
getTitle() |
Optional<IDTable> |
getUnreadDocumentTable(String userName,
boolean createIfNotAvailable,
boolean updateUnread)
An ID Table is created containing the list of unread documents in the
database for the specified user.
The argument createIfNotAvailable controls what action is to be performed
if there is no list of unread notes for the specified user in the database.If no list is found and this flag is set to false , the method will return null .if this flag is set to {code true}, the list of unread documents will be created and all documents in the database will be added to the list. No coordination is performed between different users of the same database. If an application obtains a list of unread documents while another user is modifying the list, the changes made may not be visible to the application. Unread marks for each user are stored in the client desktop.dsk file and in the database. When a user closes a database (either through the Notes user interface or through an API program), the unread marks in the desktop.dsk file and in the database are synchronized so that they match. Unread marks are not replicated when a database is replicated. Instead, when a user opens a replica of a database, the unread marks from the desktop.dsk file propagates to the replica database. |
void |
hardDeleteDocument(int softDelNoteId)
This function permanently deletes the specified "soft deleted" document from
the database.
The deleted document may be of any DocumentClass . |
boolean |
hasFullAccess()
Checks whether we have full access on a database
|
boolean |
isDocumentLockingEnabled() |
boolean |
isDocumentUnread(String userName,
int noteId)
Checks if a document is in the unread table for the specified user.
For performance reasons we internally cache the unread table and store the username. |
boolean |
isFTIndex() |
boolean |
isLargeSummaryEnabled() |
boolean |
isLocallyEncrypted()
Determines whether the database is locally encrypted.
|
boolean |
isRemote()
Checks whether a database is located on a remote server
|
void |
moveFolder(int folderNoteId,
int newParentFolderNoteId)
Moves a folder below another one
|
void |
moveFolder(String folderName,
String newParentFolderName)
Moves a folder below another one
|
Optional<DominoCollection> |
openCollection(String collectionName) |
Optional<DominoCollection> |
openCollectionByUNID(String unid) |
Optional<DominoCollection> |
openDefaultCollection() |
DominoCollection |
openDesignCollection()
Opens and returns the design collection
|
List<String> |
queryAccessRoles(String userName)
Convenience method to look up the roles for a user from the database
Acl .Use Acl.lookupAccess(UserNamesList) if you need other access information
for the same user as well. |
DocumentSummaryQueryResult |
queryDocuments()
Runs an operation on all documents in the database
|
DocumentSummaryQueryResult |
queryDocuments(Collection<Integer> ids)
Runs an operation on a number of documents in the database
|
DQLQueryResult |
queryDQL(DQL.DQLTerm query)
Runs a DQL query against the documents in the database.
|
DQLQueryResult |
queryDQL(DQL.DQLTerm query,
Set<DBQuery> flags)
Runs a DQL query against the documents in the database.
|
DQLQueryResult |
queryDQL(DQL.DQLTerm query,
Set<DBQuery> flags,
int maxDocsScanned,
int maxEntriesScanned,
int maxMsecs)
Runs a DQL query against the documents in the database.
|
DQLQueryResult |
queryDQL(String query)
Runs a DQL query against the documents in the database.
|
DQLQueryResult |
queryDQL(String query,
Set<DBQuery> flags)
Runs a DQL query against the documents in the database.
|
DQLQueryResult |
queryDQL(String query,
Set<DBQuery> flags,
int maxDocsScanned,
int maxEntriesScanned,
int maxMsecs)
Runs a DQL query against the documents in the database.
|
FormulaQueryResult |
queryFormula(String selectionFormula,
IDTable filter,
Set<DirectorySearchQuery.SearchFlag> searchFlags,
TemporalAccessor since,
Set<DocumentClass> docClass)
Evaluates a formula on a set of documents or the whole database
|
DominoDateTime |
queryFormula(String selectionFormula,
Set<Integer> filter,
Set<DirectorySearchQuery.SearchFlag> searchFlags,
TemporalAccessor since,
Set<DocumentClass> docClass,
Map<String,String> computeValues,
Database.FormulaQueryCallback callback) |
FTQueryResult |
queryFTIndex(String query,
int maxResults,
Set<FTQuery> options,
Set<Integer> filterIds,
int start,
int count)
Performs a fulltext search in the database with advanced options.
|
void |
refreshDesign(String server)
This function will refresh the database design, as allowed by the database/design properties and
access control of Domino, from a server's templates.
The refreshed database, if open in Domino or Notes at the time of refresh, must be closed and reopened to view any changes. Convenience function that calls #refreshDesign(String, boolean, boolean, IBreakHandler) with
force and errIfTemplateNotFound set to true and without break handler. |
void |
refreshDesign(String server,
boolean force,
boolean errIfTemplateNotFound,
DominoClient.IBreakHandler abortHandler)
This function will refresh the database design, as allowed by the database/design properties and
access control of Domino, from a server's templates.
The refreshed database, if open in Domino or Notes at the time of refresh, must be closed and reopened to view any changes. |
void |
removeAllFromFolder(int folderNoteId)
Removes all note ids from a folder
|
void |
removeAllFromFolder(String folderName)
Removes all note ids from a folder
|
void |
removeFromFolder(int folderNoteId,
Collection<Integer> noteIds)
Removes note ids from a folder
|
void |
removeFromFolder(String folderName,
Collection<Integer> noteIds)
Removes note ids from a folder
|
void |
renameFolder(int oldFolderNoteId,
String newFolderName)
Renames a folder
|
void |
renameFolder(String oldFolderName,
String newFolderName)
Renames a folder
|
Database |
reopen()
Re-opens the database with a new handle.
|
DominoClient.NotesReplicationStats |
replicate(String serverName)
Bidirectional replication of this database with another server
|
DominoClient.NotesReplicationStats |
replicate(String serverName,
Set<Database.ReplicateOption> options,
int timeLimitMin,
DominoClient.ReplicationStateListener progressListener)
Replicate database with additional options
|
void |
setCategories(String categories) |
void |
setDesignTemplateName(String newDesignTemplateName)
Changes the name of the design template from which a database inherits its design
|
void |
setDocumentLockingEnabled(boolean b) |
void |
setOption(DatabaseOption option,
boolean flag)
Sets the value of a database option
|
void |
setTemplateName(String newTemplateName)
Changes the template name of a template database.
|
void |
setTitle(String title) |
int |
toNoteId(String unid)
Converts a single UNID to a note id
|
void |
toNoteIds(Collection<String> unids,
Map<String,Integer> resolvedNoteIDsByUNID,
Set<String> unresolvedUNIDs)
Bulk conversion of UNIDs to note ids
|
String |
toUNID(int noteId)
Converts a single note ID to a UNID
|
void |
toUNIDs(Collection<Integer> noteIds,
Map<Integer,String> resolvedUNIDsByNoteId,
Set<Integer> unresolvedNoteIds)
Bulk conversion of note ids to UNIDs
|
void |
updateDQLDesignCatalog(boolean rebuild)
Harvest view design elements for optimized DQL performance.
|
void |
updateUnreadDocumentTable(String userName,
Set<Integer> noteIdToMarkRead,
Set<Integer> noteIdsToMarkUnread)
Method to apply changes to the unread document table
|
getAdapter
getParentDominoClient
String getServer()
String getRelativeFilePath()
String getAbsoluteFilePath()
If the database is on a remote server, this path will be relative to the server's data directory.
If the database is local, this will be an absolute local file path.
String getReplicaID()
String getTitle()
void setTitle(String title)
boolean isRemote()
boolean hasFullAccess()
Acl getACL()
Optional<DominoCollection> openCollection(String collectionName)
Optional<DominoCollection> openCollectionByUNID(String unid)
unid
- the UNID of a view or folder note to openOptional
describing the requested collection, or an empty one if
the note does not existOptional<DominoCollection> openDefaultCollection()
DominoCollection openDesignCollection()
void forEachCollection(BiConsumer<DominoCollectionInfo,Loop> consumer)
consumer
- consumer to receive collection infoStream<DominoCollectionInfo> getAllCollections()
Stream
of DominoCollectionInfo
objects that
contain infos about the collections in the database.Optional<Document> getDocumentById(int noteId)
noteId
- the ID of the document to retrieveOptional
describing the document matching that ID, or
an empty one if there is no such documentDocumentDeletedException
- if the document has been deletedOptional<Document> getDocumentById(int noteId, Set<Database.OpenDocumentMode> flags)
noteId
- the ID of the document to retrieveflags
- the flags to control the document-opening modeOptional
describing the document matching that ID, or
an empty one if there is no such documentDocumentDeletedException
- if the document has been deletedOptional<Document> getSoftDeletedDocumentById(int noteId)
noteId
- the ID of the document to retrieveOptional
describing the soft-deleted document matching that ID, or
an empty one if there is no such documentOptional<Document> getSoftDeletedDocumentByUNID(String unid)
unid
- the UNID of the document to retrieveOptional
describing the soft-deleted document matching that UNID, or
an empty one if there is no such documentOptional<Document> getDocumentByUNID(String unid)
unid
- UNID of the document to retrieveOptional
describing the the document matching that ID, or
an empty one if there is no such documentDocumentDeletedException
- if the document has been deletedOptional<Document> getDocumentByUNID(String unid, Set<Database.OpenDocumentMode> flags)
unid
- the UNID of the document to retrieveflags
- the flags to control the document-opening modeOptional
describing the document matching that UNID, or
an empty one if there is no such documentDocumentDeletedException
- if the document has been deletedOptional<Document> getDocumentByPrimaryKey(String category, String objectId)
category
and
objectKey
.category
- category part of primary keyobjectId
- object id part of primary keyOptional
describing the document matching that key, or
an empty one if there is no such documentMap<String,Map<String,Integer>> getAllDocumentsByPrimaryKey()
Document.setPrimaryKey(String, String)
, hashed by their category value
and object idMap<String,Integer> getAllDocumentsByPrimaryKey(String category)
category
in the assigned primary key
(via Document.setPrimaryKey(String, String)
, hashed by their category value
and object idcategory
- categoryvoid deleteDocument(int noteId)
void deleteDocument(String unid)
void deleteDocuments(Collection<Integer> noteIds)
void deleteDocumentsByUNID(Collection<String> unids)
Document createDocument()
Document createDocument(Set<Database.CreateFlags> flags)
Optional<Document> getProfileDocument(String profileName)
profileName
- the name of the profile document to returnOptional
describing the existing or new profile document, or an
empty one if the document does not exist and cannot be createdOptional<Document> getProfileDocument(String profileName, String userName)
profileName
- the name of the profile document to returnuserName
- the user name key for the profile instanceOptional
describing the existing or new profile document, or an
empty one if the document does not exist and cannot be createdvoid forEachProfileDocument(BiConsumer<Document,Loop> consumer)
consumer
- consumer to receive documentsvoid forEachProfileDocument(String profileName, BiConsumer<Document,Loop> consumer)
profileName
- profile nameconsumer
- consumer to receive documentsvoid forEachProfileDocument(String profileName, String userName, BiConsumer<Document,Loop> consumer)
profileName
- profile nameuserName
- usernameconsumer
- consumer to receive documentsDominoClient.NotesReplicationStats replicate(String serverName)
serverName
- server to replicate withDominoClient.NotesReplicationStats replicate(String serverName, Set<Database.ReplicateOption> options, int timeLimitMin, DominoClient.ReplicationStateListener progressListener)
serverName
- server to replicate withoptions
- replication optionstimeLimitMin
- If non-zero, number of minutes replication is allowed to execute before cancellation. If not specified, no limit is imposedprogressListener
- optional listener to get notified about replication progressString toUNID(int noteId)
noteId
- note IDint toNoteId(String unid)
unid
- UNIDvoid toUNIDs(Collection<Integer> noteIds, Map<Integer,String> resolvedUNIDsByNoteId, Set<Integer> unresolvedNoteIds)
noteIds
- note ids to convertresolvedUNIDsByNoteId
- UNIDs for note ids that could be resolvedunresolvedNoteIds
- set of note ids that could not be resolvedvoid toNoteIds(Collection<String> unids, Map<String,Integer> resolvedNoteIDsByUNID, Set<String> unresolvedUNIDs)
unids
- UNIDs to convertresolvedNoteIDsByUNID
- Note ids for UNIDs that could be resolvedunresolvedUNIDs
- set of UNIDs that could not be resolvedboolean isDocumentLockingEnabled()
void setDocumentLockingEnabled(boolean b)
boolean isLargeSummaryEnabled()
boolean isFTIndex()
void deleteFTIndex()
FTIndexStats ftIndex(Set<FTIndex> options)
ftIndexRequest()
to request an index update of a remote database.options
- Indexing options. See FTIndex
void ftIndexRequest()
Optional<DominoDateTime> getLastFTIndexTime()
Optional
describing the last index time, or an empty one if the
database has not been indexedboolean isLocallyEncrypted()
Note: this may be slightly more efficient than getLocalEncryptionInfo()
.
true
if the database is encrypted on disk; false
otherwiseString generateUNID()
String getCategories()
void setCategories(String categories)
void close()
Calling this method will cause all future invocations of methods on this object to fail.
close
in interface AutoCloseable
Database.DocInfo[] getMultiDocumentInfo(int[] noteIds)
noteIds
- array of note idsnoteIds
arrayIllegalArgumentException
- if note id array has too many entries (more than 65535)Database.DocInfo[] getMultiDocumentInfo(String[] noteUNIDs)
noteUNIDs
- array of note unidsnoteUNIDs
arrayIllegalArgumentException
- if note unid array has too many entries (more than 32767)Database.DocInfoExt getDocumentInfo(int noteId)
Optional<Agent> getAgent(String agentName)
agentName
- agent nameOptional
describing the agent, or an empty one if no
such agent can be foundOptional<Document> getAgentSavedData(String agentName)
agentName
- agent nameOptional
describing the agent's saved data, or an empty one if no
such agent can be found or if it has no saved dataString getTemplateName()
void setTemplateName(String newTemplateName)
newTemplateName
- new template nameString getDesignTemplateName()
void setDesignTemplateName(String newDesignTemplateName)
newDesignTemplateName
- new design template nameFTQueryResult queryFTIndex(String query, int maxResults, Set<FTQuery> options, Set<Integer> filterIds, int start, int count)
query
- fulltext querymaxResults
- Maximum number of documents to return (max. 65535). Use 0 to return the maximum number of results for the searchoptions
- search optionsfilterIds
- optional ID table to further refine the search. Use null if this is not required.start
- the starting document number for the paged result. For the non-paged result, set this item to 0. For the paged result, set this item to a non-zero number.count
- number of documents to return for the paged result (max. 65535), set to 0 to return all resultsvoid updateDQLDesignCatalog(boolean rebuild)
rebuild
- true to rebuild the design catalogDQLQueryResult queryDQL(DQL.DQLTerm query)
query
- Domino query (DQL) generated via DQL
factory classDQLQueryResult queryDQL(DQL.DQLTerm query, Set<DBQuery> flags)
DQLQueryResult queryDQL(DQL.DQLTerm query, Set<DBQuery> flags, int maxDocsScanned, int maxEntriesScanned, int maxMsecs)
query
- Domino query (DQL) generated via DQL
factory classflags
- controlling execution, see DBQuery
maxDocsScanned
- maximum number of document scans allowedmaxEntriesScanned
- maximum number of view entries processed allowsmaxMsecs
- max milliseconds of executiion allowDQLQueryResult queryDQL(String query)
query
- Domino query (DQL) as a single string (max 64K in length)DQLQueryResult queryDQL(String query, Set<DBQuery> flags)
query
- Domino query (DQL) as a single string (max 64K in length)flags
- controlling execution, see DBQuery
DQLQueryResult queryDQL(String query, Set<DBQuery> flags, int maxDocsScanned, int maxEntriesScanned, int maxMsecs)
query
- Domino query (DQL) as a single string (max 64K in length)flags
- controlling execution, see DBQuery
maxDocsScanned
- maximum number of document scans allowedmaxEntriesScanned
- maximum number of view entries processed allowsmaxMsecs
- max milliseconds of execution allowFormulaQueryResult queryFormula(String selectionFormula, IDTable filter, Set<DirectorySearchQuery.SearchFlag> searchFlags, TemporalAccessor since, Set<DocumentClass> docClass)
selectionFormula
- selection formulafilter
- optional filter IDTable to evaluate the formula only against selected documentssearchFlags
- flags to control the search behaviorsince
- optional start date/time to run incremental searches, e.g. the value IDTable.getDateTime()
of the returned FormulaQueryResult.getNoteIds()
docClass
- class of documents to searchDocumentSummaryQueryResult queryDocuments()
DbQueryResult.computeValues(Map)
to compute document values on the fly and DbQueryResult.sort(DominoCollection)
to project the document note ids onto a DominoCollection
to get them back sorted via DbQueryResult.collectEntries(int, int)
DocumentSummaryQueryResult queryDocuments(Collection<Integer> ids)
ids
- note ids of documents to processDbQueryResult.computeValues(Map)
to compute document values on the fly and DbQueryResult.sort(DominoCollection)
to project the document note ids onto a DominoCollection
to get them back sorted via DbQueryResult.collectEntries(int, int)
DominoDateTime queryFormula(String selectionFormula, Set<Integer> filter, Set<DirectorySearchQuery.SearchFlag> searchFlags, TemporalAccessor since, Set<DocumentClass> docClass, Map<String,String> computeValues, Database.FormulaQueryCallback callback)
IDTable getAllNoteIds(Set<DocumentClass> docClasses, boolean includeDeletions)
IDTable
of all note IDs in the database
with the given set of DocumentClass
.includeDeletions
is set to TRUE, the returned IDTable
also contains the note IDs of deleted documents. Thoese note IDs are OR'ed
with the special flag IDTable.NOTEID_FLAG_DELETED
.IDTable.getDateTime()
as since
parameter of getModifiedNoteIds(Set, TemporalAccessor, boolean)
to incrementally
read note id changes.getModifiedNoteIds(Set, TemporalAccessor, boolean)
with a since value of NULL.docClasses
- the appropriate DocumentClass
mask for the documents you wish to select. Symbols can be OR'ed to obtain the desired Note classes in the resulting ID Table.includeDeletions
- true to include the note IDs of deleted docsIDTable getModifiedNoteIds(Set<DocumentClass> docClasses, TemporalAccessor since, boolean includeDeletions)
IDTable
of Note IDs of documents which have been modified in some way
from the given starting time until "now".IDTable.getDateTime()
, so that this
function can be performed incrementally.IDTable.NOTEID_FLAG_DELETED
.docClasses
- the appropriate DocumentClass
mask for the documents you wish to select. Symbols can be OR'ed to obtain the desired Note classes in the resulting ID Table.since
- A date/time value containing the starting date used when selecting notes to be added to the ID Table built by this function. Use null to get all note ids.includeDeletions
- true to include the note IDs of deleted docsint findCollectionId(String name, Database.CollectionType type)
name
- nametype
- type of collection to findint createFolder(String newFolderName)
newFolderName
- name of new folderint createFolder(String formatFolderName, String newFolderName)
formatFolderName
- name of folder/view to copy designnewFolderName
- name of new folderint createFolder(int formatFolderNoteId, String newFolderName)
formatFolderNoteId
- note id of folder/view to copy designnewFolderName
- name of new folderint createFolder(Database formatDb, String formatFolderName, String newFolderName)
formatDb
- database containing the folder designformatFolderName
- name of folder/view to copy designnewFolderName
- name of new folderint createFolder(Database formatDb, int formatFolderNoteId, String newFolderName)
formatDb
- database containing the folder designformatFolderNoteId
- name of folder/view to copy designnewFolderName
- name of new foldervoid deleteFolder(String folderName)
folderName
- name of folder to deletevoid deleteFolder(int folderNoteId)
folderNoteId
- note id of folder to deletevoid moveFolder(String folderName, String newParentFolderName)
folderName
- name of folder to movenewParentFolderName
- new parent foldervoid moveFolder(int folderNoteId, int newParentFolderNoteId)
folderNoteId
- note id of folder to movenewParentFolderNoteId
- new parent folder note idvoid renameFolder(String oldFolderName, String newFolderName)
oldFolderName
- old folder namenewFolderName
- new folder namevoid renameFolder(int oldFolderNoteId, String newFolderName)
oldFolderNoteId
- note id of folder to renamenewFolderName
- new folder nameint copyFolder(String sourceFolderName, String newFolderName)
sourceFolderName
- name of folder to copynewFolderName
- name of new folder copyint copyFolder(int sourceFolderNoteId, String newFolderName)
sourceFolderNoteId
- note id of folder to copynewFolderName
- name of new folder copyvoid addToFolder(String folderName, Collection<Integer> noteIds)
folderName
- name of foldernoteIds
- note ids to addvoid addToFolder(int folderNoteId, Collection<Integer> noteIds)
folderNoteId
- note id of foldernoteIds
- note ids to addvoid removeFromFolder(String folderName, Collection<Integer> noteIds)
folderName
- name of foldernoteIds
- note ids to removevoid removeFromFolder(int folderNoteId, Collection<Integer> noteIds)
folderNoteId
- note id of foldernoteIds
- note ids to removevoid removeAllFromFolder(int folderNoteId)
folderNoteId
- note id of foldervoid removeAllFromFolder(String folderName)
folderName
- name of folderint getFolderDocCount(String folderName)
folderName
- name of folderint getFolderDocCount(int folderNoteId)
folderNoteId
- note id of folderIDTable getIDTableForFolder(int folderNoteId, boolean validateIds)
folderNoteId
- note id of foldervalidateIds
- If set, return only "validated" noteIDsIDTable getIDTableForFolder(String folderName, boolean validateIds)
folderName
- name of foldervalidateIds
- If set, return only "validated" noteIDsDbDesign getDesign()
Database.ModifiedNoteInfos getModifiedNotesInfo(Set<DocumentClass> docClasses, Set<Database.ModifiedNotesInfoFlags> infoRequested, TemporalAccessor sinceParam, boolean includeDeletions, TemporalAccessor optUntilParam)
docClasses
- document classes to scan, e.g. DocumentClass.DATA
infoRequested
- controls what to return and how to filtersinceParam
- optional for incremental scans, use Database.ModifiedNoteInfos.getUntil()
of a previous searchincludeDeletions
- true to return deletionsoptUntilParam
- if not null, optional upper date to return resultsSet<DatabaseOption> getOptions()
DatabaseOption
values for the databaseboolean getOption(DatabaseOption option)
option
- set DatabaseOption
void setOption(DatabaseOption option, boolean flag)
option
- see DatabaseOption
flag
- true to set the optionOptional<IDTable> getUnreadDocumentTable(String userName, boolean createIfNotAvailable, boolean updateUnread)
createIfNotAvailable
controls what action is to be performed
if there is no list of unread notes for the specified user in the database.false
, the method will return null
.userName
- user for which to check unread marks (abbreviated or canonical format); use null
for current DominoClient
usercreateIfNotAvailable
- {code true}: If the unread list for this user cannot be found on disk, return all note IDs. false
: If the list cannot be found, return nullupdateUnread
- true
to update unread marks, false
to not update unread marks.Optional
describing the table of unread documents, or an empty one if there is no tablevoid updateUnreadDocumentTable(String userName, Set<Integer> noteIdToMarkRead, Set<Integer> noteIdsToMarkUnread)
userName
- user for which to update unread marks (abbreviated or canonical format); use null
for current DominoClient
usernoteIdToMarkRead
- note ids to mark read (=remove from the unread table)noteIdsToMarkUnread
- note ids to mark unread (=add to the unread table)List<String> queryAccessRoles(String userName)
Acl
.Acl.lookupAccess(UserNamesList)
if you need other access information
for the same user as well.userName
- username, either canonical or abbreviatedboolean isDocumentUnread(String userName, int noteId)
userName
- name if user in abbreviated or canonical format; if null, we use DominoClient.getEffectiveUserName()
noteId
- note id of documentvoid refreshDesign(String server)
#refreshDesign(String, boolean, boolean, IBreakHandler)
with
force and errIfTemplateNotFound set to true and without break handler.server
- name of the Lotus Domino Server on which the database template resides, If you want to specify "no server" (the local machine), use ""void refreshDesign(String server, boolean force, boolean errIfTemplateNotFound, DominoClient.IBreakHandler abortHandler)
server
- name of the Lotus Domino Server on which the database template resides, If you want to specify "no server" (the local machine), use ""force
- true to force operation, even if destination "up to date"errIfTemplateNotFound
- true to return an error if the template is not foundabortHandler
- optional break handler to abort the operation or nullvoid hardDeleteDocument(int softDelNoteId)
DocumentClass
. The active user ID must have
sufficient user access in the databases's Access Control List (ACL) to carry
out a deletion on the document or the function will throw an error.softDelNoteId
- The note ID of the document that you want to deletevoid getModifiedTime(Ref<DominoDateTime> retDataModified, Ref<DominoDateTime> retNonDataModified)
retDataModified
- will be filled with the last modified date/time of data documentsretNonDataModified
- will be filled with the last modified date/time of non-data (design) documentsDominoOriginatorId generateOID()
createDocument()
,
because the OID is already generated for you.Database reopen()
This can be useful for additional safely when working with the same database across multiple threads.
Database
instance for the current databaseNavigableMap<String,ItemDataType> getItemDefinitionTable()
DocumentSelection createDocumentSelection()
DocumentSelection
to select data or design documents.QueryResultsProcessor createQueryResultsProcessor()
QueryResultsProcessor
to process the results
of multi-database queriesDatabase.EncryptionInfo getLocalEncryptionInfo()
Database.AccessInfo getEffectiveAccessInfo()
Database.AccessInfo
object describing the current accessDatabase.NSFVersionInfo getNSFVersionInfo()
Domino or Notes Software Releases | Major Version Numbers That Can Be Accessed |
---|---|
1.x | 16 |
2.x | 16 |
3.x | 17 |
4.0, 4.1, 4.5.x, 4.6.x | 20 or less |
5.0 - 5.0.12, 6 - 6.0.3, 6.5, 7.0 | 43 or less |
9.0 | 52 |
10.x - 11.x | 53 |
12.0.0 | 54 |
BuildVersionInfo getBuildVersionInfo()
BuildVersionInfo
object which contains all types of
information about the level of code running on a machine.BuildVersionInfo
for more information.Optional<UserNamesList> getNamesList()
UserNamesList
structure. Result is empty
when the database was opened as the ID user.Copyright © 2019–2021 HCL. All rights reserved.