Objectivity for Java Reference

com.objy.db.app
Interface ooId


public interface ooId

Defines the behavior of object identifiers (OIDs).

You can obtain the OID identifying a storage object or a persistent object by calling the object's getOID method. An OID uses 5 components to identify an object:
 D The identifier of the object's database.
 C The identifier of the object's container (0 if the object is a database).
 P The number of the logical page in which the object is stored (0 if the object is a database).
 S The number of the slot in which the object is stored (0 if the object is a database; 1 if the object is a container).
 typeN  The Objectivity/DB type number of the object's class.

You shouldn't need to implement this interface in any class you define.

Functionality
Getting Information getDB()
getOC()
getPage()
getSlot()
Testing isNull()
Converting to String getString()
getStoreString()


Method Summary
 int getDB()
          Gets the identifier of the database in which the object with this OID is stored.
 int getOC()
          Gets the identifier of the container in which the object with this OID is stored.
 int getPage()
          Gets the identifier of the page in which the object with this OID is stored.
 int getSlot()
          Gets the number of the slot in which the object with this OID is stored.
 String getStoreString()
          Gets the string representation of this OID.
 String getString()
          Gets the short string representation of this OID.
 boolean isNull()
          Tests whether this OID is null.
 

Method Detail

getDB

public int getDB()
Gets the identifier of the database in which the object with this OID is stored.

Returns:
The identifier of the database in which the object with this OID is stored.

getOC

public int getOC()
Gets the identifier of the container in which the object with this OID is stored.

Returns:
The identifier of the container in which the object with this OID is stored.

getPage

public int getPage()
Gets the identifier of the page in which the object with this OID is stored.

Returns:
The identifier of the page in which the object with this OID is stored.

getSlot

public int getSlot()
Gets the number of the slot in which the object with this OID is stored.

Returns:
The number of the slot in which the object with this OID is stored.

getStoreString

public String getStoreString()
Gets the string representation of this OID.

The string is of the form "#D-C-P-S:typeN".

Warning: You must not modify the returned string if you intend to use it to look up the referenced object (by passing it as a parameter to the objectFrom method of a federated-database object.)

Returns:
The string representation of this OID.

getString

public String getString()
Gets the short string representation of this OID.

The string is of the form "#D-C-P-S".

Returns:
The short string representation of this OID.

isNull

public boolean isNull()
Tests whether this OID is null.

An OID is null if the value of each of its components except the type number is 0.

Returns:
True if this OID is null; otherwise, false.

Objectivity for Java Reference

Copyright © 2000 Objectivity, Inc. All rights reserved.