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 TypeMethodDescriptionvoid
Clears the last applied filter.void
Clears the result of the last query.final int
executeCountQuery
(com.saperion.rmi.SaQueryInfo query) Executes a count query.final ModelResult
executePagingQuery
(ResultPaging paging) Execute query with paging.final ModelResult
executeQuery
(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.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.final ModelResult
final ResultProperties
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 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 ModelResult
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.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:QueryService
Returns the metadata for a task with the specified ID.- Specified by:
getInboxTaskProperties
in 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:
getAttachmentInfo
in 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:
executePagingQuery
in 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:
executeCountQuery
in 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:
executeQuery
in interfaceQueryService
- Parameters:
query
- query statement- Returns:
- ModelResult
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exceptionWorkflowException
- workflow exceptionDatabaseException
- database exception- See Also:
-
getLastResult
- Specified by:
getLastResult
in 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:
getResultAtIndex
in 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:
getResultForId
in 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:
getResultPropertiesForRevision
in interfaceQueryService
- Parameters:
id
- Document id- Returns:
- ResultProperties
- See Also:
-
performClientSideSorting
Sorts the current result set.- Specified by:
performClientSideSorting
in 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:
performClientSideFiltering
in interfaceQueryService
- Parameters:
settings
- filter settings- Returns:
- ModelResult
-
clearFilter
public void clearFilter()Clears the last applied filter.- Specified by:
clearFilter
in interfaceQueryService
-
getResultPage
Get page from last result.- Specified by:
getResultPage
in 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:
getFieldDescriptions
in 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:QueryService
Sets the page size.- Specified by:
setPageSize
in 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:
searchFolderDocuments
in 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:
getHitCount
in 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:QueryService
Clears the result of the last query.- Specified by:
clearLastResult
in interfaceQueryService
-
updateRow
Description copied from interface:QueryService
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.- Specified by:
updateRow
in 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.
-