public class SecondaryIndexInfo extends DLITypeInfo
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);
}
}
ARRAY, BIGINT, BINARY, BIT, BLOB, CHAR, CLOB, DATE, DBCS, DOUBLE, FLOAT, INTEGER, NON_UNIQUE_KEY, NOT_KEY, OTHER, PACKEDDECIMAL, SECONDARY_INDEX, SMALLINT, STRUCT, TIME, TIMESTAMP, TINYINT, TYPELIST, UBIGINT, UINTEGER, UNIQUE_KEY, USMALLINT, UTINYINT, VARCHAR, XML, ZONEDDECIMAL
Constructor and Description |
---|
SecondaryIndexInfo(java.lang.String fieldName,
java.lang.String sourceSegmentName,
java.lang.String[] sourceIndexFieldNames,
java.lang.String searchFieldName,
int keyLength)
Constructs a SecondaryIndexInfo object.
|
Modifier and Type | Method and Description |
---|---|
DLITypeInfo[] |
getSourceFieldTypeInfo()
Returns the secondary index source segment information like
the DBD defined name of the secondary index field, offset in
the segment, alias name, array of source segment field names.
|
java.lang.String[] |
getSourceIndexInfo()
Returns the ordered list of segment name aliases that the secondary index
references (provided via the SRCH parameter).
|
java.lang.String |
getSourceSegmentName()
Returns 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. |
void |
setSourceFieldTypeInfo(DLITypeInfo[] sourceFieldTypeInfos)
Sets the secondary index source segment information like
the DBD defined name of the secondary index field, offset in
the segment, alias name, array of source segment field names.
|
getDBType, getFieldLength, getFieldName, getFieldOffset, getFieldType, getIsRoot, getKeyType, getPrecision, getScale, getSearchFieldName, getTypeQualifier, getXmlSchema, isSigned
public SecondaryIndexInfo(java.lang.String fieldName, java.lang.String sourceSegmentName, java.lang.String[] sourceIndexFieldNames, java.lang.String searchFieldName, int keyLength)
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.sourceIndexFieldNames
- The ordered list of field 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 fields
and not the field 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.public java.lang.String getSourceSegmentName()
sourceSegmentName
parameter.public java.lang.String[] getSourceIndexInfo()
public DLITypeInfo[] getSourceFieldTypeInfo()
public void setSourceFieldTypeInfo(DLITypeInfo[] sourceFieldTypeInfos)
sourceFieldTypeInfos
- Information like the DBD defined name of the
secondary index field, offset in the segment,
alias name, array of source segment field names.