Package com.saperion.connector.rmi
Class AbstractQueryRMIClientCommand
java.lang.Object
com.saperion.connector.rmi.AbstractRMIClientCommand
com.saperion.connector.rmi.AbstractFolderRMIClientCommand
com.saperion.connector.rmi.AbstractDocRMIClientCommand
com.saperion.connector.rmi.AbstractQueryRMIClientCommand
- All Implemented Interfaces:
SaRMIClientCommand
- Direct Known Subclasses:
AbstractWfRMIClientCommand
Class representing the query operations of the backend.
-
Field Summary
Fields inherited from class com.saperion.connector.rmi.AbstractRMIClientCommand
APPEND_CONTENT, appl, credentials, LOGGER, props, session, sessionInfo, sysConnector, writeBufferSize
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
finishSQLTransaction
(boolean commit, String ddcName) Finish SQL transaction.getFulltext
(String ddcName, String sysRowId, String hdoc, String fieldName, long length) Reads the fulltext information for the given document with the given SYSROWID in the given DDC.getHDocForSysRowId
(String sysRowId, String ddcName) Searchs the HDOC for the given SysRowId.getIdsFromQuery
(String query) Executes a HQL query and returns the results as a string list.getStringQueryResult
(SaQueryInfo hqlQuery) Executes a given HQL string and returns the results as list.getVersionList
(String ddcName, String sysrowID) Reads the versionlist for the given document.readDocumentMetadata
(String sysRowId, String ddcName, String[] fields) Reads the meta data of the document with the given ID.void
startSQLTransaction
(String ddcName) Start SQL transaction.Methods inherited from class com.saperion.connector.rmi.AbstractDocRMIClientCommand
cacheDocument, checkoutDocument, checkoutDocument, checkSapUrl, clearContent, closeDocument, createDocument, createExternalStorageFolderMapping, createLink, deleteDocument, deleteExternalStorageFolderMapping, discardDocument, dsicardCheckout, finishTransaction, getACLNames, getACLRights, getAcls, getAllACLs, getAnnotations, getExternalStorageFoldersForUpload, getExternalStorageFoldersForUpload, getExternalStorageMapping, getInvolvedUsers, getLockInfo, getLocks, getLocks, getNodeAccessData, getThumbnail, lockNode, logClientEvent, readDocumentFirst, readDocumentFirst, readDocumentNext, readVersionMetadata, readVersionMetadata, releaseDocument, removeElement, removeElement, restoreVersion, saveDocument, saveDocument, setACLName, setAnnotations, setElementMark, setVariables, startTransaction, storeDocument, storeDocument, unlockNode, updateExternalStorageUploadStatus, writeContent, writeContent, writeContent, writeContent
Methods inherited from class com.saperion.connector.rmi.AbstractFolderRMIClientCommand
addToFolder, copyFolder, createFolder, deleteFolder, getDocumentFolderCount, getDocumentFolders, getFolderChildren, getFolderClass, getFolderFromPath, getFolderInfo, getFolderParent, getFolderRights, getFolderUpdateInfo, moveFolder, moveToFolder, removeFromFolder, searchFolderClass, searchFolderDocuments, setFolderAcl, updateFolder
Methods inherited from class com.saperion.connector.rmi.AbstractRMIClientCommand
getRemoteCommand, init, reLogon, reLogonAfterConnectionFailure
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.saperion.connector.rmi.SaRMIClientCommand
addComment, addHistory, changePassword, closeSession, deleteSetting, executeCommand, getArchivedSize, getAuthorizedUsers, getBoxCount, getBoxDefinitions, getCommandInfos, getCommandInfos, getCommentInfos, getCommitMode, getCompleteHistoryInfos, getCurrentUserRole, getDDC, getDeleteMode, getEventsEnabled, getFeatures, getFieldDescriptions, getFieldDescriptions, getFullTextFields, getHistoryInfos, getLicenseCount, getMandant, getMember, getMembers, getOutOfOffice, getParentTask, getRealDBName, getRMIVersion, getServerInfos, getSession, getSetting, getSubstitute, getSystemConnector, getSystemFiles, getSystemInfo, getSystemSetting, getTask, getTaskAuditList, getTaskList, getToken, getUserIdsForQuery, getUsers, getUserSetting, getWorkflowDefinitions, invoke, isAlive, isRevisionEnabled, listActiveSessions, loadDDCNames, loadFolderDDCNames, loadSettings, loadSystemFile, loadWorkflowDDCName, logoff, logon, logon, logon, newInvoke, resolveLatestHdoc, searchSettings, sendBarcode, setEventsEnabled, setLocale, setOutOfOffice, setSetting, setSubstitute, setUsedLicense, setUserSetting, storeSystemFile
-
Constructor Details
-
AbstractQueryRMIClientCommand
public AbstractQueryRMIClientCommand()
-
-
Method Details
-
getIdsFromQuery
public List<String> getIdsFromQuery(String query) throws SaSystemException, SaAuthenticationException Executes a HQL query and returns the results as a string list. Currently are only two queries in focus:
- search for hDocs
- search for sysRowIds
- Parameters:
query
- HQL query- Returns:
- String result list
- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- SaAuthenticationException- See Also:
-
getStringQueryResult
public List<SaDocumentInfo> getStringQueryResult(SaQueryInfo hqlQuery) throws SaSystemException, SaAuthenticationException, SaDBException Executes a given HQL string and returns the results as list.- Parameters:
hqlQuery
- HQL query info- Returns:
- Result list
- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- SaAuthenticationExceptionSaDBException
- query execution exception- See Also:
-
readDocumentMetadata
public SaPropertyValue[] readDocumentMetadata(String sysRowId, String ddcName, String[] fields) throws SaSystemException, SaAuthenticationException, SaGetNodeException Reads the meta data of the document with the given ID.- Parameters:
sysRowId
- The ID of the document (SYSROWID)ddcName
- The name of the database definitionfields
- Field names to be read. If empty or null, all fields will be read.- Returns:
- The Meta data of the document represented as an array of
SaPropertyValue
instances. - Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException- See Also:
-
getFulltext
public String getFulltext(String ddcName, String sysRowId, String hdoc, String fieldName, long length) throws SaSystemException, SaAuthenticationException Reads the fulltext information for the given document with the given SYSROWID in the given DDC.- Parameters:
ddcName
- DDC name of the documentsysRowId
- SYSROWID of the document. Can be null if hdoc is set. If both hdoc and sysRowId are set, hdoc will be used.hdoc
- HDOC of the document. Can be null if sysRowId is set. If both hdoc and sysRowId are set, hdoc will be used.fieldName
- name of the fulltext field to retrieve content from. If not set, the first fulltext field of the DDC will be usedlength
- maximum length of content to retrieve. If -1, the complete content will be returned.- Returns:
- Content of the fulltext for this document
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationException- See Also:
-
getVersionList
public List<String> getVersionList(String ddcName, String sysrowID) throws SaSystemException, SaAuthenticationException Reads the versionlist for the given document.- Parameters:
ddcName
- DDC namesysrowID
- SYSROWID- Returns:
- List of HDOC's
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException- See Also:
-
getHDocForSysRowId
public String getHDocForSysRowId(String sysRowId, String ddcName) throws SaSystemException, SaAuthenticationException, SaDDCException Searchs the HDOC for the given SysRowId.- Parameters:
sysRowId
- SysRowIdddcName
- DDC name- Returns:
- Resultset for HDOC's
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCException- See Also:
-
startSQLTransaction
Start SQL transaction.- Parameters:
ddcName
- the name of the ddc- Throws:
SaSystemException
- Error on the saperion system- See Also:
-
finishSQLTransaction
Finish SQL transaction.- Parameters:
commit
- True, if commit, else rollbackddcName
- the name of the ddc- Throws:
SaSystemException
- Error on the saperion system- See Also:
-