jaguar.util.<object>Holder class

Description

package com.sybase.jaguar.util;
public class <object>Holder extends Object 

For components that use the Jaguar-JDBC type mappings, holder classes are used to pass INOUT parameters to component method calls. Each holder class has a value field that contains instances of a specific object or base Java type.

Additional holder classes are defined in packages com.sybase.jaguar.util.jdbc102 and com.sybase.jaguar.util.jdbc11.

com.sybase.jaguar.util holder classes are summarized in the Table 1-2.

Table 1-2: Holder classes

Holder class

Datatype for value field

Default for value

BooleanHolder

boolean

false

ByteHolder

byte

0

BytesHolder

byte[]

null

CharHolder

char

\u0000 (null character)

FloatHolder

float

0.0

DoubleHolder

double

0.0

IntegerHolder

int

0

LongHolder

long

0

ShortHolder

short

0

StringHolder

java.lang.String

null

WARNING! Null parameter values are not supported. For StringHolder or BytesHolder parameters, use the constructor that takes an initial value, or set the value field explicitly.

Constructors

<object>Holder()

Default constructor that assigns the default value specified in Table 1-2.

<object>Holder(<object> initialValue)

Constructor that takes an initial value specified as initialValue. initialValue is an instance of the appropriate datatype as specified in Table 1-2.

Methods

value

The current value contained by the holder object. Table 1-2 lists the datatypes and default values for the value field.

Usage

Java component methods on the server receive INOUT parameters as a holder object. The method should set the value field of each holder object before returning.

The examples below illustrate how to construct and use holder objects:

See also

jaguar.util.jdbc102.<object>Holder class, jaguar.util.jdbc11.<object>Holder class