NonStop Server for Java (NSJ) Tools Reference Pages (NSJ 2.0+)
ddl2java generates the following instance variable names:
protected String request_code;
protected String employee_old_info_empnum;
protected String employee_old_info_empname_firstname;
protected String employee_old_info_empname_lastname;
protected String employee_old_info_empname_middle;
protected String employee_new_info_empnum;
protected String employee_new_info_empname_firstname;
protected String employee_new_info_empname_lastname;
protected String employee_new_info_empname_middle;
Generated Instance Variable Data Types
All generated instance variables are of type String, for these reasons:
JPathsend is usually called from a servlet that is acting as a client to a TS/MP
legacy server, and the servlet receives data from the client in HTML form (that
is, in a string).
●
Compaq and Java integer types vary. These type differences could be resolved by
mapping Compaq data types to Java data types, but overflow would still be
possible. Making all generated instance variables type String makes overflow
impossible.
●
Due to the semantics of DDL, ddl2java must handle occurring fields and
unions/redefinitions.
Occurring Fields
If a DDL field is an occurring field, the corresponding instance variable that
ddl2java generates is an array whose size is the maximum number of occurances for
the field. For example, for a field defined as:
02 part-colors pic x(20) occurs 2 times.
ddl2java generates:
String part-colors[] = {new String(), new String()};
If a DDL field is part of a group that occurs, ddl2java generates inner classes for
each group. For example, given the following:
02 dependent-info occurs 3 times.
04 name pic x(20).
04 age pic 99.
ddl2java generates:
Dependent_info_class