Holder classes
- Last Updated: August 13, 2021
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
For each Java data type that maps to an ABL data type, there is a Holder class. These Holder classes
belong to the com.progress.open4gl package and extend the
com.progress.open4gl.Holder class, as shown in the
following example.
Example: OUTPUT and INPUT-OUTPUT holder class
|
This class has two constructors, one that does and one that does not set a
value for the parameter. For an OUTPUT parameter, you do
not need to set a value in the holder object. For an INPUT-OUTPUT parameter, you typically do need to set a value to pass as input in
the holder object. You can also set the value using the setValue() method after the holder is created.
For an INPUT-OUTPUT parameter, you can set
an input value to the ABL Unknown value (?) by calling
setValue(null) on the holder object. For INPUT-OUTPUT and OUTPUT
parameters, the application can find out whether an unknown output value is returned by
calling the isNull() method or testing for a null return value from the getValue() method on the holder object.
For each parameter data type extension, the holder class and method names change as follows:
Syntax
|
DataTypeName is an initial upper-case name that closely matches the short intrinsic data type or class name for the value, and DataType is the exact primitive data type or full Java class name (with no changes in letter case).
The following table shows the ABL-to-Java mapping of INPUT-OUTPUT and OUTPUT
parameters to specific holder classes.
| ABL data type | Java proxy data type |
|---|---|
CHARACTER
|
com.progress.open4gl.StringHolder
|
COM-HANDLE
|
com.progress.open4gl.COMHandleHolder
|
DATASET
|
com.progress.open4gl.ProDataGraphHolder
|
DATE DATETIME
|
com.progress.open4gl.DateHolder
|
DECIMAL
|
com.progress.open4gl.BigDecimalHolder
|
INT64
|
com.progress.open4gl.LongHolder
|
INTEGER
|
com.progress.open4gl.IntHolder
|
LOGICAL
|
com.progress.open4gl.BooleanHolder
|
LONGCHAR
|
com.progress.open4gl.StringHolder
|
MEMPTR
|
com.progress.open4gl.MemptrHolder
|
RAW
|
com.progress.open4gl.ByteArrayHolder
|
RECID
|
com.progress.open4gl.LongHolder
|
ROWID
|
com.progress.open4gl.RowidHolder
|
TABLE
|
com.progress.open4gl.ProDataGraphHolder
(when mapped as a Java SDO |
TABLE
|
com.progress.open4gl.ResultSetHolder(when mapped as an SQL |
WIDGET-HANDLE
|
com.progress.open4gl.HandleHolder
|
The following table shows the ABL array-to-Java mapping of INPUT-OUTPUT and OUTPUT array
parameters to specific holder classes.
| ABL array option | Java proxy data type |
|---|---|
CHARACTER
|
com.progress.open4gl.StringArrayHolder
|
COM-HANDLE
|
com.progress.open4gl.COMHandleArrayHolder
|
DATE DATETIME
DATETIME-TZ
|
com.progress.open4gl.DateArrayHolder
|
DECIMAL
|
com.progress.open4gl.BigDecimalArrayHolder
|
INT64
|
com.progress.open4gl.LongArrayHolder
|
INTEGER
|
com.progress.open4gl.IntArrayHolder
|
LOGICAL
|
com.progress.open4gl.BooleanArrayHolder
|
LONGCHAR
|
com.progress.open4gl.StringArrayHolder
|
MEMPTR
|
com.progress.open4gl.MemptrArrayHolder
|
RAW
|
com.progress.open4gl.ByteArrayArrayHolder
|
RECID
|
com.progress.open4gl.LongArrayHolder
|
ROWID
|
com.progress.open4gl.RowidArrayHolder
|
WIDGET-HANDLE
|
com.progress.open4gl.HandleArrayHolder
|