com.ibm.ims.db
Class SecondaryIndexInfo
java.lang.Object
|
+--com.ibm.ims.base.DLITypeInfo
|
+--com.ibm.ims.db.SecondaryIndexInfo
- All Implemented Interfaces:
- java.io.Serializable
- public class SecondaryIndexInfo
- extends DLITypeInfo
A SecondaryIndexInfo object is a specialization of a DLITypeInfo object that defines a field,
or a set of fields, that make up a secondary index. You construct a SecondaryIndexInfo object by
providing the field name alias, an array of ordered strings that indicate the field names (by field
name alias) the secondary index references (via the SRCH parameter), and the actual name of the
secondary index as defined in the DBD.
The following example demonstrates how to define a segment containing a secondary index.
public class TelephoneDirectory extends DLISegment {
static String[] keys = {"LastName", "FirstName"};
static DLITypeInfo[] typeInfo = {
new DLITypeInfo("EmployeeNumber", DLITypeInfo.CHAR, 1, 6, "EMPNO"),
new DLITypeInfo("LastName", DLITypeInfo.CHAR, 7, 10),
new DLITypeInfo("FirstName", DLITypeInfo.CHAR, 17, 10, "FNAME"),
new DLITypeInfo("Extension", DLITypeInfo.CHAR, 27, 10),
new SecondaryIndexInfo("EmployeeInfo", "Directory", keys, "EMPINFO", 20)
};
public TelephoneDirectory() {
super("Directory", "TELEDIR", typeInfo, 36);
}
}
- See Also:
- Serialized Form
Fields inherited from class com.ibm.ims.base.DLITypeInfo |
BIGINT, BINARY, BIT, BLOB, CHAR, CLOB, DATE, DOUBLE, FLOAT, INTEGER, NON_UNIQUE_KEY, NOT_KEY, PACKEDDECIMAL, SECONDARY_INDEX, SMALLINT, TIME, TIMESTAMP, TINYINT, TYPELIST, UNIQUE_KEY, VARCHAR, ZONEDDECIMAL |
Constructor Summary |
SecondaryIndexInfo(java.lang.String fieldName,
java.lang.String sourceSegmentName,
java.lang.String[] indexInfo,
java.lang.String searchFieldName,
int keyLength)
Constructs a SecondaryIndexInfo object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SecondaryIndexInfo
public SecondaryIndexInfo(java.lang.String fieldName,
java.lang.String sourceSegmentName,
java.lang.String[] indexInfo,
java.lang.String searchFieldName,
int keyLength)
- Constructs a SecondaryIndexInfo object.
- Parameters:
fieldName
- The name of the field. This name can be an alias that maps to the
the actual name as defined in the DBD source file, which is given
by the searchFieldName
parameter.sourceSegmentName
- The name of the source segment that has the fields corresponding
to the fields in the secondary index, which is given by the
sourceSegmentName
parameter.indexInfo
- The ordered list of segment name aliases that the secondary index
references (provided via the SRCH parameter). Note the fields
specified via the SRCH parameter are the actual names of the segments
and not the segment alias names so be sure to code the alias names.searchFieldName
- The actual name of the secondary index as defined in the DBD
(via the XDFLD NAME= parameter)keyLength
- The sum of the lengths of the fields of the secondary index.
(C) International Business Machines Corporation 2004. All rights reserved.