Package com.saperion.ngc.model.resultset
Interface QueryService
-
- All Superinterfaces:
Service
- All Known Implementing Classes:
QueryClassicConnectorService
public interface QueryService extends Service
- Author:
- mak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearFilter()
Clears the last applied filter.void
clearLastResult()
Clears the result of the last query.int
executeCountQuery(com.saperion.rmi.SaQueryInfo query)
Executes a count query.ModelResult
executePagingQuery(ResultPaging paging)
Execute query with paging.ModelResult
executeQuery(com.saperion.rmi.SaQueryInfo queryInfo)
Execute query.DocumentDatabaseMetaInfo
getAttachmentInfo(com.saperion.intf.wf.TaskInfo info)
Loads the attachment for the specifiedTaskInfo
.java.util.Map<java.lang.String,com.saperion.intf.SaFieldDescription>
getFieldDescriptions(java.lang.String ddcName)
Returns a map ofSaFieldDescriptions of the given DDC. int
getHitCount(com.saperion.rmi.SaQueryInfo info)
Returns the number of hits for the specified query.ResultProperties
getInboxTaskProperties(java.lang.String taskId)
Returns the metadata for a task with the specified ID.ModelResult
getLastResult()
ResultProperties
getResultAtIndex(int index)
Returns the ResultProperties contained in the result list of the last search at the specified index.ResultProperties
getResultForId(DocumentId id)
Returns the ResultProperties contained in the result list of the last search with the specified id.ModelResult
getResultPage(int page, boolean newPaging)
Get page from last result.ResultProperties
getResultPropertiesForRevision(DocumentId id)
Returns the ResultProperties contained in the result list of the last search with the specified revisionId.ModelResult
performClientSideFiltering(RowFilterSettings settings)
Filters the current result set.ModelResult
performClientSideSorting(java.util.Map<java.lang.String,SortDirection> columns, int page)
Sorts the current result set.ModelResult
searchFolderDocuments(java.lang.String folderId, java.lang.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 Detail
-
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
ModelResult executePagingQuery(ResultPaging paging) throws AuthenticationException, SystemException
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
ResultProperties getResultAtIndex(int index)
Returns the ResultProperties contained in the result list of the last search at the specified index.- Parameters:
index
- index- Returns:
- ResultProperties at index
-
getResultForId
ResultProperties getResultForId(DocumentId id) throws DocumentIdentificationException
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
ModelResult getResultPage(int page, boolean newPaging)
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
java.util.Map<java.lang.String,com.saperion.intf.SaFieldDescription> getFieldDescriptions(java.lang.String ddcName) throws com.saperion.exception.SaSystemException, com.saperion.exception.SaAuthenticationException
Returns a map ofSaFieldDescriptions 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
ModelResult performClientSideSorting(java.util.Map<java.lang.String,SortDirection> columns, int page)
Sorts the current result set.- Parameters:
columns
- the columns and directions used for sortingpage
- the page currently displayed- Returns:
- ModelResult
-
performClientSideFiltering
ModelResult performClientSideFiltering(RowFilterSettings settings)
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(java.lang.String folderId, java.lang.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(java.lang.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
void updateRow(ResultProperties documentInfo) throws DocumentIdentificationException
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.
-
-