JadeBytes Class

The JadeBytes class is a collection subclass with a membership of the Byte primitive type. It provides an efficient way to store and retrieve instances of unstructured data (such as text, graphic images, sound or video streams) of arbitrary size.

The JadeBytes type provides an alternative to defining an attribute of the Binary (or String) primitive type and checking the Maximum Length check box on the Define Attribute dialog, to define a blob (or slob).

The maximum length of a JadeBytes instance is approximately 1,019G bytes.

The key benefits provided of the JadeBytes type over the existing blob and slob variants of the Binary and String primitive types are:

You can create transient and shared transient instances of the JadeBytes class. You can create only persistent instances of a subclass of the JadeBytes class, as shown in the following code example.

vars
    jbytes : JadeBytes;
    ubytes : UserBytes;             // User-defined subclass of JadeBytes
begin
    create jbytes transient;        // Allowed
    beginTransientTransaction;
    create jbytes sharedTransient;  // Allowed
    commitTransientTransaction;
    beginTransaction;
    create jbytes persistent;       // Not allowed
    create ubytes persistent;       // Allowed
    commitTransaction;
end;

You can define attributes of type JadeBytes or a user-defined subclass. A JadeBytes attribute, like a StringArray or other primitive collection attribute, is an exclusive property; that is, the JadeBytes subobject is created and deleted with its parent object.

A JadeBytes attribute can be directly mapped to an SQL BLOB type in an RPS mapping; for example, the IMAGE type in SQL Server.

For details about the properties and methods defined in the JadeBytes class, see "JadeBytes Properties" and "JadeBytes Methods", later in this document.

Collection

(None)