public class DLITypeInfo extends Object implements Serializable
DLITypeInfo(String, int, int, int, String)
constructor, which
allows you to provide the alias and actual name of the search or key field.Modifier and Type | Field and Description |
---|---|
static int |
ARRAY |
static int |
BIGINT |
static int |
BINARY |
static int |
BIT |
static int |
BLOB |
static int |
CHAR |
static int |
CLOB |
static int |
DATE |
static int |
DBCS |
static int |
DOUBLE |
static int |
FLOAT |
static int |
INTEGER |
static int |
NON_UNIQUE_KEY |
static int |
NOT_KEY |
static int |
OTHER |
static int |
PACKEDDECIMAL |
static int |
SECONDARY_INDEX |
static int |
SMALLINT |
static int |
STRUCT |
static int |
TIME |
static int |
TIMESTAMP |
static int |
TINYINT |
static int |
TYPELIST |
static int |
UBIGINT |
static int |
UINTEGER |
static int |
UNIQUE_KEY |
static int |
USMALLINT |
static int |
UTINYINT |
static int |
VARCHAR |
static int |
XML |
static int |
ZONEDDECIMAL |
Modifier | Constructor and Description |
---|---|
|
DLITypeInfo(String fieldName,
int type,
int startingOffset,
int length)
Constructs a DLITypeInfo object.
|
|
DLITypeInfo(String fieldName,
int type,
int startingOffset,
int length,
com.ibm.ims.base.DBType dbType,
boolean isRoot)
Constructs a DLITypeInfo object.
|
|
DLITypeInfo(String fieldName,
int type,
int startingOffset,
int length,
String searchFieldName)
Constructs a DLITypeInfo object.
|
|
DLITypeInfo(String fieldName,
int type,
int startingOffset,
int length,
String searchFieldName,
com.ibm.ims.base.DBType dbType,
boolean isRoot)
Constructs a DLITypeInfo object.
|
|
DLITypeInfo(String fieldName,
int type,
int startingOffset,
int length,
String searchFieldName,
int keyType)
Constructs a DLITypeInfo object, adding the ability to specify a key
type.
|
|
DLITypeInfo(String fieldName,
int type,
int startingOffset,
int length,
String searchFieldName,
int keyType,
com.ibm.ims.base.DBType dbType,
boolean isRoot)
Constructs a DLITypeInfo object, adding the ability to specify a key type
and db type.
|
protected |
DLITypeInfo(String fieldName,
int type,
String searchFieldName,
int length) |
|
DLITypeInfo(String fieldName,
String xmlSchema,
int type)
Constructs a DLITypeInfo object.
|
|
DLITypeInfo(String fieldName,
String typeQualifier,
int type,
int startingOffset,
int length)
Constructs a DLITypeInfo object.
|
|
DLITypeInfo(String fieldName,
String typeQualifier,
int type,
int startingOffset,
int length,
com.ibm.ims.base.DBType dbType,
boolean isRoot)
Constructs a DLITypeInfo object.
|
|
DLITypeInfo(String fieldName,
String typeQualifier,
int type,
int startingOffset,
int length,
String searchFieldName)
Constructs a DLITypeInfo object.
|
|
DLITypeInfo(String fieldName,
String typeQualifier,
int type,
int startingOffset,
int length,
String searchFieldName,
com.ibm.ims.base.DBType dbType,
boolean isRoot)
Constructs a DLITypeInfo object.
|
|
DLITypeInfo(String fieldName,
String typeQualifier,
int type,
int startingOffset,
int length,
String searchFieldName,
int keyType)
Constructs a DLITypeInfo object, adding the ability to specify a key
type.
|
|
DLITypeInfo(String fieldName,
String typeQualifier,
int type,
int startingOffset,
int length,
String searchFieldName,
int keyType,
com.ibm.ims.base.DBType dbType,
boolean isRoot)
Constructs a DLITypeInfo object, adding the ability to specify a key type
and db type.
|
|
DLITypeInfo(String fieldName,
String overflowSegment,
String xmlSchema,
int type,
int startingOffset,
int length)
Constructs a DLITypeInfo object.
|
Modifier and Type | Method and Description |
---|---|
com.ibm.ims.base.DBType |
getDBType() |
int |
getFieldLength()
Returns the length of the field's value in the segment.
|
String |
getFieldName()
Returns the field name given to this field in the segment.
|
int |
getFieldOffset()
Returns the offset of the field in the segment's I/O area.
|
int |
getFieldType()
Returns the type assigned to a field's value in the segment.
|
boolean |
getIsRoot() |
int |
getKeyType()
Returns the type of key the field is: DLITypeInfo.NOT_KEY
DLITypeInfo.UNIQUE_KEY DLITypeInfo.NON_UNIQUE_KEY
|
int |
getPrecision()
Returns the precision of a BigDecimal
|
int |
getScale()
Returns the scale of a BigDecimal
|
String |
getSearchFieldName()
Returns the search field name given to this field in the segment, which
must be exactly as defined in the DBD source file.
|
String |
getTypeQualifier()
Returns the type qualifier for this type.
|
String |
getXmlSchema()
Returns the XML Schema assigned to a field's value in the segment.
|
boolean |
isSigned()
Indicates whether this type is signed.
|
public static final int TINYINT
public static final int INTEGER
public static final int CHAR
public static final int DOUBLE
public static final int FLOAT
public static final int BIT
public static final int BLOB
public static final int BIGINT
public static final int SMALLINT
public static final int VARCHAR
public static final int PACKEDDECIMAL
public static final int ZONEDDECIMAL
public static final int DATE
public static final int TIME
public static final int TIMESTAMP
public static final int TYPELIST
public static final int BINARY
public static final int SECONDARY_INDEX
public static final int CLOB
public static final int DBCS
public static final int XML
public static final int USMALLINT
public static final int UINTEGER
public static final int UBIGINT
public static final int UTINYINT
public static final int STRUCT
public static final int ARRAY
public static final int OTHER
public static final int NOT_KEY
public static final int UNIQUE_KEY
public static final int NON_UNIQUE_KEY
public DLITypeInfo(String fieldName, int type, int startingOffset, int length)
DLITypeInfo(String, String, int, int, int)
or
DLITypeInfo(String, String, int, int, int, String)
constructors for these types.
The DLITypeInfo
class defines several constants that can be
supplied as values for the type
argument: CHAR
,
INTEGER
, DOUBLE
, FLOAT
,
BIT
, BLOB
, BIGINT
,
TINYINT
, BINARY
, and SMALLINT
.
Certain types have predefined lengths and cannot be changed. The
INTEGER
and FLOAT
types are always 4 bytes
long. The DOUBLE
and BIGINT
types are always 8
bytes long. The SMALLINT
type is always 2 bytes long. The
TINYINT
and BIT
types are always 1 byte long.
If another length value is specified for one of these types, an exception
will be thrown.
fieldName
- The name of the field.type
- the type of the fieldstartingOffset
- the starting offset in the I/O area of this field, beginning
at offset 1length
- the length, in bytes, of this fieldIllegalArgumentException
- if the starting offset is less than zero, an unsupported
type is given, or an invalid length is givenpublic DLITypeInfo(String fieldName, int type, int startingOffset, int length, com.ibm.ims.base.DBType dbType, boolean isRoot)
DLITypeInfo(String, String, int, int, int)
or
DLITypeInfo(String, String, int, int, int, String)
constructors for these types.
The DLITypeInfo
class defines several constants that can be
supplied as values for the type
argument: CHAR
,
INTEGER
, DOUBLE
, FLOAT
,
BIT
, BLOB
, BIGINT
,
TINYINT
, BINARY
, and SMALLINT
.
Certain types have predefined lengths and cannot be changed. The
INTEGER
and FLOAT
types are always 4 bytes
long. The DOUBLE
and BIGINT
types are always 8
bytes long. The SMALLINT
type is always 2 bytes long. The
TINYINT
and BIT
types are always 1 byte long.
If another length value is specified for one of these types, an exception
will be thrown.
fieldName
- The name of the field.type
- the type of the fieldstartingOffset
- the starting offset in the I/O area of this field, beginning
at offset 1length
- the length, in bytes, of this fielddbType
- the database typeisRoot
- true if field is a unique key of a direct access database
(DEDB, HDAM, PHDAM) root segmentIllegalArgumentException
- if the starting offset is less than zero, an unsupported
type is given, or an invalid length is givenpublic DLITypeInfo(String fieldName, int type, int startingOffset, int length, String searchFieldName)
DLITypeInfo(String, String, int, int, int)
or
DLITypeInfo(String, String, int, int, int, String)
constructors for these types. It provides functionality to provide an
alias for the key and search fields. This alias name is not limited to 8
characters.
The DLITypeInfo
class defines several constants that can be
supplied as values for the type
argument: CHAR
,
INTEGER
, DOUBLE
, FLOAT
,
BIT
, BLOB
, BIGINT
,
TINYINT
, BINARY
, and SMALLINT
.
Certain types have predefined lengths and cannot be changed. The
INTEGER
and FLOAT
types are always 4 bytes
long. The DOUBLE
and BIGINT
types are always 8
bytes long. The SMALLINT
type is always 2 bytes long. The
TINYINT
and BIT
types are always 1 byte long.
If another length value is specified for one of these types, an exception
will be thrown.
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.type
- the type of the fieldstartingOffset
- the starting offset in the I/O area of this field, beginning
at offset 1length
- the length, in bytes, of this fieldsearchFieldName
- the name of the search or key field exactly as defined in the
DBD source fileIllegalArgumentException
- if the starting offset is less than zero, an unsupported
type is given, or an invalid length is givenpublic DLITypeInfo(String fieldName, int type, int startingOffset, int length, String searchFieldName, com.ibm.ims.base.DBType dbType, boolean isRoot)
DLITypeInfo(String, String, int, int, int)
or
DLITypeInfo(String, String, int, int, int, String)
constructors for these types. It provides functionality to provide an
alias for the key and search fields. This alias name is not limited to 8
characters.
The DLITypeInfo
class defines several constants that can be
supplied as values for the type
argument: CHAR
,
INTEGER
, DOUBLE
, FLOAT
,
BIT
, BLOB
, BIGINT
,
TINYINT
, BINARY
, and SMALLINT
.
Certain types have predefined lengths and cannot be changed. The
INTEGER
and FLOAT
types are always 4 bytes
long. The DOUBLE
and BIGINT
types are always 8
bytes long. The SMALLINT
type is always 2 bytes long. The
TINYINT
and BIT
types are always 1 byte long.
If another length value is specified for one of these types, an exception
will be thrown.
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.type
- the type of the fieldstartingOffset
- the starting offset in the I/O area of this field, beginning
at offset 1length
- the length, in bytes, of this fieldsearchFieldName
- the name of the search or key field exactly as defined in the
DBD source filedbType
- the database typeisRoot
- true if field is a unique key of a direct access database
(DEDB, HDAM, PHDAM) root segmentIllegalArgumentException
- if the starting offset is less than zero, an unsupported
type is given, or an invalid length is givenpublic DLITypeInfo(String fieldName, int type, int startingOffset, int length, String searchFieldName, int keyType)
public DLITypeInfo(String fieldName, int type, int startingOffset, int length, String searchFieldName, int keyType, com.ibm.ims.base.DBType dbType, boolean isRoot)
dbType
- the database typeisRoot
- true if field is a unique key of a direct access database
(DEDB, HDAM, PHDAM) root segmentpublic DLITypeInfo(String fieldName, String typeQualifier, int type, int startingOffset, int length)
DLITypeInfo(String, String, int, int, int)
or
DLITypeInfo(String, String, int, int, int, String)
constructors for all other types. The uses of the type qualifier are as
follows:
If the field type is either packed or zoned decimal, the type qualifier
is the PICTURE string representing the layout of the field. All COBOL
PICTURE strings containing valid combinations of 9s, Vs, and Ss are
supported.
If the field contains Date/Time/Timestamp data, the type qualifier
specifies the format of the data. For example, a type qualifier of
ddMMyyyy indicates that the data is formatted as follows: 02011999 is
January 2, 1999.
For DATE and TIME all formatting opions in the java.text.SimpleDateFormat
class are supported. For the TIMESTAMP type an additional formatting
option 'f' has been provided for nanoseconds. TIMESTAMP can contain up to
9 'f's and replaces the 'S' options for milliseconds; instead, 'fff'
indicates milliseconds of precision. An example TIMESTAMP format is
yyyy-mm-dd hh:mm:ss.fffffffff
If the field type is a CLOB the type qualifier is the name of the child
overflow segment. The child overflow segment is used to store any
overflow characters after the first length-4 characters which will be
stored in this field. This base field will only hold length-4 characters
since the CLOB field type reserves the first 4 bytes for version info and
length.
The DLITypeInfo
class defines several constants that can be
supplied as values for the type
argument: CLOB
,
DATE
, TIME
, TIMESTAMP
,
ZONEDDECIMAL
and PACKEDDECIMAL
.
fieldName
- The name of the field.typeQualifier
- the type qualifier for the field, or the child overflow
segment name, as described abovetype
- the type of the fieldstartingOffset
- the starting offset in the I/O area of this field, beginning
at offset 1length
- the length of the field for a PACKEDDECIMAL number, the length
can be calculated with the following function: ceiling((number
of digits + 1)/2) for a ZONEDDECIMAL number, the length can be
calculated with the following function: number of digits + 1
(if the decimal is stored in memory) number of digits (if the
decimal is not stored in memory)IllegalArgumentException
- if the starting offset is less than zero, an unsupported
type is given, or an invalid length is givenpublic DLITypeInfo(String fieldName, String xmlSchema, int type)
The DLITypeInfo
class defines several constants that can be
supplied as values for the type
argument: XML
,
fieldName
- The name of the field.xmlSchema
- The xmlSchema nametype
- the type of the fieldIllegalArgumentException
- if the starting offset is less than zero, an unsupported
type is given, or an invalid length is givenpublic DLITypeInfo(String fieldName, String overflowSegment, String xmlSchema, int type, int startingOffset, int length)
The DLITypeInfo
class defines several constants that can be
supplied as values for the type
argument: XML
,
fieldName
- The name of the field.overflowSegment
- Child overflow segment name, as described abovexmlSchema
- The xmlSchema nametype
- the type of the fieldIllegalArgumentException
- if the starting offset is less than zero, an unsupported
type is given, or an invalid length is givenpublic DLITypeInfo(String fieldName, String typeQualifier, int type, int startingOffset, int length, com.ibm.ims.base.DBType dbType, boolean isRoot)
DLITypeInfo(String, String, int, int, int)
or
DLITypeInfo(String, String, int, int, int, String)
constructors for all other types. The uses of the type qualifier are as
follows:
If the field type is either packed or zoned decimal, the type qualifier
is the PICTURE string representing the layout of the field. All COBOL
PICTURE strings containing valid combinations of 9s, Vs, and Ss are
supported.
If the field contains Date/Time/Timestamp data, the type qualifier
specifies the format of the data. For example, a type qualifier of
ddMMyyyy indicates that the data is formatted as follows: 02011999 is
January 2, 1999.
For DATE and TIME all formatting opions in the java.text.SimpleDateFormat
class are supported. For the TIMESTAMP type an additional formatting
option 'f' has been provided for nanoseconds. TIMESTAMP can contain up to
9 'f's and replaces the 'S' options for milliseconds; instead, 'fff'
indicates milliseconds of precision. An example TIMESTAMP format is
yyyy-mm-dd hh:mm:ss.fffffffff
If the field type is a CLOB the type qualifier is the name of the child
overflow segment. The child overflow segment is used to store any
overflow characters after the first length-4 characters which will be
stored in this field. This base field will only hold length-4 characters
since the CLOB field type reserves the first 4 bytes for version info and
length.
The DLITypeInfo
class defines several constants that can be
supplied as values for the type
argument: CLOB
,
DATE
, TIME
, TIMESTAMP
,
ZONEDDECIMAL
and PACKEDDECIMAL
.
fieldName
- The name of the field.typeQualifier
- the type qualifier for the field, or the child overflow
segment name, as described abovetype
- the type of the fieldstartingOffset
- the starting offset in the I/O area of this field, beginning
at offset 1length
- the length of the field for a PACKEDDECIMAL number, the length
can be calculated with the following function: ceiling((number
of digits + 1)/2) for a ZONEDDECIMAL number, the length can be
calculated with the following function: number of digits + 1
(if the decimal is stored in memory) number of digits (if the
decimal is not stored in memory)dbType
- the database typeisRoot
- true if field is a unique key of a direct access database
(DEDB, HDAM, PHDAM) root segmentIllegalArgumentException
- if the starting offset is less than zero, an unsupported
type is given, or an invalid length is givenpublic DLITypeInfo(String fieldName, String typeQualifier, int type, int startingOffset, int length, String searchFieldName)
DLITypeInfo(String, String, int, int, int)
or
DLITypeInfo(String, String, int, int, int, String, int)
constructors for all other types. This constructor provides functionality
to provide an alias for the key and search fields. This alias name is not
limited to 8 characters. The uses of the type qualifier are as follows:
If the field type is either packed or zoned decimal, the type qualifier
is the PICTURE string representing the layout of the field. All COBOL
PICTURE strings containing valid combinations of 9s, Vs, and Ss are
supported.
If the field contains Date/Time/Timestamp data, the type qualifier
specifies the format of the data. For example, a type qualifier of
ddMMyyyy indicates that the data is formatted as follows: 02011999 is
January 2, 1999.
For DATE and TIME all formatting opions in the java.text.SimpleDateFormat
class are supported. For the TIMESTAMP type an additional formatting
option 'f' has been provided for nanoseconds. TIMESTAMP can contain up to
9 'f's and replaces the 'S' options for milliseconds; instead, 'fff'
indicates milliseconds of precision. An example TIMESTAMP format is
yyyy-mm-dd hh:mm:ss.fffffffff
If the field type is a CLOB the type qualifier is the name of the child
overflow segment. The child overflow segment is used to store any
overflow characters after the first length-4 characters which will be
stored in this field. This base field will only hold length-4 characters
since the CLOB field type reserves the first 4 bytes for version info and
length.
The DLITypeInfo
class defines several constants that can be
supplied as values for the type
argument: CLOB
,
DATE
, TIME
, TIMESTAMP
,
ZONEDDECIMAL
and PACKEDDECIMAL
.
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.typeQualifier
- the type qualifier for the fieldtype
- the type of the fieldstartingOffset
- the starting offset in the I/O area of this field, beginning
at offset 1length
- the length of the fieldsearchFieldName
- the name of the search or key field exactly as defined in the
DBD source fileIllegalArgumentException
- if the starting offset is less than zero, an unsupported
type is given, or an invalid length is givenpublic DLITypeInfo(String fieldName, String typeQualifier, int type, int startingOffset, int length, String searchFieldName, com.ibm.ims.base.DBType dbType, boolean isRoot)
DLITypeInfo(String, String, int, int, int)
or
DLITypeInfo(String, String, int, int, int, String, int)
constructors for all other types. This constructor provides functionality
to provide an alias for the key and search fields. This alias name is not
limited to 8 characters. The uses of the type qualifier are as follows:
If the field type is either packed or zoned decimal, the type qualifier
is the PICTURE string representing the layout of the field. All COBOL
PICTURE strings containing valid combinations of 9s, Vs, and Ss are
supported.
If the field contains Date/Time/Timestamp data, the type qualifier
specifies the format of the data. For example, a type qualifier of
ddMMyyyy indicates that the data is formatted as follows: 02011999 is
January 2, 1999.
For DATE and TIME all formatting opions in the java.text.SimpleDateFormat
class are supported. For the TIMESTAMP type an additional formatting
option 'f' has been provided for nanoseconds. TIMESTAMP can contain up to
9 'f's and replaces the 'S' options for milliseconds; instead, 'fff'
indicates milliseconds of precision. An example TIMESTAMP format is
yyyy-mm-dd hh:mm:ss.fffffffff
If the field type is a CLOB the type qualifier is the name of the child
overflow segment. The child overflow segment is used to store any
overflow characters after the first length-4 characters which will be
stored in this field. This base field will only hold length-4 characters
since the CLOB field type reserves the first 4 bytes for version info and
length.
The DLITypeInfo
class defines several constants that can be
supplied as values for the type
argument: CLOB
,
DATE
, TIME
, TIMESTAMP
,
ZONEDDECIMAL
and PACKEDDECIMAL
.
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.typeQualifier
- the type qualifier for the fieldtype
- the type of the fieldstartingOffset
- the starting offset in the I/O area of this field, beginning
at offset 1length
- the length of the fieldsearchFieldName
- the name of the search or key field exactly as defined in the
DBD source filedbType
- the database typeisRoot
- true if field is a unique key of a direct access database
(DEDB, HDAM, PHDAM) root segmentIllegalArgumentException
- if the starting offset is less than zero, an unsupported
type is given, or an invalid length is givenpublic DLITypeInfo(String fieldName, String typeQualifier, int type, int startingOffset, int length, String searchFieldName, int keyType)
public DLITypeInfo(String fieldName, String typeQualifier, int type, int startingOffset, int length, String searchFieldName, int keyType, com.ibm.ims.base.DBType dbType, boolean isRoot)
dbType
- the database typeisRoot
- true if field is a unique key of a direct access database
(DEDB, HDAM, PHDAM) root segmentpublic int getFieldLength()
public String getFieldName()
public int getFieldOffset()
public String getXmlSchema()
public int getFieldType()
public int getKeyType()
public String getSearchFieldName()
public String getTypeQualifier()
public com.ibm.ims.base.DBType getDBType()
public boolean getIsRoot()
public int getScale() throws DLIException
DLIException
public int getPrecision() throws DLIException
DLIException
public boolean isSigned()
(c) Copyright IBM Corporation 2008, 2017.