Release 10.1A: OpenEdge Development:
Java Open Clients

> ## Adding parameters using data type-specific methods

> You can set each parameter using one of the methods on the `com.progress.open4gl.javaproxy.ParamArray` class that is specified for the corresponding Progress 4GL data type. Progress data types that are mapped to intrinsic data types in Java have two sets of methods:

> - One for the intrinsic type, which cannot be set to the Unknown value (`?`) (`null`).

> - One for an `Object` type that can accept the Unknown value (`?`).

> Methods to add arrays of each data type are also provided.

> ##### General syntax for data type-specific add parameter methods

> The general syntax of these methods is as follows:

> Syntax
>     public void addProgressType (int position, DataType value, int mode,
>                          [ int extentValue | MetaType metaData ])
>                 throws Open4GLException

> ``ProgressType``

> Indicates the Progress 4GL data type of the parameter, such as `Decimal` in `addDecimal()`, for adding a parameter of data type `DECIMAL`.

> ``position``

> Specifies a 0-based index indicating the parameter position.

> ``DataType``

> Specifies the Java data type of the parameter, for example, `java.math.BigDecimal` or `java.math.BigDecimal[]`.

> ``value``

> Specifies a variable that contains the value of the parameter, or `null` for an `OUTPUT` parameter.

> ``mode``

> Specifies the 4GL mode (passing direction) of the parameter. This can be one of the following constant values:

> - `ParamArrayMode.INPUT`
> - `ParamArrayMode.INPUT_OUTPUT`
> - `ParamArrayMode.OUTPUT`
> ``extentValue``

> Specifies the extent of an array for methods that add an array parameter (where `ProgressType` is appended with `Array`, as in `AddDecimalArray()`).

> ``MetaType``

> Specifies one of the following classes for methods that add a temp-table or ProDataSet parameter:

> - `ProResultSetMetaDataImpl` — Provides the schema information for temp-table parameters that are mapped to a `java.sql.ResultSet`. For more information on defining this schema, see the "Defining the schema for a temp-table parameter mapped to a java.sql.ResultSet" section.
> - `ProDataGraphMetaData` — Provides the schema information for ProDataSet parameters and temp-table parameters that are mapped to a com.progress.open4gl.ProDataGraph. For more information on defining the schema for ProDataSet parameters, see the "Defining the schema for a ProDataSet parameter" section. For more information on defining the schema for temp-table parameters mapped to a `ProDataGraph`, see the "Defining the schema for a temp-table parameter mapped to a ProDataGraph" section.
> ``metaData``

> Specifies an instance of `MetaType`. When `mode` is `ParamArrayMode.OUTPUT` and `ProgressType` is `DatasetHandle` or `TableHandle` (passing a dynamic ProDataSet or temp-table parameter), you can set this parameter to `null`.

> ##### Syntax summaries of all data type-specific add parameter methods

> The following sections list syntax summaries for all of the data type-specific methods for adding parameters to a `ParamArray` object:

> - CHARACTER

> - COM-HANDLE

> - DATASET or DATASET-HANDLE

> - DATE

> - DATETIME

> - DATETIME-TZ

> - DECIMAL

> - HANDLE

> - INTEGER

> - LOGICAL

> - LONGCHAR

> - MEMPTR

> - RAW

> - RECID

> - ROWID

> - TABLE or TABLE-HANDLE

> ##### CHARACTER

> These are the data type-specific methods for adding a 4GL `CHARACTER` parameter:

> Syntax
>     public void addCharacter (int position, String value, int mode)
>                 throws Open4GLException
>     public void addCharacterArray (int position, String[] value, int mode,
>                                    int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### COM-HANDLE

> These are the data type-specific methods for adding a 4GL `COM-HANDLE` parameter:

> Syntax
>     public void addCOMHandle (int position, com.progress.open4gl.COMHandle value,
>                               int mode)
>                 throws Open4GLException
>     public void addCOMHandleArray (int position,
>                                    com.progress.open4gl.COMHandle[] value,
>                                    int mode, int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### DATASET or DATASET-HANDLE

> These are the data type-specific methods for adding a 4GL ProDataSet (`DATASET` or `DATASET-HANDLE`) parameter:

> Syntax
>     public void addDataset
>                    (int position,
>                     com.progress.open4gl.ProDataGraph value, int mode,
>                     com.progress.open4gl.ProDataGraphMetaData metaData)
>                 throws Open4GLException
>     public void addDatasetHandle
>                    (int position,
>                     com.progress.open4gl.ProDataGraph value, int mode,
>                     com.progress.open4gl.ProDataGraphMetaData metaData)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### DATE

> These are the data type-specific methods for adding a 4GL `DATE` parameter:

> Syntax
>     public void addDate (int position, java.util.GregorianCalendar value,
>                          int mode)
>                 throws Open4GLException
>     public void addDateArray (int position, java.util.GregorianCalendar[] value,
>                          int mode, int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### DATETIME

> These are the data type-specific methods for adding a 4GL `DATETIME` parameter:

> Syntax
>     public void addDatetime (int position,
>                              java.util.GregorianCalendar value,
>                              int mode)
>                 throws Open4GLException
>     public void addDatetimeArray (int position,
>                                   java.util.GregorianCalendar[] value,
>                                   int mode, int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### DATETIME-TZ

> These are the data type-specific methods for adding a 4GL `DATETIME-TZ` parameter:

> Syntax
>     public void addDatetimeTZ (int position,
>                                java.util.GregorianCalendar value,
>                                int mode)
>                 throws Open4GLException
>     public void addDatetimeTZArray (int position,
>                                     java.util.GregorianCalendar[] value,
>                                     int mode, int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### DECIMAL

> These are the data type-specific methods for adding a 4GL `DECIMAL` parameter:

> Syntax
>     public void addDecimal (int position, java.math.BigDecimal value,
>                             int mode)
>                 throws Open4GLException
>     public void addDecimalArray (int position, java.math.BigDecimal[] value,
>                                  int mode, int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### HANDLE

> These are the data type-specific methods for adding a 4GL `HANDLE` parameter:

> Syntax
>     public void addHandle (int position,
>                            com.progress.open4gl.Handle value,
>                            int mode)
>                 throws Open4GLException
>     public void addHandleArray (int position,
>                                 com.progress.open4gl.Handle[] value,
>                                 int mode, int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### INTEGER

> These are the data type-specific methods for adding a 4GL `INTEGER` parameter:

> Syntax
>     public void addInteger (int position, Integer value, int mode)
>                 throws Open4GLException
>     public void addIntegerArray (int position, Integer[] value, int mode,
>                                  int extentValue)
>                 throws Open4GLException
>     public void addInteger (int position, int value, int mode)
>                 throws Open4GLException
>     public void addIntegerArray (int position, int[] value, int mode,
>                                  int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### LOGICAL

> These are the data type-specific methods for adding a 4GL `LOGICAL` parameter:

> Syntax
>     public void addLogical (int position, Boolean value, int mode)
>                 throws Open4GLException
>     public void addLogicalArray (int position, Boolean[] value, int mode,
>                                  int extentValue)
>                 throws Open4GLException
>     public void addLogical (int position, boolean value, int mode)
>                 throws Open4GLException
>     public void addLogicalArray (int position, boolean[] value, int mode,
>                                  int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### LONGCHAR

> These are the data type-specific methods for adding a 4GL `LONGCHAR` parameter:

> Syntax
>     public void addLongchar (int position, String value, int mode)
>                 throws Open4GLException
>     public void addLongcharArray (int position, String[] value, int mode,
>                                   int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### MEMPTR

> These are the data type-specific methods for adding a 4GL `MEMPTR` parameter:

> Syntax
>     public void addMemptr (int position,
>                            com.progress.open4gl.Memptr value,
>                            int mode)
>                 throws Open4GLException
>     public void addMemptrArray (int position,
>                                 com.progress.open4gl.Memptr[] value,
>                                 int mode, int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### RAW

> These are the data type-specific methods for adding a 4GL `RAW` parameter:

> Syntax
>     public void addRaw (int position, byte[] value, int mode)
>                 throws Open4GLException
>     public void addRawArray (int position, byte[][] value, int mode,
>                              int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### RECID

> These are the data type-specific methods for adding a 4GL `RECID` parameter:

> Syntax
>     public void addRecid (int position, Long value, int mode)
>                 throws Open4GLException
>     public void addRecidArray (int position, Long[] value, int mode,
>                                int extentValue)
>                 throws Open4GLException
>     public void addRecid (int position, long value, int mode)
>                 throws Open4GLException
>     public void addRecidArray (int position, long[] value, int mode,
>                                int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### ROWID

> These are the data type-specific methods for adding a 4GL `ROWID` parameter:

> Syntax
>     public void addRowid (int position, com.progress.open4gl.Rowid value,
>                           int mode)
>                 throws Open4GLException
>     public void addRowidArray (int position, com.progress.open4gl.Rowid[] value,
>                                int mode, int extentValue)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

> ##### TABLE or TABLE-HANDLE

> These are the data type-specific methods for adding a 4GL temp-table (`TABLE` or `TABLE-HANDLE`) parameter:

> Syntax
>     public void addTable
>                    (int position, java.sql.ResultSet value, int mode,
>                     com.progress.open4gl.ProResultSetMetaDataImpl metaData)
>                 throws Open4GLException
>     public void addTableHandle
>                    (int position, java.sql.ResultSet value, int mode,
>                     com.progress.open4gl.ProResultSetMetaDataImpl metaData)
>                 throws Open4GLException
>     public void addTable
>                    (int position,
>                     com.progress.open4gl.ProDataGraph value, int mode,
>                     com.progress.open4gl.ProDataGraphMetaData metaData)
>                 throws Open4GLException
>     public void addTableHandle
>                    (int position,
>                     com.progress.open4gl.ProDataGraph value, int mode,
>                     com.progress.open4gl.ProDataGraphMetaData metaData)
>                 throws Open4GLException

> For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095