Class IPersistentObject

This abstract class defines the standard interface for a data access class. It provides data access to a row of a table.


Hierarchy

Inherits from:

IBase
 |
 +----IVBase
       |
       +----IDAAsynchObject
             |
             +-----IPersistentObject

Inherited by:

IPersistentObject
 |
 +----<class>

Public Functions by Category

Destructor

~IPersistentObject

public:
virtual ~IPersistentObject();
Supported Platforms
Windows OS/2 AIX
Y Y Y

Data Manipulation

add

public:
virtual void add();

This method, when implemented in a derived class such as <Class>, will add the current persistent object to the table.

Supported Platforms
Windows OS/2 AIX
Y Y Y

update

public:
virtual void update();

This method, when implemented in a derived class such as <Class>, will update the row in the table that corresponds to the current object's data ID, with the attributes of the current object.

Supported Platforms
Windows OS/2 AIX
Y Y Y

del

public:
virtual void del();

This method, when implemented in a derived class such as <Class>, will delete a row in the table that corresponds the the current object's data ID.

Supported Platforms
Windows OS/2 AIX
Y Y Y

retrieve

public:
virtual void retrieve();

This method, when implemented in a derived class such as <Class>, will retrieve a row from the table that corresponds the the current object's data ID.

Supported Platforms
Windows OS/2 AIX
Y Y Y

Access Control

isRetrievable
public:
IBoolean isRetrievable() const;

This method returns true if the object is retrievable from the database, or false if it is not. You can change this setting by calling the setRetrievable method.

Supported Platforms
Windows OS/2 AIX
Y Y Y
isReadOnly
public:
IBoolean isReadOnly() const;

This method returns true if the object is set to read only, or false if it is not. You can change this setting by calling the setReadOnly method.

Supported Platforms
Windows OS/2 AIX
Y Y Y
IsDefaultReadOnly
public:
IBoolean isDefaultReadOnly() const;

This method returns true if the object by default is read only (that is, the table it was mapped from is read-only), or false if it is not.

Supported Platforms
Windows OS/2 AIX
Y Y Y
setReadOnly
public:
IPersistentObject& setReadOnly(IBoolean flag = true);

Use this method to change the read only setting for the current object. Pass in true (or no parameter) to make it read-only, or false to make it read- and write-enabled.

Supported Platforms
Windows OS/2 AIX
Y Y Y

setRetrievable

public:
IPersistentObject& setRetrievable(IBoolean flag = true);

Use this method to set the retrievable setting for the current object. Pass in true (or no parameter) to make it retrievable, or false to make it not retrievable.

Supported Platforms
Windows OS/2 AIX
Y Y Y

Object Display

forDisplay

virtual IString forDisplay( const char* separator = " " ) const = 0;

This method, when implemented in a derived class such as <class>, returns an IString representation of the object. The separator is used to separate the attributes. Only those attributes specified as "For Display" in the Mapping Properties notebook are included.

Supported Platforms
Windows OS/2 AIX
Y Y Y

asString

virtual IString asString( const char* separator ) const = 0;
virtual IString asString() const;

This method, when implemented in a derived class such as <class>, returns an IString representation of the object. The separator is used to separate the attributes. If no separator is specified, a period (".") separates the attributes.

Supported Platforms
Windows OS/2 AIX
Y Y Y

Public Data by Category

Notification ID Support

public:
static const INotificationId retrievableId;
static const INotificationId readOnlyId;
static const INotificationId dataIdId;
static const INotificationId objectsDatastoreId;
static const INotificationId defaultDatastoreId;
Supported Platforms
Windows OS/2 AIX
Y Y Y

Protected Functions by Category

Constructors

IPersistentObject

protected:
IPersistentObject( const IBoolean defReadonly = True );
IPersistentObject( const IPersistentObject& partCopy );
Supported Platforms
Windows OS/2 AIX
Y Y Y

Protected Operators

=
protected:
IPersistentObject& operator= (const IPersistentObject& aIPersistentObject);
Use this operator to assign one persistent object to another.
Supported Platforms
Windows OS/2 AIX
Y Y Y
==
protected:
IBoolean operator== (const IPersistentObject& aIPersistentObject) const;

Use this operator to compare two persitent objects. It evaluates to true if the objects are equal, or false if they are not.

Supported Platforms
Windows OS/2 AIX
Y Y Y