com.intersystems.jdbc

## Class IRIS

- java.lang.Object
- - com.intersystems.jdbc.IRIS

    public class IRIS
    extends Object

`IRIS` provides various methods that can be used to access the IRIS Global Module. Basic operations such as GET, SET, KILL etc. are supported. There are also methods to execute class methods and routines. Any method will throw a Runtime exception on encountering any kind of error.

### Field Summary

Fields
`String` `xepGlobalName`
`int` `xepIndexOpt`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`BigDecimal` `classMethodBigDecimal(String className, String methodName, Object... args)` Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `BigDecimal`.
`Boolean` `classMethodBoolean(String className, String methodName, Object... args)` Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `Boolean`.
`byte[]` `classMethodBytes(String className, String methodName, Object... args)` Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `byte[]`.
`Double` `classMethodDouble(String className, String methodName, Object... args)` Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `Double`.
`IRISList` `classMethodIRISList(String className, String methodName, Object... args)` Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `IRISList`.
`Long` `classMethodLong(String className, String methodName, Object... args)` Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `Long`.
`Object` `classMethodObject(String className, String methodName, Object... args)` Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `Object`.

`void`

`classMethodStatusCode(String className, String methodName, Object... args)`
Calls an IRIS ObjectScript class method, passing 0 or more arguments and if the method's returning status code indicates an error, then Exception is thrown, otherwise this method returns void Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`.

`String` `classMethodString(String className, String methodName, Object... args)` Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `String`.
`void` `classMethodVoid(String className, String methodName, Object... args)` Calls an IRIS ObjectScript class method, passing 0 or more arguments.
`void` `close()`
`static IRIS` `createIRIS(com.intersystems.jdbc.IRISConnection conn)`
`BigDecimal` `functionBigDecimal(String functionName, String routineName, Object... args)` Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `BigDecimal`.
`Boolean` `functionBoolean(String functionName, String routineName, Object... args)` Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `Boolean`.
`byte[]` `functionBytes(String functionName, String routineName, Object... args)` Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `byte[]`.
`Double` `functionDouble(String functionName, String routineName, Object... args)` Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `Double`.
`IRISList` `functionIRISList(String functionName, String routineName, Object... args)` Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `IRISList`.
`Long` `functionLong(String functionName, String routineName, Object... args)` Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `Long`.
`Object` `functionObject(String functionName, String routineName, Object... args)` Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `Object`.
`String` `functionString(String functionName, String routineName, Object... args)` Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `String`.
`static String` `getAPIVersion()` Returns the API version string.
`BigDecimal` `getBigDecimal(String globalName, Object... subscripts)` Gets the value of the global as a BigDecimal.
`Boolean` `getBoolean(String globalName, Object... subscripts)` Gets the value of the global as a Boolean.
`byte[]` `getBytes(String globalName, Object... subscripts)` Gets the value of the global as a byte[].
`Date` `getDate(String globalName, Object... subscripts)` Gets the value of the global as a java.sql.Date.
`Double` `getDouble(String globalName, Object... subscripts)` Gets the value of the global as a Double.
`Float` `getFloat(String globalName, Object... subscripts)` Gets the value of the global as a Float.
`InputStream` `getInputStream(String globalName, Object... subscripts)` Gets the value of the global as a InputStream.
`Integer` `getInteger(String globalName, Object... subscripts)` Gets the value of the global as a Integer.
`IRISIterator` `getIRISIterator(int prefetchSizeHint, String globalName, Object... subscripts)` Allows iterating over a global in the $ORDER sense by returning an iterator that can be used to extract subscripts and global node values.
`IRISIterator` `getIRISIterator(String globalName, Object... subscripts)` Allows iterating over a global in the $ORDER sense by returning an iterator that can be used to extract subscripts and global node values.
`IRISList` `getIRISList(String globalName, Object... subscripts)` Gets the value of the global as an instance of IRISList.
`Long` `getLong(String globalName, Object... subscripts)` Gets the value of the global as a Long.
`List<com.intersystems.jdbc.ListReader>` `getNodes(String globalName, Object... subscripts)` Note: This method is for internal use only.
`Object` `getObject(String globalName, Object... subscripts)` Gets the value of the global as an Object.
`static String` `getProductVersion()` Returns the product version.
`Reader` `getReader(String globalName, Object... subscripts)` Gets the value of the global as a Reader.
`String` `getServerVersion()` Returns the server version string for the current connection.
`Short` `getShort(String globalName, Object... subscripts)` Gets the value of the global as a Short.
`String` `getString(String globalName, Object... subscripts)` Gets the value of the global as a String.
`Time` `getTime(String globalName, Object... subscripts)` Gets the value of the global as a java.sql.Time.
`Timestamp` `getTimestamp(String globalName, Object... subscripts)` Gets the value of the global as a java.sql.Timestamp.
`Integer` `getTLevel()` Get the level of the current nested IRIS transaction.
`long` `increment(Integer value, String globalName, Object... subscripts)` Increments the specified global with the passed value.
`int` `isDefined(String globalName, Object... subscripts)` Checks if a a global contains data ($DATA).
`void` `kill(String globalName, Object... subscripts)` Kills the global node including any descendants.
`boolean` `lock(String lockMode, Integer timeout, String globalName, Object... subscripts)` Lock the global, returns true on success.
`Object` `nextSubscript(Boolean reverse, String globalName, Object... subscripts)` Get the next subscript in global at a given subscript as an object, executing forward $ORDER function if reverse is false or backward $ORDER function if reverse is true.
`void` `procedure(String procedureName, String routineName, Object... args)` Calls an IRIS ObjectScript procedure, passing 0 or more arguments.
`void` `releaseAllLocks()` Release all locks associated with the session.
`void` `releaseClosedIrisObjects()`
`void` `releaseClosedIrisObjects(boolean force)`
`void` `set(BigDecimal value, String globalName, Object... subscripts)` Sets the current node's value to the given `BigDecimal` value.
`void` `set(Boolean value, String globalName, Object... subscripts)` Sets the current node's value to the given `Boolean` value.
`void` `set(byte[] value, String globalName, Object... subscripts)` Sets the current node's value to the given `byte[]` value.
`void` `set(Date value, String globalName, Object... subscripts)` Sets the current node's value to the given `java.sql.Date` value.
`void` `set(Double value, String globalName, Object... subscripts)` Sets the current node's value to the given `Double` value.
`void` `set(Float value, String globalName, Object... subscripts)` Sets the current node's value to the given `Float` value.
`void` `set(InputStream value, String globalName, Object... subscripts)` Sets the current node's value to the data in the given InputStream.
`void` `set(Integer value, String globalName, Object... subscripts)` Sets the current node's value to the given `Integer` value.
`void` `set(IRISList value, String globalName, Object... subscripts)` Sets the current node's value to the given `IRISList` value.
`void` `set(Long value, String globalName, Object... subscripts)` Sets the current node's value to the given `Long` value.
`void` `set(Object value, String globalName, Object... subscripts)` Sets the current node's value to the specified value.
`void` `set(Reader value, String globalName, Object... subscripts)` Sets the current node's value to the data in the given Reader.
`void` `set(Short value, String globalName, Object... subscripts)` Sets the current node's value to the given `Short` value.
`void` `set(String value, String globalName, Object... subscripts)` Sets the current node's value to the given `String` value.
`void` `set(Timestamp value, String globalName, Object... subscripts)` Sets the current node's value to the given `java.sql.Timestamp` value.
`void` `set(Time value, String globalName, Object... subscripts)` Sets the current node's value to the given `java.sql.Time` value.
`<T extends Serializable> void` `set(T value, String globalName, Object... subscripts)` Sets the current node's value to an instance of an object that implements Serializable.
`void` `tCommit()` Commit the current IRIS transaction.
`void` `tRollback()` Roll back all open IRIS transactions in the session.
`void` `tRollbackOne()` Roll back the current level IRIS transaction only.
`void` `tStart()` Start/open an IRIS transaction.
`void` `unlock(String lockMode, String globalName, Object... subscripts)` Unlock the global.
`void` `xepSSND(byte[] value, String globalName, int indexOpt)`
`void` `xepSSNDBufferObject(com.intersystems.jdbc.ListWriter vList)`
`void` `xepSSNDFinish(int count)`
`void` `xepSSNDFlush()`
`void` `xepSSNDStart(String globalName, int indexOpt, int bufferSize)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### xepGlobalName

    public String xepGlobalName

#### xepIndexOpt

    public int xepIndexOpt

### Method Detail

#### createIRIS

    public static IRIS createIRIS(com.intersystems.jdbc.IRISConnection conn)
                           throws SQLException

Throws:
  `SQLException`

#### close

    public final void close()
                     throws Exception

Throws:
  `Exception`

#### getProductVersion

    public static String getProductVersion()

Returns the product version. This is the JAR version define as implementation version in pom.xml

Returns:
  Product version string

#### getAPIVersion

    public static final String getAPIVersion()

Returns the API version string. This is the version of the IRIS Native API, not the IRIS JDBC driver.

Returns:
  API version string

#### getServerVersion

    public final String getServerVersion()

Returns the server version string for the current connection. This is equivalent to calling $system.Version.GetVersion() in IRIS ObjectScript.

Returns:
  server version string

#### getBoolean

    public final Boolean getBoolean(String globalName,
                                    Object... subscripts)

Gets the value of the global as a Boolean. Returns `null` if node is undefined. Returns false if node value is empty string.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as Boolean

#### getBytes

    public final byte[] getBytes(String globalName,
                                 Object... subscripts)

Gets the value of the global as a byte[]. Returns `null` if node is undefined.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as Object

#### getInteger

    public final Integer getInteger(String globalName,
                                    Object... subscripts)

Gets the value of the global as a Integer. Returns `null` if node is undefined. Returns 0 if node value is empty string.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as Integer

#### getShort

    public final Short getShort(String globalName,
                                Object... subscripts)

Gets the value of the global as a Short. Returns `null` if node is undefined. Returns 0 if node value is empty string.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as Short

#### getLong

    public final Long getLong(String globalName,
                              Object... subscripts)

Gets the value of the global as a Long. Returns `null` if node is undefined. Returns 0 if node value is empty string.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as Long

#### getBigDecimal

    public final BigDecimal getBigDecimal(String globalName,
                                          Object... subscripts)

Gets the value of the global as a BigDecimal. Returns `null` if node is undefined. Returns 0 if node value is empty string.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as BigDecimal

#### getObject

    public final Object getObject(String globalName,
                                  Object... subscripts)

Gets the value of the global as an Object. Returns `null` if node is undefined.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as Object

#### getIRISList

    public IRISList getIRISList(String globalName,
                                Object... subscripts)

Gets the value of the global as an instance of IRISList. Returns `null` if node is undefined.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as IRISList

#### getString

    public final String getString(String globalName,
                                  Object... subscripts)

Gets the value of the global as a String. Returns `null` if node is undefined. This method does some translation between type-less IRIS and typed Java, regarding the empty string and null. A null character in IRIS $CHAR(0) is translated to the empty string in Java "". An empty string in IRIS "" is translated to null in Java. This translation is consistent with the way JDBC handles these values.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as String

#### getFloat

    public final Float getFloat(String globalName,
                                Object... subscripts)

Gets the value of the global as a Float. Returns `null` if node is undefined. Returns 0.0 if node value is empty string.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as Float

#### getDouble

    public final Double getDouble(String globalName,
                                  Object... subscripts)

Gets the value of the global as a Double. Returns `null` if node is undefined. Returns 0.0 if node value is empty string.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as Double

#### getTimestamp

    public final Timestamp getTimestamp(String globalName,
                                        Object... subscripts)

Gets the value of the global as a java.sql.Timestamp. Returns `null` if node is undefined.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as java.sql.Timestamp

#### getTime

    public final Time getTime(String globalName,
                              Object... subscripts)

Gets the value of the global as a java.sql.Time. Returns `null` if node is undefined.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as java.sql.Time

#### getDate

    public final Date getDate(String globalName,
                              Object... subscripts)

Gets the value of the global as a java.sql.Date. Returns `null` if node is undefined.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as java.sql.Date

#### getInputStream

    public final InputStream getInputStream(String globalName,
                                            Object... subscripts)

Gets the value of the global as a InputStream. Returns `null` if node is undefined. This method is currently limited to the maximum size of a single global node.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as InputStream

#### getReader

    public final Reader getReader(String globalName,
                                  Object... subscripts)

Gets the value of the global as a Reader. Returns `null` if node is undefined. This method is currently limited to the maximum size of a single global node.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  value of the global node as Reader

#### set

    public final void set(Integer value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `Integer` value. A null value translates to "" in IRIS.

Parameters:
  `globalName` - global name
  `value` - `Integer` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(Boolean value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `Boolean` value. A null value translates to "" in IRIS.

Parameters:
  `globalName` - global name
  `value` - `Boolean` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(Short value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `Short` value. A null value translates to "" in IRIS.

Parameters:
  `globalName` - global name
  `value` - `Short` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(Long value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `Long` value. A null value translates to "" in IRIS.

Parameters:
  `globalName` - global name
  `value` - `Long` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(Double value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `Double` value. A null value translates to "" in IRIS.

Parameters:
  `globalName` - global name
  `value` - `Double` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(Float value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `Float` value. A null value translates to "" in IRIS.

Parameters:
  `globalName` - global name
  `value` - `Float` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(Date value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `java.sql.Date` value. A null value translates to "" in IRIS.

Parameters:
  `globalName` - global name
  `value` - `java.sql.Date` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(Time value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `java.sql.Time` value. A null value translates to "" in IRIS.

Parameters:
  `globalName` - global name
  `value` - `java.sql.Time` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(Timestamp value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `java.sql.Timestamp` value. A null value translates to "" in IRIS.

Parameters:
  `globalName` - global name
  `value` - `java.sql.Timestamp` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(String value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `String` value. This method does some translation between typed Java and type-less IRIS, regarding the empty string and null. An empty string in Java "" is translated to the null string character in IRIS $CHAR(0). A null in Java is translated to the empty string in IRIS. This translation is consistent with the way JDBC handles these values.

Parameters:
  `globalName` - global name
  `value` - `String` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(byte[] value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `byte[]` value. A null value translates to "" in IRIS.

Parameters:
  `globalName` - global name
  `value` - `byte[]` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(InputStream value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the data in the given InputStream. This method is currently limited to the maximum size of a single global node. A null value translates to "" in IRIS.

Parameters:
  `value` - InputStream value to which to set this node
  `globalName` - global name
  `subscripts` - subscripts

#### set

    public final void set(Reader value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the data in the given Reader. This method is currently limited to the maximum size of a single global node. A null value translates to "" in IRIS.

Parameters:
  `value` - Reader value to which to set this node
  `globalName` - global name
  `subscripts` - subscripts

#### set

    public final <T extends Serializable> void set(T value,
                                                   String globalName,
                                                   Object... subscripts)

Sets the current node's value to an instance of an object that implements Serializable. The Java object will be serialized prior to being set as the global value. A null value translates to "" in IRIS.

Type Parameters:
  `T` - type variable
Parameters:
  `globalName` - global name
  `value` - Serializable value
  `subscripts` - subscripts

#### set

    public final void set(BigDecimal value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `BigDecimal` value.

Parameters:
  `globalName` - global name
  `value` - `BigDecimal` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(IRISList value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the given `IRISList` value.

Parameters:
  `globalName` - global name
  `value` - `IRISList` value to which to set this node
  `subscripts` - subscripts

#### set

    public final void set(Object value,
                          String globalName,
                          Object... subscripts)

Sets the current node's value to the specified value. Can be any of the following types `Integer`, `Boolean`, `Short`, `Long`, `Double`, `Float`, `String`, `java.sql.Date`, `java.sql.Time`, `java.sql.Timestamp`,`IRISList`, `java.sql.Time`, `java.sql.Timestamp`,`IRISList`, `Serializable`, `byte[]`, `Reader`, `IRISList` or `InputStream`. A null value translates to "" in IRIS.

Parameters:
  `globalName` - global name
  `value` - `Object` value to which to set this node
  `subscripts` - subscripts

#### kill

    public final void kill(String globalName,
                           Object... subscripts)

Kills the global node including any descendants.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts

#### increment

    public final long increment(Integer value,
                                String globalName,
                                Object... subscripts)

Increments the specified global with the passed value. A null value is interpreted as 0.

Parameters:
  `value` - `Integer` value to which to set this node
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  the new value of the global node

#### isDefined

    public final int isDefined(String globalName,
                               Object... subscripts)

Checks if a a global contains data ($DATA).

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  Returns 0 if the node is undefined, 1 if the global node exists and contains data. 10 if it's an array element that has descendants. 11 has data and descendants.

#### getNodes

    public final List<com.intersystems.jdbc.ListReader> getNodes(String globalName,
                                                                 Object... subscripts)

Note: This method is for internal use only. Iterates over all subscripts in the $ORDER sense and produces a List of rows. Each row will be returned in a separate byte array.

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  a List of ListReaders, once for each row

#### nextSubscript

    public final Object nextSubscript(Boolean reverse,
                                      String globalName,
                                      Object... subscripts)

Get the next subscript in global at a given subscript as an object, executing forward $ORDER function if reverse is false or backward $ORDER function if reverse is true. If no subscript follows the given subscript then return value is null.

Parameters:
  `reverse` - backwards direction
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  Object the subscript of the next global node

#### getIRISIterator

    public final IRISIterator getIRISIterator(String globalName,
                                              Object... subscripts)

Allows iterating over a global in the $ORDER sense by returning an iterator that can be used to extract subscripts and global node values. The global reference (globalName + subscripts) passed to this method specifies the root global node. The IRISIterator returned will iterate over the immediate children of the root node. For example, for the following global: ^gbl(1)="a" ^gbl(1,11)="b" ^gbl(1,12)="c" ^gbl(2)="d" Calling getIRISIterator("^gbl") will return an iterator that traverses the immediate children of ^gbl, that is, ^gbl(1) and ^gbl(2). Calling getIRISIterator("^gbl",1) will return an iterator that traverses the immediate children of ^gbl(1), that is, ^gbl(1,11) and ^gbl(1,12).

Parameters:
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  an instance of IRISIterator

#### getIRISIterator

    public final IRISIterator getIRISIterator(int prefetchSizeHint,
                                              String globalName,
                                              Object... subscripts)

Allows iterating over a global in the $ORDER sense by returning an iterator that can be used to extract subscripts and global node values. The global reference (globalName + subscripts) passed to this method specifies the root global node. The IRISIterator returned will iterate over the immediate children of the root node. For example, for the following global: ^gbl(1)="a" ^gbl(1,11)="b" ^gbl(1,12)="c" ^gbl(2)="d" Calling getIRISIterator("^gbl") will return an iterator that traverses the immediate children of ^gbl, that is, ^gbl(1) and ^gbl(2). Calling getIRISIterator("^gbl",1) will return an iterator that traverses the immediate children of ^gbl(1), that is, ^gbl(1,11) and ^gbl(1,12).

Parameters:
  `prefetchSizeHint` - hint to iterator for size of chunks (in bytes) to use when fetching data from server
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  an instance of IRISIterator

#### lock

    public final boolean lock(String lockMode,
                              Integer timeout,
                              String globalName,
                              Object... subscripts)

Lock the global, returns true on success. Note that this method performs an incremental lock and not the implicit unlock before lock feature that is also offered in COS.

Parameters:
  `lockMode` - combination of the following chars, S for shared lock, E for escalating lock, default is empty string (exclusive and non-escalating)
  `timeout` - amount to wait to acquire the lock in seconds
  `globalName` - global name
  `subscripts` - global subscripts
Returns:
  true on success

#### unlock

    public final void unlock(String lockMode,
                             String globalName,
                             Object... subscripts)

Unlock the global. Note that this method performs an incremental unlock and not the implicit unlock before lock feature that is also offered in COS.

Parameters:
  `lockMode` - combination of the following chars , S for shared lock, E for escalating lock, default is empty string (exclusive and non-escalating)
  `globalName` - global name
  `subscripts` - global subscripts

#### releaseAllLocks

    public final void releaseAllLocks()

Release all locks associated with the session.

#### tStart

    public final void tStart()

Start/open an IRIS transaction. DO NOT mix the IRIS (Native) transaction model with the SQL transaction model. - If you want to use only Native commands within a transaction, you should always use Native transaction methods. - If you want to use a mix of Native and JDBC/SQL commands within a transaction, you should turn autoCommit OFF and then always use Native transaction methods. - If you want to use only JDBC/SQL commands within a transaction, you can either always use SQL transaction methods, or turn autocommit OFF and then always use Native transaction methods.

#### tCommit

    public final void tCommit()

Commit the current IRIS transaction. DO NOT mix the IRIS (Native) transaction model with the SQL transaction model. - If you want to use only Native commands within a transaction, you should always use Native transaction methods. - If you want to use a mix of Native and JDBC/SQL commands within a transaction, you should turn autoCommit OFF and then always use Native transaction methods. - If you want to use only JDBC/SQL commands within a transaction, you can either always use SQL transaction methods, or turn autocommit OFF and then always use Native transaction methods.

#### tRollback

    public final void tRollback()

Roll back all open IRIS transactions in the session. DO NOT mix the IRIS (Native) transaction model with the SQL transaction model. - If you want to use only Native commands within a transaction, you should always use Native transaction methods. - If you want to use a mix of Native and JDBC/SQL commands within a transaction, you should turn autoCommit OFF and then always use Native transaction methods. - If you want to use only JDBC/SQL commands within a transaction, you can either always use SQL transaction methods, or turn autocommit OFF and then always use Native transaction methods.

#### tRollbackOne

    public final void tRollbackOne()

Roll back the current level IRIS transaction only. If this is a nested transaction, any higher-level transactions will not be rolled back. DO NOT mix the IRIS (Native) transaction model with the SQL transaction model. - If you want to use only Native commands within a transaction, you should always use Native transaction methods. - If you want to use a mix of Native and JDBC/SQL commands within a transaction, you should turn autoCommit OFF and then always use Native transaction methods. - If you want to use only JDBC/SQL commands within a transaction, you can either always use SQL transaction methods, or turn autocommit OFF and then always use Native transaction methods.

#### getTLevel

    public final Integer getTLevel()

Get the level of the current nested IRIS transaction. Returns 1 if there is only a single transaction open. Returns 0 if there are no transactions open. This is equivalent to fetching the value of the $TLEVEL special variable. DO NOT mix the IRIS (Native) transaction model with the SQL transaction model. - If you want to use only Native commands within a transaction, you should always use Native transaction methods. - If you want to use a mix of Native and JDBC/SQL commands within a transaction, you should turn autoCommit OFF and then always use Native transaction methods. - If you want to use only JDBC/SQL commands within a transaction, you can either always use SQL transaction methods, or turn autocommit OFF and then always use Native transaction methods.

Returns:
  transaction level

#### xepSSND

    public final void xepSSND(byte[] value,
                              String globalName,
                              int indexOpt)

#### xepSSNDStart

    public final void xepSSNDStart(String globalName,
                                   int indexOpt,
                                   int bufferSize)

#### xepSSNDBufferObject

    public final void xepSSNDBufferObject(com.intersystems.jdbc.ListWriter vList)
                                   throws SQLException

Throws:
  `SQLException`

#### xepSSNDFlush

    public final void xepSSNDFlush()

#### xepSSNDFinish

    public final void xepSSNDFinish(int count)

#### classMethodBytes

    public final byte[] classMethodBytes(String className,
                                         String methodName,
                                         Object... args)

Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `byte[]`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `className` - fully qualified name of the IRIS class to which the method belongs
  `methodName` - name of the IRIS class method
  `args` - 0 or more arguments to pass to the method
Returns:
  the value returned by the IRIS ObjectScript class method, as an instance of `byte[]`.

#### classMethodLong

    public final Long classMethodLong(String className,
                                      String methodName,
                                      Object... args)

Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `Long`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `className` - fully qualified name of the IRIS class to which the method belongs
  `methodName` - name of the IRIS class method
  `args` - 0 or more arguments to pass to the method
Returns:
  the value returned by the IRIS ObjectScript class method, as an instance of `Long`.

#### classMethodDouble

    public final Double classMethodDouble(String className,
                                          String methodName,
                                          Object... args)

Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `Double`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `className` - fully qualified name of the IRIS class to which the method belongs
  `methodName` - name of the IRIS class method
  `args` - 0 or more arguments to pass to the method
Returns:
  the value returned by the IRIS ObjectScript class method, as an instance of `double`.

#### classMethodBoolean

    public final Boolean classMethodBoolean(String className,
                                            String methodName,
                                            Object... args)

Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `Boolean`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `className` - fully qualified name of the IRIS class to which the method belongs
  `methodName` - name of the IRIS class method
  `args` - 0 or more arguments to pass to the method
Returns:
  the value returned by the IRIS ObjectScript class method, as an instance of `Boolean`.

#### classMethodBigDecimal

    public final BigDecimal classMethodBigDecimal(String className,
                                                  String methodName,
                                                  Object... args)

Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `BigDecimal`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `className` - fully qualified name of the IRIS class to which the method belongs
  `methodName` - name of the IRIS class method
  `args` - 0 or more arguments to pass to the method
Returns:
  the value returned by the IRIS ObjectScript class method, as an instance of `BigDecimal`.

#### classMethodString

    public final String classMethodString(String className,
                                          String methodName,
                                          Object... args)

Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `String`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `className` - fully qualified name of the IRIS class to which the method belongs
  `methodName` - name of the IRIS class method
  `args` - 0 or more arguments to pass to the method
Returns:
  the value returned by the IRIS ObjectScript class method, as an instance of `String`.

#### classMethodObject

    public final Object classMethodObject(String className,
                                          String methodName,
                                          Object... args)

Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `Object`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `className` - fully qualified name of the IRIS class to which the method belongs
  `methodName` - name of the IRIS class method
  `args` - 0 or more arguments to pass to the method
Returns:
  the value returned by the IRIS ObjectScript class method, as an instance of `Object`.

#### classMethodIRISList

    public final IRISList classMethodIRISList(String className,
                                              String methodName,
                                              Object... args)

Calls an IRIS ObjectScript class method, passing 0 or more arguments and returning the method's return value as an instance of `IRISList`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `className` - fully qualified name of the IRIS class to which the method belongs
  `methodName` - name of the IRIS class method
  `args` - 0 or more arguments to pass to the method
Returns:
  the value returned by the IRIS ObjectScript class method, as an instance of `IRISList`.

#### classMethodStatusCode

    public final void classMethodStatusCode(String className,
                                            String methodName,
                                            Object... args)

Calls an IRIS ObjectScript class method, passing 0 or more arguments and if the method's returning status code indicates an error, then Exception is thrown, otherwise this method returns void Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `className` - fully qualified name of the IRIS class to which the method belongs
  `methodName` - name of the IRIS class method
  `args` - 0 or more arguments to pass to the method
Throws:
  `RuntimeException` - when the status code returned by the method indicates an error

#### classMethodVoid

    public final void classMethodVoid(String className,
                                      String methodName,
                                      Object... args)

Calls an IRIS ObjectScript class method, passing 0 or more arguments. this method returns void. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `className` - fully qualified name of the IRIS class to which the method belongs
  `methodName` - name of the IRIS class method
  `args` - 0 or more arguments to pass to the method

#### functionBytes

    public final byte[] functionBytes(String functionName,
                                      String routineName,
                                      Object... args)

Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `byte[]`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `functionName` - name of the IRIS ObjectScript function to call
  `routineName` - name of the routine containing the function
  `args` - 0 or more arguments to pass to the function
Returns:
  the value returned by the IRIS ObjectScript function, as an instance of `byte[]`.

#### functionLong

    public final Long functionLong(String functionName,
                                   String routineName,
                                   Object... args)

Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `Long`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `functionName` - name of the IRIS ObjectScript function to call
  `routineName` - name of the routine containing the function
  `args` - 0 or more arguments to pass to the function
Returns:
  the value returned by the IRIS ObjectScript function, as an instance of `Long`.

#### functionDouble

    public final Double functionDouble(String functionName,
                                       String routineName,
                                       Object... args)

Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `Double`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `functionName` - name of the IRIS ObjectScript function to call
  `routineName` - name of the routine containing the function
  `args` - 0 or more arguments to pass to the function
Returns:
  the value returned by the IRIS ObjectScript function, as an instance of `Double`.

#### functionBoolean

    public final Boolean functionBoolean(String functionName,
                                         String routineName,
                                         Object... args)

Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `Boolean`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `functionName` - name of the IRIS ObjectScript function to call
  `routineName` - name of the routine containing the function
  `args` - 0 or more arguments to pass to the function
Returns:
  the value returned by the IRIS ObjectScript function, as an instance of `Boolean`.

#### functionBigDecimal

    public final BigDecimal functionBigDecimal(String functionName,
                                               String routineName,
                                               Object... args)

Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `BigDecimal`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `functionName` - name of the IRIS ObjectScript function to call
  `routineName` - name of the routine containing the function
  `args` - 0 or more arguments to pass to the function
Returns:
  the value returned by the IRIS ObjectScript function, as an instance of `BigDecimal`.

#### functionString

    public final String functionString(String functionName,
                                       String routineName,
                                       Object... args)

Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `String`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `functionName` - name of the IRIS ObjectScript function to call
  `routineName` - name of the routine containing the function
  `args` - 0 or more arguments to pass to the function
Returns:
  the value returned by the IRIS ObjectScript function, as an instance of `String`.

#### functionObject

    public final Object functionObject(String functionName,
                                       String routineName,
                                       Object... args)

Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `Object`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `functionName` - name of the IRIS ObjectScript function to call
  `routineName` - name of the routine containing the function
  `args` - 0 or more arguments to pass to the function
Returns:
  the value returned by the IRIS ObjectScript function, as an instance of `Object`.

#### functionIRISList

    public final IRISList functionIRISList(String functionName,
                                           String routineName,
                                           Object... args)

Calls an IRIS ObjectScript function, passing 0 or more arguments and returning the function's return value as an instance of `IRISList`. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `functionName` - name of the IRIS ObjectScript function to call
  `routineName` - name of the routine containing the function
  `args` - 0 or more arguments to pass to the function
Returns:
  the value returned by the IRIS ObjectScript function, as an instance of `IRISList`.

#### procedure

    public final void procedure(String procedureName,
                                String routineName,
                                Object... args)

Calls an IRIS ObjectScript procedure, passing 0 or more arguments. Arguments may be of any of the following types: `Integer`, `Short`, `String`, `Long`, `Double`, `Float`, `byte[]`, `Boolean`, `Time`, `Date`, `Timestamp`, `IRISList` or `IRISObject`. If the connection is bidirection, then any Java object can be used as an argument. Trailing arguments may be omitted, causing default values to be used for those arguments, either by passing fewer than the full number of arguments, or by passing `null` for trailing arguments.

Parameters:
  `procedureName` - name of the IRIS ObjectScript procedure to call.
  `routineName` - name of the routine containing the procedure.
  `args` - 0 or more arguments to pass to the procedure.

#### releaseClosedIrisObjects

    public final void releaseClosedIrisObjects()

#### releaseClosedIrisObjects

    public final void releaseClosedIrisObjects(boolean force)