Like any kind of bookmark metaphor this allows the creation of an object represent an SQL command or series of
commands. A bookmark can also represent a prepared statement with well formed data objects parameterized and
generated on the fly.
author: Mark A. Kobold <mkobold at isqlviewer dot com> version: 1.0
BOOKMARK_FLAVOR Standard data-transfer flavor for DnD operations.
Constructor Summary
public
Bookmark() Creates a new bookmark as child to the given folder.
Method Summary
public boolean
add(BindVariable parameter) Adds a bookmark parameter component to this bookmark.
When a bookmark represents a prepared statement, the bind variables for that statement are defined via the
bookmark parameter data object.
A prepared statement will only be attempted if and only if there are bookmark parameters defined within the
bookmark.
Parameters: parameter - to add to internal list of parameters.
public void
clearParameters() Removes all bookmark parameters from this bookmark.
Creates a new bookmark as child to the given folder.
Creating a bookmark will implictly add itself to the parentFolder given.
Parameters: parentFolder - that will contain this new bookmark instance. throws: NullPointerException - if the parentFolder null.
Adds a bookmark parameter component to this bookmark.
When a bookmark represents a prepared statement, the bind variables for that statement are defined via the
bookmark parameter data object.
A prepared statement will only be attempted if and only if there are bookmark parameters defined within the
bookmark.
Parameters: parameter - to add to internal list of parameters. true if the bookmark parameter was successfully added to this bookmark.
Gets the SQL command or commands contained in this bookmark.
Multiplie SQL commands can be combined within a bookarm using non-quoted semi-colon ';' to seperate the
statements.
the SQL command or commands of this bookmark.
Sets the SQL command or commands for this bookmark.
Parameters: commandText - command that will be this bookmark.
setCreationTime
public void setCreationTime(Date creationTime)(Code)
Sets the creation time of this bookmark.
Typically this method will only be called when the bookmark is restored from local disk. Explicitly calling this
method otherwise will cause this value to essentially be invaild since it will not be true.
Parameters: creationTime - in milliseconds of the date this bookmark was created.
setLastAccess
public void setLastAccess(Date lastUsedTime)(Code)
Sets the last time this bookmark was executed against a JDBC connection.
Parameters: lastAccess - in milliseconds when this bookmark was last executed.
Sets the number of times this bookmark has been executed.
If a negative number is used, then zero will be inferred as the inteded use count.
Parameters: useCount - new number of times this bookmark has been executed.