Class TdbCclCommand
- All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink
-
Constructor Summary
ConstructorsConstructorDescriptionTdbCclCommand
(TdbSession session) Constructor, creates a blank instance ready for command execution -
Method Summary
Modifier and TypeMethodDescriptionvoid
Set a checkpoint in the execution sequence to which the session can later be rolled-back.void
execDirect
(String command) Execute a CCL command.void
Execute a query in XPath syntax.If the command executed resulted in one of the kernel buffers being updated, this method will return the kernel window structure appropriate.Retrieve the type of command executed, at a very broad level.Retrieve the currently open database nameReturns the definition string used for the currently defined thesaurus, or an empty string if no thesaurus is defined.Returns the name of the currently defined thesaurus, or an empty string if no thesaurus is defined.Returns a "did-you-mean" suggestion for the command just executed.boolean
For commands that may result in more than one search set, indicates if all resulting sets are returned as TdbHistoryDetail instances instead of just the latest one.Retrieve the parsed version of the command submittedRetrieve the instance of TdbTermList that is being used to handle the results of non-hierarchical Display commandsint
Get timeout for on-demand term lists generated by future DISPLAY commands..Retrieve the instance of TdbTermTree that is being used to handle the results of hierarchical (i.e. thesaurus) Display commandsboolean
Returns true if term lists created via this TdbCclCommand instance have values that are fetched on demand and are possible to use concurrently.If the command executed resulted in one or more history updates, this method will return an Iterator over a collection of detailed information, one entry for each history update.void
mapKernelWindow
(TdbKernelWindow window) Maps a kernel window buffer to a local window structure, so that results generated by a CCL command are intercepted by the appropriate class instance.void
Rollback the query session to a previously established check point Invoking this method causes network I/O.void
setHistoryDelta
(boolean enable) For commands that may result in more than one search set, request that all resulting sets are returned as TdbHistoryDetail instances instead of just the latest one.void
setTermList
(TdbTermList terms) Establish the instance of TdbTermList that should be used to handle the results of non-hierarchical Display commandsvoid
setTermListTimeout
(int seconds) Set timeout for on-demand term lists generated by future DISPLAY commands.void
setTermTree
(TdbTermTree tree) Establish the instance of TdbTermTree that should be used to handle the results of hierarchical (i.e. thesaurus) Display commandsvoid
setUseOnDemandTermLists
(boolean enable) Enable or disable the use of the on-demand term list feature.Methods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages
Methods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject
cancel, getSession, isCancelable, setCancelable
-
Constructor Details
-
TdbCclCommand
Constructor, creates a blank instance ready for command execution- Parameters:
session
- Active session- Throws:
TdbException
-
-
Method Details
-
getCommandType
Retrieve the type of command executed, at a very broad level. The return code from this method is one of the manifest constants exposed by this class, e.g. CommandTypeHistory, etc. From this, the calling application can determine what further methods are appropriate to call in response to the execution of the command.- Returns:
- The type of command executed
-
getDidYouMean
Returns a "did-you-mean" suggestion for the command just executed. This is an alternative CCL command that will yield a greater amount of hits. Only the FUZZ command can result in a did-you-mean suggestion, and requires TRIPsystem v6.2 or later in order to do so.- Returns:
- An alternative CCL command or an empty string.
-
getCurrentThesaurusName
Returns the name of the currently defined thesaurus, or an empty string if no thesaurus is defined.At least one CCL command that has caused the thesaurus definition to change or generated a search set must have been issued using this TdbCclCommand instance before thesaurus information is available.
This method requires TRIPsystem 8.0-2 or later.
-
getCurrentThesaurusDef
Returns the definition string used for the currently defined thesaurus, or an empty string if no thesaurus is defined.At least one CCL command that has caused the thesaurus definition to change or generated a search set must have been issued using this TdbCclCommand instance before thesaurus information is available.
This method requires TRIPsystem 8.0-2 or later.
-
getUseOnDemandTermLists
public boolean getUseOnDemandTermLists()Returns true if term lists created via this TdbCclCommand instance have values that are fetched on demand and are possible to use concurrently.- Returns:
- True if on-demand term lists are used.
- See Also:
-
setUseOnDemandTermLists
Enable or disable the use of the on-demand term list feature.- Parameters:
enable
- True to use on-demand term lists- Throws:
TdbException
- If on-demand term lists cannot be enabled- See Also:
-
setTermListTimeout
public void setTermListTimeout(int seconds) Set timeout for on-demand term lists generated by future DISPLAY commands.On-demand term lists requires resources on the server to keep alive. By default, they will time out in 120 seconds. After an on-demand term list has timed out, terms from it will no longer be possible to retrieve by the application without executing the DISPLAY order again.
Although it isn't always a good practise to do so, the timeout can be disabled by setting this value to zero.
- Parameters:
seconds
- Timeout to set- See Also:
-
getTermListTimeout
public int getTermListTimeout()Get timeout for on-demand term lists generated by future DISPLAY commands..On-demand term lists requires resources on the server to keep alive. By default, they will time out in 120 seconds. After an on-demand term list has timed out, terms from it will no longer be possible to retrieve by the application without executing the DISPLAY order again.
- Returns:
- Timeout in seconds, or zero if timeout has been disabled.
-
historyUpdates
If the command executed resulted in one or more history updates, this method will return an Iterator over a collection of detailed information, one entry for each history update.- Returns:
- Collection of history updates
-
getAffectedWindow
If the command executed resulted in one of the kernel buffers being updated, this method will return the kernel window structure appropriate. If not, the last updated kernel window will be returned (or null if none such exists)- Returns:
- The most recently affected output window
-
getCurrentBase
Retrieve the currently open database name- Returns:
- Most recently opened database
-
getParsedCcl
Retrieve the parsed version of the command submitted- Returns:
- The parsed version of the most recently submitted command; note that this may or may not be legal, as TRIPxpi will make an attempt to "reverse engineer" commands that have no specific parsed form
-
getTermList
Retrieve the instance of TdbTermList that is being used to handle the results of non-hierarchical Display commands- Returns:
- Term list handler
-
setTermList
Establish the instance of TdbTermList that should be used to handle the results of non-hierarchical Display commands- Parameters:
terms
- Term list handler
-
getTermTree
Retrieve the instance of TdbTermTree that is being used to handle the results of hierarchical (i.e. thesaurus) Display commands- Returns:
- Term tree handler
-
setTermTree
Establish the instance of TdbTermTree that should be used to handle the results of hierarchical (i.e. thesaurus) Display commands- Parameters:
tree
- Term tree handler
-
setHistoryDelta
public void setHistoryDelta(boolean enable) For commands that may result in more than one search set, request that all resulting sets are returned as TdbHistoryDetail instances instead of just the latest one.Requires TRIPsystem 8.2-3 or later
- Parameters:
enable
- Enable or disable retrieval of search history deltas.- Since:
- 8.2-2
-
getHistoryDelta
public boolean getHistoryDelta()For commands that may result in more than one search set, indicates if all resulting sets are returned as TdbHistoryDetail instances instead of just the latest one.Requires TRIPsystem 8.2-3 or later
- Returns:
- True if history deltas are to be returned and false otherwise.
- Since:
- 8.2-2
-
checkPoint
Set a checkpoint in the execution sequence to which the session can later be rolled-back. Invoking this method causes network I/O.- Throws:
TdbException
-
rollbackToCheckPoint
Rollback the query session to a previously established check point Invoking this method causes network I/O.- Throws:
TdbException
-
mapKernelWindow
Maps a kernel window buffer to a local window structure, so that results generated by a CCL command are intercepted by the appropriate class instance. Calling applications can maintain a number of kernel window structures and map them at any time, as long as they're mapped before executing a CCL command that affects the window type in question. Only one window of a given type can be mapped at any one time. Invoking this method causes network I/O.- Parameters:
window
- A valid TdbKernelWindow reference- Throws:
TdbException
-
execDirect
Execute a CCL command. Invoking this method causes network I/O.- Parameters:
command
- The command to be executed- Throws:
TdbException
-
execXPath
Execute a query in XPath syntax. Requires that the current database is an XML database. Please refer to the TRIPxml documentation for information on valid XPath syntax for TRIP.Successful use of this method requires that the currently open database is an XML database and that the server to which the current session is connected runs TRIPsystem 6.2-7 or later and TRIPxml 3.0 or later.
Invoking this method causes network I/O.
- Parameters:
xpathStatement
- The XPath statement to be executed as a query.- Throws:
TdbException
-