The following methods can be used for getting and setting the values of fields. They vary in the way that they handle exceptions and conditions, such as invalid field names. This variation determines which of these methods you should use for your environment as follows:
getFieldValue(X) and setFieldValue(X,V) get and set the value of field X with value V, but do not throw exceptions. Instead, they return a value that indicates what error has occurred. Use these methods for languages that do not support Java exceptions, for example, Javascript and VisualBasic.
getValue(X) and setValue(X,V) get and set the value of field X with value V, and do throw exceptions. Use these methods with languages that support Java exceptions, for example, Java.
getFieldValueAs and setFieldValueFrom get and set the value of a field as an integer, double, or long character. They behave in a similar way to getFieldValue(X) and setFieldValue(X,V) for exception handling.
getValueAs and getValueAs get and set the value of a field as an integer, double, or long character. They behave in a similar way to getValue(X) and setValue(X,V) for exception handling.
getFieldFormattedValue gets the formatted value of a field. It behaves in a similar way to getFieldValue(X) for exception handling.
getFormattedValue gets the value of a field as it is formatted in the system. It behaves in a similar way to getFieldValue(X) for exception handling.
Getters and Setters
getX() and setX(V)get and set the value of field X with value V, and do throw Java exceptions. These methods differ from the previous methods in that they are optionally generated and are intended for use in a Java or JavaBean environment, although they can be used in other environments that support Java exceptions.