Previous Topic: Common Properties and MethodsNext Topic: Special String Methods


Unique Attribute Properties

Each class in a Java Proxy has a unique set of properties based upon its procedure step import and export attributes. The import properties are the read and write properties, whereas the export properties are read only. The name of each of these properties is the combination of the attribute entity view name with its entity name and its attribute name.

The attribute domain, length, decimal place value, and precision flag determine the type of these properties. Each attribute has an accessor and setter method defined for it. The names are GetXXXX and SetXXXX. Some attribute types contain additional accessor and setter methods for backward compatibility. The following table lists them. Numerics may also contain special accessor and setter methods.

CA Gen Type

Java Type

Additional Accessors/Setters

Notes

Text, mixed or DBCS text

String

n.a

 

Number (length <= 4 decimals = 0)

short

n.a

 

Number (4< length <= 9 decimals = 0)

integer

n.a

 

Number (length > 9 decimal = 0)

double

n.a

 

Number (decimal > 0)

double

n.a

 

Number with C Precision

BigDecimal

SetAsString XXXX
GetAsString XXXX

 

Date

Calendar

SetAsInt XXXX
GetAsInt XXXX

Integer format must be YYYYMMDD (that is, 19990101). Null dates must be specified as null calendar objects.

Timestamp

Calendar

SetAsString XXXX
GetAsString XXXX

String format must be YYYYMMDDHHMMSSSSSSSS (19981231123000111111). Null timestamps must be specified as null calendar objects.

Time

Calendar

SetAsInt XXXX
GetAsInt XXXX

Integer format must be HHMMSS (that is, 12:01:00). Null times must be specified as null calendar objects. The Calendar or Time objects do not accept 24 as an hour. If 24 is passed as a parameter, it is converted to 00, so the time 24:00:00 retrieved from the server gets modified to 00:00:00 which is effectively same as the NULL time. This is different from the GUI and block mode runtimes which do allow a time of 24:00:00.

BLOB

byte[]

 

 

For example, attributes ID (Number domain, length 3, 0 decimal places) and NAME (Text domain, length 15) of entity view names IMPORT, EXPORT, and entity EMPLOYEE can be used as:

oper = (<beanclass>)Beans.instantiate(getClass().getClassLoader(), <bean package name>);
oper.setImportEmployeeId(123);
oper.setImportEmployeeName("EmployeeName"):
oper.execute();
String phoneNumber = oper.getExportEmployeePhoneNumber();