10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

How You Can Reference ObjectsThe following is an illustration of a single object of the VIDEO_ROW user class.It illustrates referencing an object as a whole. It shows a reference variablecalled video, which stores a single object from the user class VIDEO_ROW.Each object of the user class represents a row of data stored in the videodatabase table.When you declare a reference variable, you specify its class, and optionallyspecify its default value. The class defines the attributes in the associatedobject. OpenROAD automatically creates an object of the specified class whenyou create or declare the reference variable unless you also specify that itdefaults to null.The following example demonstrates creating the video reference variable forthe VIDEO_ROW user class:initialize ( )=declarevideo = VIDEO_ROW default null;enddeclarebegin...To reference an individual attribute of the VIDEO_ROW object, such as avideo's title, use the following dot notation:video.titleWorking with Classes 115

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!