See: Description
| Interface | Description |
|---|---|
| HistoryOperations |
Operations used to handle search history.
|
| RepositorySearchResult |
Represents the search result for a search performed in the scope of a repository.
|
| SearchHistory |
Represents the history of a search operation.
|
| SearchOperations |
Operations used to search.
|
| TableSearchResult |
Represents the search result for a table.
|
| Class | Description |
|---|---|
| DatasetSearchContext | |
| DatasetSearchResult |
Represents the result of a search.
|
| GlobalSearchContext | |
| HistoryOperationsFactory |
Factory for history operations available to the {addon.label}.
|
| RecordSearchResult |
Represents the result of a search.
|
| SearchOperationsFactory |
Factory for Operations available to the {addon.label}.
|
Provides classes and interfaces required for the Search and History operations.
To launch a search at the repository level, do as follows:
//the repository to search
Repository repository;
//the dataspace to search
HomeKey homeKey;
//the dataset to search
AdaptationName adaptationName;
//the search template
String searchTemplate;
//keyword used to search
String query = "keyword";
//save the search history or not.
boolean savedToHistory = false;
//current user session
Session session;
SearchContext searchContext = new SearchContext(
Session session,
Repository repository,
HomeKey dataspace,
AdaptationName dataset,
String searchTemplate,
Object query,
boolean savedToHistory);
RepositorySearchResult searchResult = SearchOperationsFactory.getSearchOperations()
.search(searchContext);
Sample usage of HistoryOperations.
Repository repository;
Session session;
Adaptation dataset;
AdaptationTable table;
HistoryOperations historyOperations = HistoryOperationsFactory.getHistoryOperations();
//Deletes all records in the History table for the current user at the repository search scope.
historyOperations.clearRepositorySearchHistory(repository, session);
//Deletes all records in the History table for the current user at the dataset search scope.
historyOperations.clearDatasetSearchHistory(repository, dataset, session);