The basic job of an encoder is to render an object into a string, number or Boolean form that PL/SQL can handle and visa versa. The tables in this section provide a list of all of the data type encoders that the enhanced JavaBean support is provided with. These encoders are called automatically by Forms and manage the translation of the basic PL/SQL data types into the supported Java types and objects, and visa-versa. If the predefined encoders described here do not meet your needs, you can create your own custom encoders.
The string representation shown here is always available for all types and
so the various versions of FBEAN.GET_PROPERTY
, SET_PROPERTY
,
and INVOKE
that provide a VARCHAR2
interface can be
used with any data type. If you use a version of a Built-in that returns number
or boolean
, the enhanced JavaBean support converts from the base
string form to that particular data type for you.
Java type | Convenience PL/SQL Type | String representation |
---|---|---|
java.lang.Boolean | BOOLEAN | "TRUE" or "FALSE" |
java.lang.Character | VARCHAR2 | "A", where A is any ASCII character" |
java.lang.String | VARCHAR2 | "ABC" |
java.lang.Byte | NUMBER | 0" or "1" |
java.lang.Double | NUMBER | "4545" |
java.lang.Float | NUMBER | "45.45" |
java.lang.Integer | NUMBER | "45" |
java.lang.Long | NUMBER | "454545" |
java.lang.Short | NUMBER | "4" |
java.awt.Color | VARCHAR2 | "255 255 255" - String containing Red, Green and Blue elements separated by spaces |
java.awt.Dimension | VARCHAR2 | "x y" (space in between) for Dimension(x,y) |
java.awt.Insets | VARCHAR2 | "top left bottom right" for Insets(top, left, bottom, right) |
java.awt.Point | VARCHAR2 | "x y" for Point(x,y) |
java.awt.Rectangle | VARCHAR2 | "height width x y" for Rectangle(height, width,x,y) |
java.awt.Image | VARCHAR2 | URL for image file - one way transfer from file name to image object, e.g. OK for SET but not GET |
Any Array of a supported type | VARCHAR2 | comma separated String: "1,2,3" or "foo,bar" or "1 2, 2, 1" (for array of two Points) |
Event Type | Possible CUSTOM_ITEM_EVENT(s) | DATA parameter Payload |
---|---|---|
java.awt.event.ActionEvent | ACTION_PERFORMED | no payload |
java.awt.event.ComponentEvent | COMPONENT_EVENT COMPONENT_HIDDEN COMPONENT_MOVED COMPONENT_RESIZED COMPONENT_SHOWN |
no payload |
java.awt.event.ContainerEvent | COMPONET_EVENT COMPONENT_ADDED COMPONENT_REMOVED |
no payload |
java.awt.event.FocusEvent | FOCUS_EVENT FOCUS_GAINED FOCUS_LOST |
no payload |
java.awt.event.ItemEvent | ITEM_EVENT |
no payload |
ITEM_STATE_CHANGED | "SELECTED" or "DESELECTED" | |
java.awt.event.KeyEvent | KEY_EVENT KEY_PRESSED KEY_RELEASED KEY_TYPED |
"KeyCode" |
java.awt.event.MouseEvent | MOUSE_EVENT MOUSE_CLICKLED MOUSE_DRAGGED MOUSE_ENTERED MOUSE_EXITED MOUSE_FIRST MOUSE_LAST MOUSE_MOVED MOUSE_PRESSED MOUSE_RELEASED |
"x y,clickCount" (Where x & y represent the location, and clickCount number of clicks) |
java.beans.PropertyChangeEvent | PROPERTY_CHANGED_EVENT | "PropertyName" |
java.awt.event.TextEvent | TEXT_EVENT TEXT_VALUE_CHANGED |
no payload |
java.awt.event.WindowEvent | WINDOW_EVENT WINDOW_ACTIVATED WINDOW_CLOSED WINDOW_CLOSING WINDOW_DEACTIVATED WINDOW_DEICONIFIED WINDOW_ICONIFIED WINDOW_OPENED |
"WindowName" |