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
public class QueryClassicConnectorService extends ClassicConnectorService implements QueryService
Query service.
-
-
Field Summary
-
Fields inherited from class com.saperion.ngc.model.ClassicConnectorService
ddcCache
-
-
Constructor Summary
Constructors Constructor Description QueryClassicConnectorService(int pageSize)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearFilter()Clears the last applied filter.voidclearLastResult()Clears the result of the last query.intexecuteCountQuery(com.saperion.rmi.SaQueryInfo query)Executes a count query.ModelResultexecutePagingQuery(ResultPaging paging)Execute query with paging.ModelResultexecuteQuery(com.saperion.rmi.SaQueryInfo query)Execute query.DocumentDatabaseMetaInfogetAttachmentInfo(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. intgetHitCount(com.saperion.rmi.SaQueryInfo info)Returns the number of hits for the specified query.ResultPropertiesgetInboxTaskProperties(java.lang.String taskId)Returns the metadata for a task with the specified ID.ModelResultgetLastResult()ResultPropertiesgetResultAtIndex(int index)Returns the ResultProperties contained in the result list of the last search at the specified index.ResultPropertiesgetResultForId(DocumentId id)Returns the ResultProperties contained in the result list of the last search with the specified id.ModelResultgetResultPage(int page, boolean withNewPaging)Get page from last result.ResultPropertiesgetResultPropertiesForRevision(DocumentId id)Returns the ResultProperties contained in the result list of the last search with the specified revisionId.ModelResultperformClientSideFiltering(RowFilterSettings settings)Filters the current result set.ModelResultperformClientSideSorting(java.util.Map<java.lang.String,SortDirection> columns, int page)Sorts the current result set.ModelResultsearchFolderDocuments(java.lang.String folderId, java.lang.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
-
-
-
-
Method Detail
-
getInboxTaskProperties
public ResultProperties getInboxTaskProperties(java.lang.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:
QueryService.getAttachmentInfo(com.saperion.intf.wf.TaskInfo)
-
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:
(com.saperion.ngc.model.resultset.ResultPaging)
-
executeCountQuery
public final int executeCountQuery(com.saperion.rmi.SaQueryInfo query) throws AuthenticationException, SystemExceptionExecutes a count query.- Specified by:
executeCountQueryin interfaceQueryService- Parameters:
query- Count query- Returns:
- Count
- Throws:
AuthenticationException- authentication exceptionSystemException- system exception- See Also:
QueryService.executeCountQuery(com.saperion.rmi.SaQueryInfo)
-
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:
QueryService.executeQuery(com.saperion.rmi.SaQueryInfo)
-
getLastResult
public final ModelResult getLastResult()
- Specified by:
getLastResultin interfaceQueryService- Returns:
- The last query result that was sent to the view.
- See Also:
QueryService.getLastResult()
-
getResultAtIndex
public final ResultProperties getResultAtIndex(int index)
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:
QueryService.getResultAtIndex(int)
-
getResultForId
public ResultProperties getResultForId(DocumentId id) throws DocumentIdentificationException
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:
QueryService.getResultForId(com.saperion.ngc.model.document.DocumentId)
-
getResultPropertiesForRevision
public ResultProperties getResultPropertiesForRevision(DocumentId id)
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:
(com.saperion.ngc.model.document.DocumentId)
-
performClientSideSorting
public final ModelResult performClientSideSorting(java.util.Map<java.lang.String,SortDirection> columns, int page)
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:
QueryService.performClientSideSorting(java.util.Map, int)
-
performClientSideFiltering
public ModelResult performClientSideFiltering(RowFilterSettings settings)
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
public ModelResult getResultPage(int page, boolean withNewPaging)
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 java.util.Map<java.lang.String,com.saperion.intf.SaFieldDescription> getFieldDescriptions(java.lang.String ddcName) throws com.saperion.exception.SaSystemException, com.saperion.exception.SaAuthenticationExceptionReturns a map ofSaFieldDescriptions 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:
QueryService.getFieldDescriptions(java.lang.String)
-
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(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.- 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:
QueryService.searchFolderDocuments(java.lang.String, java.lang.String, com.saperion.rmi.SaQueryInfo)
-
getHitCount
public int getHitCount(com.saperion.rmi.SaQueryInfo info) throws SystemException, AuthenticationException, DatabaseExceptionReturns 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:
QueryService.getHitCount(com.saperion.rmi.SaQueryInfo)
-
clearLastResult
public void clearLastResult()
Description copied from interface:QueryServiceClears the result of the last query.- Specified by:
clearLastResultin interfaceQueryService
-
updateRow
public void updateRow(ResultProperties documentInfo) throws DocumentIdentificationException
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.
-
-