Package com.saperion.ngc.model.resultset
Interface QueryService
- All Superinterfaces:
Service
- All Known Implementing Classes:
QueryClassicConnectorService
- Author:
- mak
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears the last applied filter.void
Clears the result of the last query.int
executeCountQuery
(com.saperion.rmi.SaQueryInfo query) Executes a count query.executePagingQuery
(ResultPaging paging) Execute query with paging.executeQuery
(com.saperion.rmi.SaQueryInfo queryInfo) Execute query.getAttachmentInfo
(com.saperion.intf.wf.TaskInfo info) Loads the attachment for the specifiedTaskInfo
.getFieldDescriptions
(String ddcName) Returns a map of <fieldname, SaFieldDescription> SaFieldDescriptions of the given DDC.int
getHitCount
(com.saperion.rmi.SaQueryInfo info) Returns the number of hits for the specified query.getInboxTaskProperties
(String taskId) Returns the metadata for a task with the specified ID.getResultAtIndex
(int index) Returns the ResultProperties contained in the result list of the last search at the specified index.Returns the ResultProperties contained in the result list of the last search with the specified id.getResultPage
(int page, boolean newPaging) Get page from last result.Returns the ResultProperties contained in the result list of the last search with the specified revisionId.performClientSideFiltering
(RowFilterSettings settings) Filters the current result set.performClientSideSorting
(Map<String, SortDirection> columns, int page) Sorts the current result set.searchFolderDocuments
(String folderId, String folderDDC, com.saperion.rmi.SaQueryInfo hqlFilter) HQL search extended with additional folder informations and depth.void
setPageSize
(int size) Sets the page size.void
updateRow
(ResultProperties documentInfo) Updates the row in the previous query-result.
-
Method Details
-
executeQuery
ModelResult executeQuery(com.saperion.rmi.SaQueryInfo queryInfo) throws AuthenticationException, SystemException, WorkflowException, DatabaseException Execute query.- Parameters:
queryInfo
- query statement- Returns:
- ModelResult
- Throws:
AuthenticationException
- authentication exceptionWorkflowException
- workflow exceptionSystemException
- system exceptionAuthenticationException
- authentication exceptionDatabaseException
- database exception
-
executePagingQuery
Execute query with paging.- Parameters:
paging
- paging- Returns:
- ModelResult
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exception
-
executeCountQuery
int executeCountQuery(com.saperion.rmi.SaQueryInfo query) throws AuthenticationException, SystemException Executes a count query.- Parameters:
query
- Count query- Returns:
- Count
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exception
-
getResultAtIndex
Returns the ResultProperties contained in the result list of the last search at the specified index.- Parameters:
index
- index- Returns:
- ResultProperties at index
-
getResultForId
Returns the ResultProperties contained in the result list of the last search with the specified id.- Parameters:
id
- Document id- Returns:
- ResultProperties with id
- Throws:
DocumentIdentificationException
- Identification exception
-
getResultPropertiesForRevision
ResultProperties getResultPropertiesForRevision(DocumentId id) throws DocumentIdentificationException Returns the ResultProperties contained in the result list of the last search with the specified revisionId.- Parameters:
id
- Document id- Returns:
- ResultProperties
- Throws:
DocumentIdentificationException
- Identification exception
-
getLastResult
ModelResult getLastResult()- Returns:
- The last query result that was sent to the view.
-
getResultPage
Get page from last result.- Parameters:
page
- page to displaynewPaging
- set to true, when the paging has changed and needs to be reinitialized- Returns:
- ModelResult
-
getFieldDescriptions
Map<String,com.saperion.intf.SaFieldDescription> getFieldDescriptions(String ddcName) throws com.saperion.exception.SaSystemException, com.saperion.exception.SaAuthenticationException Returns a map of <fieldname, SaFieldDescription> SaFieldDescriptions of the given DDC.- Parameters:
ddcName
- The name of the DDC to get the SaFieldDescriptions of.- Returns:
- a map of SaFieldDescriptions of the given DDC.
- Throws:
com.saperion.exception.SaSystemException
- system exceptioncom.saperion.exception.SaAuthenticationException
- authentication exception
-
performClientSideSorting
Sorts the current result set.- Parameters:
columns
- the columns and directions used for sortingpage
- the page currently displayed- Returns:
- ModelResult
-
performClientSideFiltering
Filters the current result set.- Parameters:
settings
- filter settings- Returns:
- ModelResult
-
clearFilter
void clearFilter()Clears the last applied filter. -
setPageSize
void setPageSize(int size) Sets the page size.- Parameters:
size
- page size
-
searchFolderDocuments
ModelResult searchFolderDocuments(String folderId, String folderDDC, com.saperion.rmi.SaQueryInfo hqlFilter) throws SystemException, AuthenticationException HQL search extended with additional folder informations and depth.- Parameters:
folderId
- folder idfolderDDC
- Folder DDChqlFilter
- hql filter containing only the where-clause- Returns:
- ModelResult to display
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exception
-
getHitCount
int getHitCount(com.saperion.rmi.SaQueryInfo info) throws SystemException, AuthenticationException, DatabaseException Returns the number of hits for the specified query.- Parameters:
info
- query to get hits for- Returns:
- number of hits
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exceptionDatabaseException
- database exception
-
getInboxTaskProperties
ResultProperties getInboxTaskProperties(String taskId) throws AuthenticationException, SystemException, WorkflowException Returns the metadata for a task with the specified ID.- Parameters:
taskId
- ID of the task (SYSROWID)- Returns:
- task's metadata
- Throws:
AuthenticationException
- authentication error when loading metadataSystemException
- system error when loading metadataWorkflowException
- workflow error when loading metadata
-
getAttachmentInfo
DocumentDatabaseMetaInfo getAttachmentInfo(com.saperion.intf.wf.TaskInfo info) throws SystemException, AuthenticationException, DatabaseException Loads the attachment for the specifiedTaskInfo
.- Parameters:
info
- task to load attachment for- Returns:
- attachment or null if not found
- Throws:
SystemException
- system error when loading attachmentAuthenticationException
- authentication error when loading attachmentDatabaseException
- database error when loading attachment
-
clearLastResult
void clearLastResult()Clears the result of the last query. -
updateRow
Updates the row in the previous query-result. This method throws anIllegalArgumentException
when the specified row is not contained in the previous query-result. The provided metadata must contain the same original index as the row that is to be updated.- Parameters:
documentInfo
- the metadata of the row to be updated.- Throws:
DocumentIdentificationException
- when the documentInfo did not contain an ID or contained an incomplete ID.
-