com.rocketsoftware.mvapi.connector
Interface MVConnector

All Known Implementing Classes:
MVSPConnector

public interface MVConnector

Defines the connector interface to an MVSP Server.


Method Summary
 java.lang.String call(java.lang.String name, java.util.List<java.lang.String> arguments)
          Calls a subroutine.
 java.lang.String call(java.lang.String name, java.lang.String data)
          Calls a subroutine.
 void clearSelect()
          Clears an active select list.
 void closeConnection()
          Closes a connection.
 void closeRoot(int index)
          Closes the index on the server.
 int count(java.lang.String stringToSearch, char charToCount)
          Counts character occurances in a string.
 int dCount(java.lang.String dArray, char delim)
          Counts number of substrings delimited by delim character.
 java.lang.String delete(java.lang.String dArray, int attrNum)
          Deletes an attribute from a dynamic array.
 java.lang.String delete(java.lang.String dArray, int attrNum, int valNum)
          Deletes a value from a dynamic array.
 java.lang.String delete(java.lang.String dArray, int attrNum, int valNum, int subValNum)
          Deletes a sub value from a dynamic array.
 void disableAccount(java.lang.String name)
          Disables an account for MVSP usage.
 void enableAccount(java.lang.String name)
          Enables an account for MVSP usage..
 void execute(java.lang.String command)
          Executes a command.
 void execute(java.lang.String command, java.lang.String data)
          Executes a command with stacked data.
 java.lang.String extract(java.lang.String dArray, int attrNum)
          Extracts an attribute from dynamic array.
 java.lang.String extract(java.lang.String dArray, int attrNum, int valNum)
          Extracts a value from the dynamic array.
 java.lang.String extract(java.lang.String dArray, int attrNum, int valNum, int subValNum)
          Extracts a subvalue from the dynamic array.
 java.lang.String field(java.lang.String dArray, java.lang.String delim, int pos)
          Extracts a substring from the dynamic array.
 boolean fileCacheRelease(java.lang.String path)
          Releases the associated file cache entry for the specified opened file on the MVSP server.
 java.lang.String fileDelete(java.lang.String path, java.lang.String itemId)
          Deletes an item from the file.
 java.lang.String fileRead(java.lang.String path, java.lang.String itemId)
          Reads an item from the file.
 java.lang.String fileReadNext()
          Gets the next item ID from the current fileSELECT list.
 java.lang.String fileReadU(java.lang.String path, java.lang.String itemId)
          Reads an item from the file, setting an item lock.
 java.lang.String fileReadV(java.lang.String path, java.lang.String itemId, int attribute)
          Reads an item's attribute from the file.
 java.lang.String fileReadVU(java.lang.String path, java.lang.String itemId, int attribute)
          Reads an item's attribute from the file, setting an item lock.
 java.lang.String fileRelease(java.lang.String path, java.lang.String itemId)
          Releases an item lock set by a prior fileReadU.
 boolean fileSelect(java.lang.String path)
          Selects the file specified by path for a subsequent fileReadNext
 java.lang.String fileWrite(java.lang.String path, java.lang.String itemId, java.lang.String itemBody)
          Writes an item to the file, releasing the update lock set by a previous fileReadU of the same item.
 java.lang.String fileWriteU(java.lang.String path, java.lang.String itemId, java.lang.String itemBody)
          Writes an item to the file, keeping update lock set by a previous fileReadU of the same item.
 java.lang.String fileWriteV(java.lang.String path, java.lang.String itemId, java.lang.String attributeValue, int attribute)
          Writes a value to an item's attribute.
 java.lang.String fileWriteVU(java.lang.String path, java.lang.String itemId, java.lang.String attributeValue, int attribute)
          Writes a value to an item's attribute, keeping update lock set by a previous fileReadU/fileReadVU of the same item.
 java.lang.Object getBaseConnector()
          Returns implementing connector object.
 java.lang.String getConnectionProperties()
          Gets the connection properties.
 java.lang.String getCurrentAccount()
          Returns the current logged to account.
 java.lang.String getCurrentAccountPwd()
          Returns the current logged to account password.
 boolean getEol()
          Checks for end of list, i.e., will READNEXT fail.
 java.lang.String getExecuteCapturing()
          Returns the captured result of an execute statement (execute cmd capturing result).
 java.lang.String getExecuteReturning()
          Returns the returning result of an execute statement (execute cmd returning rtn.code).
 int getFileStatusCode()
          Returns the result code of most recent file operation.
 java.lang.String getFileStatusMessage()
          Returns error message from the most recent file operation error.
 java.lang.String getHostName()
          Gets the network host name.
 int getPort()
          Gets the network port number.
 java.lang.String getQueryOptions()
          Get the query options.
 byte[] getResult()
          Returns buffer containing results of last read.
 java.lang.String getRuleModule()
          Gets the rulename you had set via setRuleName.
 java.lang.String getServerEnvironment()
          Returns the server enviornment setting (STD, EUR, etc.)
 java.lang.String getServerPlatform()
          Returns the server platform name (D3, mvBase, mvEnterprise, U2, etc).
 java.lang.String getServerPort()
          Returns a string representing the server connection such as the server's line number.
 java.lang.String getServerVersion()
          Returns the server version number.
 java.lang.String insert(java.lang.String dArray, int attrNum, int valNum, int subValNum, java.lang.String subValue)
          Inserts a sub value into a dynamic array.
 java.lang.String insert(java.lang.String dArray, int attrNum, int valNum, java.lang.String value)
          Inserts a value into a dynamic array.
 java.lang.String insert(java.lang.String dArray, int attrNum, java.lang.String value)
          Inserts an attribute into a dynamic array.
 boolean isAccountEnabled(java.lang.String name)
          Returns true if account has been enabled for MVSP usage.
 boolean isConnected()
          Checks if currently connected to the server.
 boolean isConnectionPoolingSupported()
          Checks if connections can be pooled.
 boolean isFileExistCmdSupported()
          Checks if the server supports the FILEEXISTS command.
 boolean isQueryKeywordsSupported()
          Checks if the server supports the queryKeywords parameter on the executeQuery method.
 java.lang.String key(int index, java.lang.String operator, java.lang.String key, java.lang.String itemId)
          Executes a key operation on the index.
 void logTo(java.lang.String account, java.lang.String password)
          Logs the connection to an account.
 java.lang.String mvCall(java.lang.String RuleParams)
          Executes the business rule set by setRuleName.
 java.lang.String MVSPClientVersion()
          Returns the MVSP client version.
 int next()
          Reads the next query row.
 boolean openConnection(java.lang.String hostName, int port, java.lang.String user, java.lang.String password)
          Opens a connection to an MV server.
 boolean openConnection(java.lang.String hostName, int port, java.lang.String user, java.lang.String password, boolean sslConnect, boolean LicEnterprise)
          Opens a connection to an MV server.
 boolean openConnection(java.lang.String hostName, int port, java.lang.String user, java.lang.String password, java.lang.String clientId)
          Opens a connection to an MV server.
 boolean openConnection(java.lang.String hostName, int port, java.lang.String user, java.lang.String password, java.lang.String clientId, boolean sslConnect, boolean LicEnterprise)
          Opens a connection to an MV server.
 boolean openConnection(java.lang.String hostName, int port, java.lang.String user, java.lang.String password, java.lang.String clientId, java.lang.String account)
          Opens a connection to an MV server.
 boolean openConnection(java.lang.String hostName, int port, java.lang.String user, java.lang.String password, java.lang.String clientId, java.lang.String account, boolean sslConnect, boolean LicEnterprise, java.lang.String clientConnectionOptions)
          Opens a connection to an MV server.
 boolean openConnection(java.lang.String hostName, int port, java.lang.String user, java.lang.String password, java.lang.String clientId, java.lang.String account, boolean sslConnect, MVConstants.LicenseType licenseType, java.lang.String clientConnectionOptions)
          Opens a connection to an MV server.
 MVResultSet query(java.lang.String query)
          Executes a query.
 java.lang.String readFromServer(boolean all, boolean isConnecting)
          Read from server socket
 java.lang.String replace(java.lang.String dArray, int attrNum, int valNum, int subValNum, java.lang.String subValue)
          Replaces a sub value in a dynamic array.
 java.lang.String replace(java.lang.String dArray, int attrNum, int valNum, java.lang.String value)
          Replaces a value in a dynamic array.
 java.lang.String replace(java.lang.String dArray, int attrNum, java.lang.String value)
          Replaces an attribute in a dynamic array.
 java.lang.String root(java.lang.String fileName, java.lang.String indexName)
          Executes a root operation on the supplied fileName and indexName.
 void setQueryOptions(java.lang.String options)
          Set the query options.
 void setRuleModule(java.lang.String rule)
          Sets the rule name for subsequent mvCall.
 void setSoTimeout(int milliseconds)
          Sets the socket timeout.
 java.lang.String swap(java.lang.String array, java.lang.String oldStr, java.lang.String newStr)
          Replaces every occurrence of oldStr with newStr in array.
 boolean transactionBegin()
          Begins a transaction in the database.
 boolean transactionCommit()
          Commits a transaction in the database.
 boolean transactionRollback()
          Rolls back a transaction in the database.
 boolean transactionStatus()
          Returns true if currently in a transaction.
 void writeToServer(java.lang.String data)
          Writes data to the server.
 

Method Detail

openConnection

boolean openConnection(java.lang.String hostName,
                       int port,
                       java.lang.String user,
                       java.lang.String password)
                       throws MVException
Opens a connection to an MV server.

Parameters:
hostName - server hostname
port - server port
user - user name
password - user password
Returns:
true if successful
Throws:
MVException
Since:
1.0

openConnection

boolean openConnection(java.lang.String hostName,
                       int port,
                       java.lang.String user,
                       java.lang.String password,
                       boolean sslConnect,
                       boolean LicEnterprise)
                       throws MVException
Opens a connection to an MV server.

Parameters:
hostName - server hostname
port - server port
user - user name
password - user password
sslConnect - use SSL connection
LicEnterprise - use Enterprise licensing
Returns:
true if successful
Throws:
MVException
Since:
1.0

openConnection

boolean openConnection(java.lang.String hostName,
                       int port,
                       java.lang.String user,
                       java.lang.String password,
                       java.lang.String clientId)
                       throws MVException
Opens a connection to an MV server.

Parameters:
hostName - server hostname
port - server port
user - user name
password - user password
clientId - clientId identifies client to server for any special handling.
Returns:
true if successful
Throws:
MVException
Since:
1.0

openConnection

boolean openConnection(java.lang.String hostName,
                       int port,
                       java.lang.String user,
                       java.lang.String password,
                       java.lang.String clientId,
                       boolean sslConnect,
                       boolean LicEnterprise)
                       throws MVException
Opens a connection to an MV server.

Parameters:
hostName - server hostname
port - server port
user - user name
password - user password
clientId - clientId identifies client to server for any special handling.
sslConnect - use SSL connection
LicEnterprise - use Enterprise licensing
Returns:
true if successful
Throws:
MVException
Since:
1.0

openConnection

boolean openConnection(java.lang.String hostName,
                       int port,
                       java.lang.String user,
                       java.lang.String password,
                       java.lang.String clientId,
                       java.lang.String account)
                       throws MVException
Opens a connection to an MV server.

Parameters:
hostName - server hostname
port - server port
user - user name
password - user password
clientId - clientId identifies client to server for any special handling.
account - account name to logon to on initial connection. (For U2 platform)
Returns:
true if successful
Throws:
MVException
Since:
1.0

openConnection

boolean openConnection(java.lang.String hostName,
                       int port,
                       java.lang.String user,
                       java.lang.String password,
                       java.lang.String clientId,
                       java.lang.String account,
                       boolean sslConnect,
                       boolean LicEnterprise,
                       java.lang.String clientConnectionOptions)
                       throws MVException
Opens a connection to an MV server.

Parameters:
hostName - server hostname
port - server port
user - user name
password - user password
clientId - clientId identifies client to server for any special handling.
account - account name to logon to on initial connection. (For U2 platform)
sslConnect - use SSL connection
LicEnterprise - use Enterprise licensing
Returns:
true if successful
Throws:
MVException
Since:
1.0

openConnection

boolean openConnection(java.lang.String hostName,
                       int port,
                       java.lang.String user,
                       java.lang.String password,
                       java.lang.String clientId,
                       java.lang.String account,
                       boolean sslConnect,
                       MVConstants.LicenseType licenseType,
                       java.lang.String clientConnectionOptions)
                       throws MVException
Opens a connection to an MV server.

Parameters:
hostName - server hostname
port - server port
user - user name
password - user password
clientId - clientId identifies client to server for any special handling
account - account name to logon to on initial connection. (For U2 platform)
sslConnect - use SSL connection
licenseType - license type (User, Enterprise, or Connection Pool licensing)
clientConnectionOptions - client connection options string
Returns:
true if successful
Throws:
MVException - if any errors occur

closeConnection

void closeConnection()
                     throws MVException
Closes a connection.

Throws:
MVException
Since:
1.0

logTo

void logTo(java.lang.String account,
           java.lang.String password)
           throws MVException
Logs the connection to an account.

Parameters:
account - account name
password - account password
Throws:
MVException
Since:
1.0

execute

void execute(java.lang.String command)
             throws MVException
Executes a command.

Parameters:
command - to execute
Throws:
MVException
Since:
1.0

execute

void execute(java.lang.String command,
             java.lang.String data)
             throws MVException
Executes a command with stacked data.

Parameters:
command - to execute
data - to stack to the command
Throws:
MVException
Since:
1.0

query

MVResultSet query(java.lang.String query)
                  throws MVException
Executes a query.

Parameters:
query - to execute
Returns:
MVResultSet query results
Throws:
MVException
Since:
1.0

isConnected

boolean isConnected()
Checks if currently connected to the server.

Returns:
true if connected
Since:
1.0

getHostName

java.lang.String getHostName()
Gets the network host name.

Returns:
host name
Since:
1.0

getPort

int getPort()
Gets the network port number.

Returns:
port number
Since:
1.0

getServerPort

java.lang.String getServerPort()
Returns a string representing the server connection such as the server's line number.

Returns:
string containing server connection information
Since:
1.0

getServerPlatform

java.lang.String getServerPlatform()
Returns the server platform name (D3, mvBase, mvEnterprise, U2, etc).

Returns:
string containing server platform
Since:
1.0

getServerEnvironment

java.lang.String getServerEnvironment()
Returns the server enviornment setting (STD, EUR, etc.)

Returns:
string containing server platform
Since:
1.0

getServerVersion

java.lang.String getServerVersion()
Returns the server version number.

Returns:
string containing server version number
Since:
1.0

getCurrentAccount

java.lang.String getCurrentAccount()
Returns the current logged to account.

Returns:
string containing current logged to account
Since:
1.0

getCurrentAccountPwd

java.lang.String getCurrentAccountPwd()
Returns the current logged to account password.

Returns:
string containing current logged to account password
Since:
1.0

getExecuteCapturing

java.lang.String getExecuteCapturing()
Returns the captured result of an execute statement (execute cmd capturing result).

Returns:
string containing the execute 'caputuring' data
Since:
1.0

getExecuteReturning

java.lang.String getExecuteReturning()
Returns the returning result of an execute statement (execute cmd returning rtn.code).

Returns:
string containing the execute 'returning' data
Since:
1.0

call

java.lang.String call(java.lang.String name,
                      java.lang.String data)
                      throws MVException
Calls a subroutine.

Parameters:
name - name of subroutine, may include fullpath if supported for example: (read.item or dev,bp, read.item)
data - string data to pass in
Returns:
returned results
Throws:
MVException
Since:
1.0

call

java.lang.String call(java.lang.String name,
                      java.util.List<java.lang.String> arguments)
                      throws MVException
Calls a subroutine.

Parameters:
name - name of subroutine, may include fullpath if supported for example: (read.item or dev,bp, read.item)
arguments - list of arguments to pass in
Returns:
returned results
Throws:
MVException
Since:
1.0

getQueryOptions

java.lang.String getQueryOptions()
Get the query options.

Returns:
options
Since:
1.0

root

java.lang.String root(java.lang.String fileName,
                      java.lang.String indexName)
                      throws MVException
Executes a root operation on the supplied fileName and indexName.

Parameters:
fileName -
indexName -
Returns:
string result of the root operation: attribute 1: 0 attribute 2: index number; up to 100 indexes may be open at any one time. if attribute 1 is not 0 an error has occured. In this case attribute 2 will have the error code.
Throws:
MVException - if any errors occur

key

java.lang.String key(int index,
                     java.lang.String operator,
                     java.lang.String key,
                     java.lang.String itemId)
                     throws MVException
Executes a key operation on the index.

Parameters:
index - index handle as returned from the root() method.
operator - index operation (e.g. C, N, P)
key - index key
itemId - index itemId
Returns:
string result of the key operation.
Throws:
MVException - if any errors occur

closeRoot

void closeRoot(int index)
               throws MVException
Closes the index on the server.

Parameters:
index - index handle as returned from the root() method.
Throws:
MVException - if any errors occur

setQueryOptions

void setQueryOptions(java.lang.String options)
Set the query options.

Parameters:
options -
Since:
1.0

setSoTimeout

void setSoTimeout(int milliseconds)
                  throws java.net.SocketException
Sets the socket timeout.

Parameters:
milliseconds - time to wait for a read operation to complete
Throws:
java.net.SocketException - raised if any socket errors occur

mvCall

java.lang.String mvCall(java.lang.String RuleParams)
                        throws MVException
Executes the business rule set by setRuleName.

Parameters:
RuleParams - x'fe' delimited list of parameters
Returns:
NetEvents array + char(24) + NetProperties array + char(254) + business rule output
Throws:
MVException - if a subroutine call error occurs

next

int next()
         throws MVException
Reads the next query row.

Throws:
MVException

getResult

byte[] getResult()
Returns buffer containing results of last read.

Returns:
byte array containing read results.

isAccountEnabled

boolean isAccountEnabled(java.lang.String name)
                         throws MVException
Returns true if account has been enabled for MVSP usage.

Parameters:
name - account name
Returns:
true if account is enabled.
Throws:
MVException

enableAccount

void enableAccount(java.lang.String name)
                   throws MVException
Enables an account for MVSP usage..

Parameters:
name - account name
Throws:
MVException - if any errors occur

disableAccount

void disableAccount(java.lang.String name)
                    throws MVException
Disables an account for MVSP usage.

Parameters:
name - account name
Throws:
MVException - if any errors occur

getConnectionProperties

java.lang.String getConnectionProperties()
Gets the connection properties.

Returns:
string containing connection properties.

setRuleModule

void setRuleModule(java.lang.String rule)
Sets the rule name for subsequent mvCall.

Parameters:
rule - (cataloged subroutine) name

getRuleModule

java.lang.String getRuleModule()
Gets the rulename you had set via setRuleName.

Returns:
rule name

clearSelect

void clearSelect()
                 throws MVException
Clears an active select list.

Throws:
MVException - if errors occur

extract

java.lang.String extract(java.lang.String dArray,
                         int attrNum)
Extracts an attribute from dynamic array.

Parameters:
dArray - Dynamic array
attrNum - - Attribute number (1-relative)
Returns:
the attrNumth attribute

extract

java.lang.String extract(java.lang.String dArray,
                         int attrNum,
                         int valNum)
Extracts a value from the dynamic array.

Parameters:
dArray - Dynamic array
attrNum - - Attribute number (1-relative)
valNum - - Value number (1-relative)
Returns:
valNumth value of the attrNumth attribute

extract

java.lang.String extract(java.lang.String dArray,
                         int attrNum,
                         int valNum,
                         int subValNum)
Extracts a subvalue from the dynamic array.

Parameters:
dArray - Dynamic array
attrNum - - Attribute number (1-relative)
valNum - - Value number (1-relative)
subValNum - - subvalue number (1-relative)
Returns:
subValNumthe subvalue of the valNumth value of the attrNumth attribute

field

java.lang.String field(java.lang.String dArray,
                       java.lang.String delim,
                       int pos)
Extracts a substring from the dynamic array.

Parameters:
dArray - Dynamic array
delim - - delimiter to use
pos - - occurrance number
Returns:
subValNumthe subvalue of the valNumth value of the attrNumth attribute

delete

java.lang.String delete(java.lang.String dArray,
                        int attrNum)
Deletes an attribute from a dynamic array.

Parameters:
dArray - Dynamic array
attrNum - 1-relative attribute number to delete
Returns:
dynamic array with the specified attribute deleted. e.g. delete("a^b^c",2) returns "a^c", where "^" is char(254).

delete

java.lang.String delete(java.lang.String dArray,
                        int attrNum,
                        int valNum)
Deletes a value from a dynamic array.

Parameters:
dArray - Dynamic array
attrNum - 1-relative index of the attribute containing the value
valNum - 1-relative index of the value to delete
Returns:
dynamic array with the specified value in the specified attribute deleted. e.g. delete("a^b]1^c",2,1) returns "a^1^c", where "^" is char(254) and "]" is char(253).

delete

java.lang.String delete(java.lang.String dArray,
                        int attrNum,
                        int valNum,
                        int subValNum)
Deletes a sub value from a dynamic array.

Parameters:
dArray - Dynamic array
attrNum - 1-relative Index of the attribute containing the value containing the sub value to delete
valNum - 1-relative Index of the value containing the sub value to delete
subValNum - 1-relative Index of the sub value to delete
Returns:
dynamic array with the specified sub value in the specified value in the specified attribute deleted. e.g. delete("a^b]1\2\3^c",2,2,1) returns "a^b]2\3^c", where "^" is char(254), "]" is char(253), and "\" is char(252).

insert

java.lang.String insert(java.lang.String dArray,
                        int attrNum,
                        int valNum,
                        int subValNum,
                        java.lang.String subValue)
Inserts a sub value into a dynamic array.

Parameters:
dArray - Dynamic array
attrNum - 1-relative Index of the attribute containing the value containing the sub value to insert
valNum - 1-relative Index of the value containing the sub value to insert
subValNum - 1-relative Index of the sub value to insert
Returns:
dynamic array with the specified sub value in the specified value in the specified attribute inserted.

insert

java.lang.String insert(java.lang.String dArray,
                        int attrNum,
                        int valNum,
                        java.lang.String value)
Inserts a value into a dynamic array.

Parameters:
dArray - Dynamic array
attrNum - 1-relative index of the attribute containing the value containing the subvalue to insert
valNum - 1-relative index of the value containg the subvalue to insert
Returns:
dynamic array with the specified subvalue in the specified value in the specified attribute inserted.

insert

java.lang.String insert(java.lang.String dArray,
                        int attrNum,
                        java.lang.String value)
Inserts an attribute into a dynamic array.

Parameters:
dArray - Dynamic array
attrNum - 1-relative index of the attribute containing the value containing the subvalue to insert
Returns:
dynamic array with the specified attribute in the specified value in the specified attribute inserted.

replace

java.lang.String replace(java.lang.String dArray,
                         int attrNum,
                         int valNum,
                         int subValNum,
                         java.lang.String subValue)
Replaces a sub value in a dynamic array.

Parameters:
dArray - Dynamic array
attrNum - 1-relative index of the attribute containing the value containing the sub value to replace
valNum - 1-relative index of the value containing the sub value to replace
subValNum - 1-relative index of the sub value to replace
Returns:
dynamic array with the specified sub value in the specified value in the specified attribute replaced.

replace

java.lang.String replace(java.lang.String dArray,
                         int attrNum,
                         int valNum,
                         java.lang.String value)
Replaces a value in a dynamic array.

Parameters:
dArray - Dynamic array
attrNum - 1-relative index of the attribute containing the value containing the subvalue to replace
valNum - 1-relative index of the value containg the subvalue to replace
Returns:
dynamic array with the specified subvalue in the specified value in the specified attribute replaced.

replace

java.lang.String replace(java.lang.String dArray,
                         int attrNum,
                         java.lang.String value)
Replaces an attribute in a dynamic array.

Parameters:
dArray - Dynamic array
attrNum - 1-relative index of the attribute containing the value containing the subvalue to replace
Returns:
dynamic array with the specified attribute in the specified value in the specified attribute replaced.

count

int count(java.lang.String stringToSearch,
          char charToCount)
Counts character occurances in a string.

Parameters:
stringToSearch -
charToCount -
Returns:
number of charToCount characters in stringToSearch

dCount

int dCount(java.lang.String dArray,
           char delim)
Counts number of substrings delimited by delim character.

Parameters:
dArray - dynamic array to search
delim - delimiter to count
Returns:
Number of delimiters plus one, unless dArray is null, in which case zero is returned

swap

java.lang.String swap(java.lang.String array,
                      java.lang.String oldStr,
                      java.lang.String newStr)
Replaces every occurrence of oldStr with newStr in array.

Parameters:
array - - a string containing zero or more occurrences of oldStr.
oldStr - - the string to search for in array.
newStr - - the string with which to replace every occurrence of oldStr in array.
Returns:
- a new string containing newStr where any oldStr used to be.

getFileStatusCode

int getFileStatusCode()
Returns the result code of most recent file operation.

Returns:
Result code of most recent file operation

getEol

boolean getEol()
Checks for end of list, i.e., will READNEXT fail.

Returns:
true if end of list

getFileStatusMessage

java.lang.String getFileStatusMessage()
Returns error message from the most recent file operation error. If getFileStatusCode returns non-zero, call this to get a textual error message.

Returns:
Error message text of the most recent file operation failure

fileCacheRelease

boolean fileCacheRelease(java.lang.String path)
Releases the associated file cache entry for the specified opened file on the MVSP server.

Parameters:
path - [dict][accountName,]fileName[,sectionName]
Returns:
true if successful

fileRead

java.lang.String fileRead(java.lang.String path,
                          java.lang.String itemId)
Reads an item from the file.

Parameters:
path - [dict][accountName,]fileName[,sectionName]
itemId -
Returns:
Item body

fileReadU

java.lang.String fileReadU(java.lang.String path,
                           java.lang.String itemId)
Reads an item from the file, setting an item lock.

Parameters:
path - [dict][accountName,]fileName[,sectionName]
itemId -
Returns:
Item body if lock successful, otherwise a null string, and getFileStatusCode returns -1.

fileReadV

java.lang.String fileReadV(java.lang.String path,
                           java.lang.String itemId,
                           int attribute)
                           throws MVException
Reads an item's attribute from the file.

Parameters:
path - [dict][accountName,]fileName[,sectionName]
itemId - item id
attribute - The attribute number to read
Returns:
attribute's value
Throws:
MVException - if any errors occur

fileReadVU

java.lang.String fileReadVU(java.lang.String path,
                            java.lang.String itemId,
                            int attribute)
                            throws MVException
Reads an item's attribute from the file, setting an item lock.

Parameters:
path - [dict][accountName,]fileName[,sectionName]
itemId - item id
attribute - The attribute number to read
Returns:
attribute's value
Throws:
MVException - if any errors occur

fileDelete

java.lang.String fileDelete(java.lang.String path,
                            java.lang.String itemId)
Deletes an item from the file.

Parameters:
path - [dict][accountName,]fileName[,sectionName]
itemId -
Returns:
null string

fileRelease

java.lang.String fileRelease(java.lang.String path,
                             java.lang.String itemId)
Releases an item lock set by a prior fileReadU.

Parameters:
path - [dict][accountName,]fileName[,sectionName]
itemId -
Returns:
null string

fileWrite

java.lang.String fileWrite(java.lang.String path,
                           java.lang.String itemId,
                           java.lang.String itemBody)
Writes an item to the file, releasing the update lock set by a previous fileReadU of the same item.

Parameters:
path - [dict][accountName,]fileName[,sectionName]
itemId -
itemBody -
Returns:
null string

fileWriteU

java.lang.String fileWriteU(java.lang.String path,
                            java.lang.String itemId,
                            java.lang.String itemBody)
Writes an item to the file, keeping update lock set by a previous fileReadU of the same item.

Parameters:
path - [dict][accountName,]fileName[,sectionName]
itemId - item id
itemBody -
Returns:
null string

fileWriteV

java.lang.String fileWriteV(java.lang.String path,
                            java.lang.String itemId,
                            java.lang.String attributeValue,
                            int attribute)
                            throws MVException
Writes a value to an item's attribute.

Parameters:
path - [dict][accountName,]fileName[,sectionName]
itemId - item id
attributeValue - The value to write
attribute - The attribute number to read
Returns:
null string
Throws:
MVException - if any errors occur

fileWriteVU

java.lang.String fileWriteVU(java.lang.String path,
                             java.lang.String itemId,
                             java.lang.String attributeValue,
                             int attribute)
                             throws MVException
Writes a value to an item's attribute, keeping update lock set by a previous fileReadU/fileReadVU of the same item.

Parameters:
path - [dict][accountName,]fileName[,sectionName]
itemId - item id
attributeValue - The value to write
attribute - The attribute number to read
Returns:
null string
Throws:
MVException - if any errors occur

fileSelect

boolean fileSelect(java.lang.String path)
Selects the file specified by path for a subsequent fileReadNext

Parameters:
path - [dict][accountName,]fileName[,sectionName]
Returns:
true if success, otherwise false, in which case you need to call getFileStatusMessage() to see what went wrong.

fileReadNext

java.lang.String fileReadNext()
Gets the next item ID from the current fileSELECT list.

Returns:
item ID or null string if end of list. Since null item-ids are permissible, call fileOpOK(), which will return 1 if End of List.

isFileExistCmdSupported

boolean isFileExistCmdSupported()
Checks if the server supports the FILEEXISTS command.

Returns:
true if command is supported

isQueryKeywordsSupported

boolean isQueryKeywordsSupported()
Checks if the server supports the queryKeywords parameter on the executeQuery method.

Returns:
true if command is supported

MVSPClientVersion

java.lang.String MVSPClientVersion()
Returns the MVSP client version.

Returns:
MVSP client version

transactionBegin

boolean transactionBegin()
                         throws MVException
Begins a transaction in the database.

Returns:
true if successful
Throws:
MVException - raised if any errors encountered.

transactionCommit

boolean transactionCommit()
                          throws MVException
Commits a transaction in the database.

Returns:
true if successful
Throws:
MVException - raised if any errors encountered.

transactionRollback

boolean transactionRollback()
                            throws MVException
Rolls back a transaction in the database.

Returns:
true if successful
Throws:
MVException - raised if any errors encountered.

transactionStatus

boolean transactionStatus()
Returns true if currently in a transaction.

Returns:
true if in a transaction.

getBaseConnector

java.lang.Object getBaseConnector()
Returns implementing connector object.

Returns:
object represents the base connector.

readFromServer

java.lang.String readFromServer(boolean all,
                                boolean isConnecting)
                                throws MVException
Read from server socket

Parameters:
all - read all available bytes. false means read only to end of current message
isConnecting - true if called during logon process
Returns:
data read from server
Throws:
MVException - raised if any errors encountered

writeToServer

void writeToServer(java.lang.String data)
                   throws java.io.IOException
Writes data to the server.

Parameters:
data - to write
Throws:
java.io.IOException

isConnectionPoolingSupported

boolean isConnectionPoolingSupported()
Checks if connections can be pooled.

Returns:
return true if pooling supported