Package com.saperion.ngc.model.resultset
Class QueryClassicConnectorService
java.lang.Object
com.saperion.ngc.model.ClassicConnectorService
com.saperion.ngc.model.resultset.QueryClassicConnectorService
- All Implemented Interfaces:
QueryService,Service
Query service.
-
Field Summary
Fields inherited from class com.saperion.ngc.model.ClassicConnectorService
ddcCache -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the last applied filter.voidClears the result of the last query.final intexecuteCountQuery(com.saperion.rmi.SaQueryInfo query) Executes a count query.final ModelResultexecutePagingQuery(ResultPaging paging) Execute query with paging.final ModelResultexecuteQuery(com.saperion.rmi.SaQueryInfo query) 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.intgetHitCount(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.final ModelResultfinal ResultPropertiesgetResultAtIndex(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 withNewPaging) 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.final ModelResultperformClientSideSorting(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.voidsetPageSize(int size) Sets the page size.voidupdateRow(ResultProperties documentInfo) Updates the row in the previous query-result.Methods inherited from class com.saperion.ngc.model.ClassicConnectorService
convertAuthenticationException, getCachedDDC, getConnectionProvider, getCurrentUserFromSession, getSession, getWfConnectionProvider, isActive
-
Constructor Details
-
QueryClassicConnectorService
public QueryClassicConnectorService(int pageSize) Constructor.- Parameters:
pageSize- page size of view
-
-
Method Details
-
getInboxTaskProperties
public ResultProperties getInboxTaskProperties(String taskId) throws AuthenticationException, SystemException, WorkflowException Description copied from interface:QueryServiceReturns the metadata for a task with the specified ID.- Specified by:
getInboxTaskPropertiesin interfaceQueryService- 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
public DocumentDatabaseMetaInfo getAttachmentInfo(com.saperion.intf.wf.TaskInfo info) throws SystemException, AuthenticationException, DatabaseException Loads the attachment for the specifiedTaskInfo.- Specified by:
getAttachmentInfoin interfaceQueryService- 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- See Also:
-
executePagingQuery
public final ModelResult executePagingQuery(ResultPaging paging) throws AuthenticationException, SystemException Execute query with paging.- Specified by:
executePagingQueryin interfaceQueryService- Parameters:
paging- paging- Returns:
- ModelResult
- Throws:
AuthenticationException- authentication exceptionSystemException- system exception- See Also:
-
executeCountQuery
public final int executeCountQuery(com.saperion.rmi.SaQueryInfo query) throws AuthenticationException, SystemException Executes a count query.- Specified by:
executeCountQueryin interfaceQueryService- Parameters:
query- Count query- Returns:
- Count
- Throws:
AuthenticationException- authentication exceptionSystemException- system exception- See Also:
-
executeQuery
public final ModelResult executeQuery(com.saperion.rmi.SaQueryInfo query) throws AuthenticationException, SystemException, WorkflowException, DatabaseException Execute query.- Specified by:
executeQueryin interfaceQueryService- Parameters:
query- query statement- Returns:
- ModelResult
- Throws:
AuthenticationException- authentication exceptionSystemException- system exceptionWorkflowException- workflow exceptionDatabaseException- database exception- See Also:
-
getLastResult
- Specified by:
getLastResultin interfaceQueryService- Returns:
- The last query result that was sent to the view.
- See Also:
-
getResultAtIndex
Returns the ResultProperties contained in the result list of the last search at the specified index.- Specified by:
getResultAtIndexin interfaceQueryService- Parameters:
index- index- Returns:
- ResultProperties at index
- See Also:
-
getResultForId
Returns the ResultProperties contained in the result list of the last search with the specified id.- Specified by:
getResultForIdin interfaceQueryService- Parameters:
id- Document id- Returns:
- ResultProperties with id
- Throws:
DocumentIdentificationException- Identification exception- See Also:
-
getResultPropertiesForRevision
Returns the ResultProperties contained in the result list of the last search with the specified revisionId.- Specified by:
getResultPropertiesForRevisionin interfaceQueryService- Parameters:
id- Document id- Returns:
- ResultProperties
- See Also:
-
performClientSideSorting
Sorts the current result set.- Specified by:
performClientSideSortingin interfaceQueryService- Parameters:
columns- the columns and directions used for sortingpage- the page currently displayed- Returns:
- ModelResult
- See Also:
-
performClientSideFiltering
Filters the current result set.- Specified by:
performClientSideFilteringin interfaceQueryService- Parameters:
settings- filter settings- Returns:
- ModelResult
-
clearFilter
public void clearFilter()Clears the last applied filter.- Specified by:
clearFilterin interfaceQueryService
-
getResultPage
Get page from last result.- Specified by:
getResultPagein interfaceQueryService- Parameters:
page- page to displaywithNewPaging- set to true, when the paging has changed and needs to be reinitialized- Returns:
- ModelResult
-
getFieldDescriptions
public 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.- Specified by:
getFieldDescriptionsin interfaceQueryService- 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- See Also:
-
setPageSize
public void setPageSize(int size) Description copied from interface:QueryServiceSets the page size.- Specified by:
setPageSizein interfaceQueryService- Parameters:
size- page size
-
searchFolderDocuments
public ModelResult searchFolderDocuments(String folderId, String folderDDC, com.saperion.rmi.SaQueryInfo hqlFilter) throws SystemException, AuthenticationException HQL search extended with additional folder informations and depth.- Specified by:
searchFolderDocumentsin interfaceQueryService- Parameters:
folderId- folder idfolderDDC- Folder DDChqlFilter- hql filter containing only the where-clause- Returns:
- ModelResult to display
- Throws:
SystemException- system exceptionAuthenticationException- authentication exception- See Also:
-
getHitCount
public int getHitCount(com.saperion.rmi.SaQueryInfo info) throws SystemException, AuthenticationException, DatabaseException Returns the number of hits for the specified query.- Specified by:
getHitCountin interfaceQueryService- Parameters:
info- query to get hits for- Returns:
- number of hits
- Throws:
SystemException- system exceptionAuthenticationException- authentication exceptionDatabaseException- database exception- See Also:
-
clearLastResult
public void clearLastResult()Description copied from interface:QueryServiceClears the result of the last query.- Specified by:
clearLastResultin interfaceQueryService
-
updateRow
Description copied from interface:QueryServiceUpdates the row in the previous query-result. This method throws anIllegalArgumentExceptionwhen 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.- Specified by:
updateRowin interfaceQueryService- 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.
-