com.ibm.ims.db
Class SSAList

java.lang.Object
  |
  +--com.ibm.ims.db.SSAList
All Implemented Interfaces:
java.lang.Cloneable

public class SSAList
extends java.lang.Object
implements java.lang.Cloneable

SSAList represents a collection of SSA (Segment Search Arguments) objects.


Constructor Summary
protected SSAList()
          Creates an empty SSA list.
protected SSAList(SSA ssa)
          Creates an SSA list from an existing SSA, and places the ssa argument at the head of the list.
protected SSAList(java.lang.String dbPCBNameReference)
          Creates an empty SSA list.
protected SSAList(java.lang.String dbPCBNameReference, SSA ssa)
          Creates an SSA list from an existing SSA, and places the ssa argument at the head of the list.
 
Method Summary
 void addSSA(SSA ssa)
          Adds the ssa argument to an existing SSA list, placing it at the end of the list.
 void clearParameters()
          Clears the values of all prepared parameters
protected  java.lang.Object clone()
          Returns a clone of the SSAList.
static SSAList createInstance()
          Deprecated. Replaced by createInstance(String)
static SSAList createInstance(SSA ssa)
          Deprecated. Replaced by createInstance(String, SSA)
static SSAList createInstance(java.lang.String dbPCBNameReference)
          Creates an SSA list.
static SSAList createInstance(java.lang.String dbPCBNameReference, SSA ssa)
          Creates an SSA list from an existing SSA, and places the ssa argument at the head of the list.
 byte[][] getBytes(DLIDatabaseView dbView)
          Returns the SSA list in a two-dimensional byte array.
 void setValue(int index, java.math.BigDecimal value)
          Sets the value of a prepared parameter to the desired value.
 void setValue(int index, boolean value)
          Sets the value of a prepared parameter to the desired value.
 void setValue(int index, byte value)
          Sets the value of a prepared parameter to the desired value.
 void setValue(int index, byte[] value)
          Sets the value of a prepared parameter to the desired value.
 void setValue(int index, java.sql.Date value)
          Sets the value of a prepared parameter to the desired value.
 void setValue(int index, double value)
          Sets the value of a prepared parameter to the desired value.
 void setValue(int index, float value)
          Sets the value of a prepared parameter to the desired value.
 void setValue(int index, int value)
          Sets the value of a prepared parameter to the desired value.
 void setValue(int index, long value)
          Sets the value of a prepared parameter to the desired value.
 void setValue(int index, short value)
          Sets the value of a prepared parameter to the desired value.
 void setValue(int index, java.lang.String value)
          Sets the value of a prepared parameter to the desired value.
 void setValue(int index, java.sql.Time value)
          Sets the value of a prepared parameter to the desired value.
 void setValue(int index, java.sql.Timestamp value)
          Sets the value of a prepared parameter to the desired value.
 int size()
          Returns the number of SSAs in this list
 SSA ssaAt(int index)
          Returns the SSA at the specified index
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSAList

protected SSAList()
Creates an empty SSA list.

SSAList

protected SSAList(SSA ssa)
Creates an SSA list from an existing SSA, and places the ssa argument at the head of the list.
Parameters:
ssa - an SSA

SSAList

protected SSAList(java.lang.String dbPCBNameReference)
Creates an empty SSA list.
Parameters:
dbPCBNameReference - The reference to the actual DB PCB name. The reference name is the database PCB name that was provided via the dbPCBNameReference parameter to either the DLIDatabaseView(String, String, String, DLISegmentInfo[]) constructor or DLIDatabaseView.addDatabase(String, String, DLISegmentInfo[]) method.
See Also:
DLIDatabaseView

SSAList

protected SSAList(java.lang.String dbPCBNameReference,
                  SSA ssa)
Creates an SSA list from an existing SSA, and places the ssa argument at the head of the list.
Parameters:
dbPCBNameReference - The reference to the actual DB PCB name. The reference name is the database PCB name that was provided via the dbPCBNameReference parameter to either the DLIDatabaseView(String, String, String, DLISegmentInfo[]) constructor or DLIDatabaseView.addDatabase(String, String, DLISegmentInfo[]) method.
ssa - an SSA
See Also:
DLIDatabaseView
Method Detail

addSSA

public void addSSA(SSA ssa)
            throws IMSException
Adds the ssa argument to an existing SSA list, placing it at the end of the list.

If an SSA uses the CONCATENATED_KEY command code, it must be the only SSA in the SSAList, otherwise an exception will be thrown.

Parameters:
ssa - an SSA

clearParameters

public void clearParameters()
Clears the values of all prepared parameters

createInstance

public static SSAList createInstance()
Deprecated. Replaced by createInstance(String)

Creates an empty SSA list.

createInstance

public static SSAList createInstance(SSA ssa)
Deprecated. Replaced by createInstance(String, SSA)

Creates an SSA list from an existing SSA, and places the ssa argument at the head of the list.
Parameters:
ssa - an SSA

getBytes

public byte[][] getBytes(DLIDatabaseView dbView)
                  throws IMSException
Returns the SSA list in a two-dimensional byte array. Each element in the array is an SSA in its EBCDIC format exactly as IMS needs it to be.
Returns:
a two-dimensional byte array containing all the SSAs in their EBCDIC format
Throws:
DLIException - if the SSAList does not have all its fields set (i.e.; some fields still have 'null' as their value)

setValue

public void setValue(int index,
                     byte[] value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter
See Also:
SSA, SSAQualificationStatement

setValue

public void setValue(int index,
                     byte value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter
See Also:
SSA, SSAQualificationStatement

setValue

public void setValue(int index,
                     double value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter
See Also:
SSA, SSAQualificationStatement

setValue

public void setValue(int index,
                     float value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter
See Also:
SSA, SSAQualificationStatement

setValue

public void setValue(int index,
                     int value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter
See Also:
SSA, SSAQualificationStatement

setValue

public void setValue(int index,
                     long value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter
See Also:
SSA, SSAQualificationStatement

setValue

public void setValue(int index,
                     java.lang.String value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter, which will be converted to its appropriate type as defined in the type info
See Also:
SSA, SSAQualificationStatement

setValue

public void setValue(int index,
                     java.math.BigDecimal value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter
See Also:
SSA, SSAQualificationStatement

setValue

public void setValue(int index,
                     java.sql.Date value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter
See Also:
SSA, SSAQualificationStatement

setValue

public void setValue(int index,
                     java.sql.Time value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter
See Also:
SSA, SSAQualificationStatement

setValue

public void setValue(int index,
                     java.sql.Timestamp value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter
See Also:
SSA, SSAQualificationStatement

setValue

public void setValue(int index,
                     short value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter
See Also:
SSA, SSAQualificationStatement

setValue

public void setValue(int index,
                     boolean value)
Sets the value of a prepared parameter to the desired value. A prepared parameter is one whose value was set to null when the SSA or the SSAQualificationStatement was created, indicating that the value could be substituted in later. If an SSAList is composed of 2 SSAs, each with 2 prepared parameters, then the index can be between 1 and 4, inclusive. For example, an index of 2 would specify the second prepared parameter of the first SSA in the SSAList.
Parameters:
index - the index of the parameter value to be changed, starting with 1
value - the value of the parameter
See Also:
SSA, SSAQualificationStatement

size

public final int size()
Returns the number of SSAs in this list
Returns:
the number of SSAs in this list

ssaAt

public final SSA ssaAt(int index)
Returns the SSA at the specified index
Parameters:
index - the 1-based index into the list (i.e.; index 1 is the first SSA)
Returns:
the SSA at the specified index

createInstance

public static SSAList createInstance(java.lang.String dbPCBNameReference)
Creates an SSA list. This contructor should be used when the SSAList is going to be used to perform an unqualified DL/I call.
Parameters:
dbPCBNameReference - The reference to the actual DB PCB name. The reference name is the database PCB name that was provided via the dbPCBNameReference parameter to either the DLIDatabaseView(String, String, String, DLISegmentInfo[]) constructor or DLIDatabaseView.addDatabase(String, String, DLISegmentInfo[]) method.

createInstance

public static SSAList createInstance(java.lang.String dbPCBNameReference,
                                     SSA ssa)
Creates an SSA list from an existing SSA, and places the ssa argument at the head of the list.
Parameters:
dbPCBNameReference - The reference to the actual DB PCB name. The reference name is the database PCB name that was provided via the dbPCBNameReference parameter to either the DLIDatabaseView(String, String, String, DLISegmentInfo[]) constructor or DLIDatabaseView.addDatabase(String, String, DLISegmentInfo[]) method.
ssa - an SSA

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Returns a clone of the SSAList. This is specialized for the PreparedStatement call.
Overrides:
clone in class java.lang.Object


(C) International Business Machines Corporation 2004. All rights reserved.