public final class OutputParameter
extends java.lang.Object
Constructor and Description |
---|
OutputParameter() |
Modifier and Type | Method and Description |
---|---|
(package private) static <T extends BaseDataType> |
createVariable(java.lang.Class<T> cls,
BaseDataType init,
BaseDataType variable,
java.util.function.Function<BaseDataType,AbstractSimpleParameter> assigner)
Create a new variable of type T as an anonymous class, which will act as a temporary transport for the
parameter assigner, which will be resolved and initialized only when the method is actually executed.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> type,
BaseDataType variable)
Creates variable wrapper and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> type,
BaseDataType variable,
boolean io)
Creates wrapper and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> propType,
object<? extends _BaseObject_> instance,
java.lang.String property)
Creates wrapper for a legacy instance property and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> propType,
object<? extends _BaseObject_> instance,
java.lang.String property,
boolean io)
Creates wrapper for a legacy instance property and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> propType,
object<? extends _BaseObject_> instance,
java.lang.String property,
int index)
Creates wrapper for a legacy instance property and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> propType,
object<? extends _BaseObject_> instance,
java.lang.String property,
int index,
boolean io)
Creates wrapper for a legacy instance property and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> propType,
object<? extends _BaseObject_> instance,
java.lang.String property,
NumberType index)
Creates wrapper for a legacy instance property and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> propType,
object<? extends _BaseObject_> instance,
java.lang.String property,
NumberType index,
boolean io)
Creates wrapper for a legacy instance property and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> propType,
java.lang.String className,
java.lang.String property)
Creates wrapper for a legacy static property and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> propType,
java.lang.String className,
java.lang.String property,
boolean io)
Creates wrapper for a legacy static property and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> propType,
java.lang.String className,
java.lang.String property,
int index)
Creates wrapper for a legacy static property and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> propType,
java.lang.String className,
java.lang.String property,
int index,
boolean io)
Creates wrapper for a legacy static property and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> propType,
java.lang.String className,
java.lang.String property,
NumberType index)
Creates wrapper for a legacy static property and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(java.lang.Class<T> propType,
java.lang.String className,
java.lang.String property,
NumberType index,
boolean io)
Creates wrapper for a legacy static property and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(DataModelObject dmo,
java.lang.String property,
java.lang.Class<T> bdt)
Creates wrapper and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(DataModelObject dmo,
java.lang.String property,
java.lang.Class<T> bdt,
boolean io)
Creates wrapper and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(DataModelObject dmo,
java.lang.String property,
java.lang.Class<T> bdt,
int index)
Creates wrapper and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(DataModelObject dmo,
java.lang.String property,
java.lang.Class<T> bdt,
int index,
boolean io)
Creates wrapper and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(DataModelObject dmo,
java.lang.String property,
java.lang.Class<T> bdt,
NumberType index)
Creates wrapper and returns instance of T type.
|
static <T extends BaseDataType> |
wrap(DataModelObject dmo,
java.lang.String property,
java.lang.Class<T> type,
NumberType index,
boolean io)
Creates wrapper and returns instance of T type.
|
(package private) static <T extends BaseDataType> |
wrap(FieldReference field,
boolean io)
Creates wrapper and returns instance of T type.
|
(package private) static <T extends BaseDataType> |
wrap(PropertyReference ref,
boolean io)
Creates wrapper and returns instance of T type.
|
(package private) static <T extends BaseDataType> |
wrap(T variable)
Creates variable wrapper and returns instance of T type.
|
(package private) static <T extends BaseDataType> |
wrap(T variable,
boolean io)
Creates wrapper and returns instance of T type.
|
static <T extends BaseDataType> |
wrapFromJava(java.lang.Class<T> type,
jobject<?> variable)
Creates wrapper and returns instance of T type.
|
static <T extends BaseDataType> |
wrapFromJava(java.lang.Class<T> type,
jobject<?> variable,
boolean io)
Creates wrapper and returns instance of T type.
|
static <T> jobject<T> |
wrapToJava(java.lang.Class<T> type,
BaseDataType variable)
Creates wrapper and returns instance of T type.
|
static <T> jobject<T> |
wrapToJava(java.lang.Class<T> type,
BaseDataType variable,
boolean io)
Creates wrapper and returns instance of T type.
|
public static <T extends BaseDataType> T wrap(java.lang.Class<T> propType, object<? extends _BaseObject_> instance, java.lang.String property, boolean io)
io
parameter).propType
- The legacy property's data type.instance
- The legacy object instance.property
- The property's name.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).public static <T extends BaseDataType> T wrap(java.lang.Class<T> propType, object<? extends _BaseObject_> instance, java.lang.String property)
propType
- The legacy property's data type.instance
- The legacy object instance.property
- The property's name.public static <T extends BaseDataType> T wrap(java.lang.Class<T> propType, java.lang.String className, java.lang.String property, boolean io)
io
parameter).propType
- The legacy property's data type.className
- The fully qualified legacy class name.property
- The property's name.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).public static <T extends BaseDataType> T wrap(java.lang.Class<T> propType, java.lang.String className, java.lang.String property)
propType
- The legacy property's data type.className
- The fully qualified legacy class name.property
- The property's name.public static <T extends BaseDataType> T wrap(java.lang.Class<T> propType, object<? extends _BaseObject_> instance, java.lang.String property, NumberType index, boolean io)
io
parameter).propType
- The legacy property's data type.instance
- The legacy object instance.property
- The property's name.index
- The extent property's subscript.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).public static <T extends BaseDataType> T wrap(java.lang.Class<T> propType, object<? extends _BaseObject_> instance, java.lang.String property, NumberType index)
propType
- The legacy property's data type.instance
- The legacy object instance.property
- The property's name.index
- The extent property's subscript.public static <T extends BaseDataType> T wrap(java.lang.Class<T> propType, java.lang.String className, java.lang.String property, NumberType index, boolean io)
io
parameter).propType
- The legacy property's data type.className
- The fully qualified legacy class name.property
- The property's name.index
- The extent property's subscript.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).public static <T extends BaseDataType> T wrap(java.lang.Class<T> propType, java.lang.String className, java.lang.String property, NumberType index)
propType
- The legacy property's data type.className
- The fully qualified legacy class name.property
- The property's name.index
- The extent property's subscript.public static <T extends BaseDataType> T wrap(java.lang.Class<T> propType, object<? extends _BaseObject_> instance, java.lang.String property, int index, boolean io)
io
parameter).propType
- The legacy property's data type.instance
- The legacy object instance.property
- The property's name.index
- The extent property's subscript.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).public static <T extends BaseDataType> T wrap(java.lang.Class<T> propType, object<? extends _BaseObject_> instance, java.lang.String property, int index)
propType
- The legacy property's data type.instance
- The legacy object instance.property
- The property's name.index
- The extent property's subscript.public static <T extends BaseDataType> T wrap(java.lang.Class<T> propType, java.lang.String className, java.lang.String property, int index, boolean io)
io
parameter).propType
- The legacy property's data type.className
- The fully qualified legacy class name.property
- The property's name.index
- The extent property's subscript.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).public static <T extends BaseDataType> T wrap(java.lang.Class<T> propType, java.lang.String className, java.lang.String property, int index)
propType
- The legacy property's data type.className
- The fully qualified legacy class name.property
- The property's name.index
- The extent property's subscript.public static <T> jobject<T> wrapToJava(java.lang.Class<T> type, BaseDataType variable)
io
parameter).
This will convert the BDT instance to a Java-compatible reference, and wrap it into a
jobject
instance.
type
- The expected Java type to be wrapped in jobject
variable
- The variable to be wrapped.public static <T> jobject<T> wrapToJava(java.lang.Class<T> type, BaseDataType variable, boolean io)
io
parameter).
This will convert the BDT instance to a Java-compatible reference, and wrap it into a
jobject
instance.
type
- The expected Java type to be wrapped in jobject
variable
- The variable to be wrapped.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).public static <T extends BaseDataType> T wrapFromJava(java.lang.Class<T> type, jobject<?> variable)
io
parameter).
This will convert the jobject
instance to a legacy BDT reference, only if the
variable holds a Java instance which can be converted to a legacy BDT value.
type
- The expected BDT type.variable
- The variable to be wrapped.public static <T extends BaseDataType> T wrapFromJava(java.lang.Class<T> type, jobject<?> variable, boolean io)
io
parameter).
This will convert the jobject
instance to a legacy BDT reference, only if the
variable holds a Java instance which can be converted to a legacy BDT value.
type
- The expected BDT type.variable
- The variable to be wrapped.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).public static <T extends BaseDataType> T wrap(java.lang.Class<T> type, BaseDataType variable)
type
- The BaseDataType
of the parameter definition. The returned value will have
this datatype.variable
- The variable to be wrapped.public static <T extends BaseDataType> T wrap(java.lang.Class<T> type, BaseDataType variable, boolean io)
io
parameter).type
- The BaseDataType
of the parameter definition. The returned value will have
this datatype.variable
- The variable to be wrapped.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).public static <T extends BaseDataType> T wrap(DataModelObject dmo, java.lang.String property, java.lang.Class<T> bdt)
dmo
- Proxy for record whose field is being accessed.property
- Name of dmo field.bdt
- The BaseDataType
of the field. The returned value will have this datatype.
This argument can be detected dynamically at runtime but, for performance reasons,
it is computed and passed in at conversion time.public static <T extends BaseDataType> T wrap(DataModelObject dmo, java.lang.String property, java.lang.Class<T> bdt, int index)
dmo
- Proxy for record whose field is being accessed.property
- Name of dmo field.bdt
- The BaseDataType
of the field. The returned value will have this datatype.
This argument can be detected dynamically at runtime but, for performance reasons,
it is computed and passed in at conversion time.index
- Index to access, if property represents an extent field.public static <T extends BaseDataType> T wrap(DataModelObject dmo, java.lang.String property, java.lang.Class<T> bdt, NumberType index)
dmo
- Proxy for record whose field is being accessed.property
- Name of dmo field.bdt
- The BaseDataType
of the field. The returned value will have this datatype.
This argument can be detected dynamically at runtime but, for performance reasons,
it is computed and passed in at conversion time.index
- Index to access, if property represents an extent field.public static <T extends BaseDataType> T wrap(DataModelObject dmo, java.lang.String property, java.lang.Class<T> bdt, boolean io)
dmo
- Proxy for record whose field is being accessed.property
- Name of dmo field.bdt
- The BaseDataType
of the field. The returned value will have this datatype.
This argument can be detected dynamically at runtime but, for performance reasons,
it is computed and passed in at conversion time.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).public static <T extends BaseDataType> T wrap(DataModelObject dmo, java.lang.String property, java.lang.Class<T> bdt, int index, boolean io)
dmo
- Proxy for record whose field is being accessed.property
- Name of dmo field.bdt
- The BaseDataType
of the field. The returned value will have this datatype.
This argument can be detected dynamically at runtime but, for performance reasons,
it is computed and passed in at conversion time.index
- Index to access, if property represents an extent field.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).public static <T extends BaseDataType> T wrap(DataModelObject dmo, java.lang.String property, java.lang.Class<T> type, NumberType index, boolean io)
dmo
- Proxy for record whose field is being accessed.property
- Name of dmo field.type
- The BaseDataType
of the field. The returned value will have this datatype.
This argument can be detected dynamically at runtime but, for performance reasons,
it is computed and passed in at conversion time.index
- Index to access, if property represents an extent field.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).static <T extends BaseDataType> T wrap(T variable)
variable
- The variable to be wrapped.static <T extends BaseDataType> T wrap(T variable, boolean io)
io
parameter).variable
- The variable to be wrapped.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local
variable in the called function will be initialized with the current value of the
original variable. Otherwise (simple OUTPUT), the parameter is initialized to
default value for respective datatype (follows the semantics of OUTPUT parameter
passing from 4GL).static <T extends BaseDataType> T wrap(FieldReference field, boolean io)
field
- The field reference.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local variable in the
called function will be initialized with the current value of the original variable. Otherwise
(simple OUTPUT), the parameter is initialized to default value for respective datatype
(follows the semantics of OUTPUT parameter passing from 4GL).static <T extends BaseDataType> T wrap(PropertyReference ref, boolean io)
ref
- The property reference.io
- Specifies an INPUT-OUTPUT parameter if true
. In this case, the local variable in the
called function will be initialized with the current value of the original variable. Otherwise
(simple OUTPUT), the parameter is initialized to default value for respective datatype
(follows the semantics of OUTPUT parameter passing from 4GL).static <T extends BaseDataType> T createVariable(java.lang.Class<T> cls, BaseDataType init, BaseDataType variable, java.util.function.Function<BaseDataType,AbstractSimpleParameter> assigner)
cls
- The parameter's type.init
- The initial value (applied only if not null
).variable
- The caller's variable.assigner
- The assigner function which will be supplied by the anonymous class
BaseDataType.getAssigner()
implementation.