Class COM.odi.jcpp.Utilities
java.lang.Object
|
+----COM.odi.jcpp.Utilities
- public class Utilities
- extends Object
The Utilities class contains utility methods pertinent
to the C++/Java binding. If you are not coding your own Java
peer classes, you need not be concerned with this class.
-
checkProduct()
- Make sure that ObjectStore is initialized and that we are running
the right product to use the Java/C++ interface.
-
checkProduct(ObjectManager)
- Make sure that ObjectStore is initialized and that we are running
the right product to use the Java/C++ interface.
-
getLinearRef(Object)
- Computes the linear representation of the object reference associated
with a C++ persistent object.
-
getObject(byte[])
- Return an object corresponding to the object reference.
-
getObject(byte[], ObjectManager)
- Return an object corresponding to the object reference.
-
isNullRef(byte[])
- Checks whether or not the linear object reference indicates a null value.
-
recycle(byte[])
- Returns a byte array that contains a linear address to its storage pool.
getLinearRef
public static byte[] getLinearRef(Object o)
- Computes the linear representation of the object reference associated
with a C++ persistent object. After you invoke this method, you must
invoke the Utility.recycle() method to return the byte array,
which holds the linear representation, to its storage pool so it can
be reused.
- Parameters:
- persistentObject - A Java peer object that identifies a persistent
C++ object
- Returns:
- Linear representation of the object reference for the specified
object.
getObject
public static Object getObject(byte ref[])
- Return an object corresponding to the object reference.
- Parameters:
- ref - The linear object reference of the object to return.
This reference must be non-null.
- Returns:
- The object to which the linear object reference refers.
getObject
public static Object getObject(byte ref[],
ObjectManager om)
- Return an object corresponding to the object reference. The
caller must provide synchronization on om for this method.
- Parameters:
- ref - The linear object reference of the object to return.
This reference must be non-null.
- om - The current object manager.
- Returns:
- The object to which the linear object reference refers.
isNullRef
public static boolean isNullRef(byte oRef[])
- Checks whether or not the linear object reference indicates a null value.
The array itself must be nonnull.
- Returns:
- True if the linear address is null. False if otherwise.
recycle
public static void recycle(byte linearRef[])
- Returns a byte array that contains a linear address to its storage pool.
This makes the byte array available for resuse. Note: recycle() methods
do not require synchronization as the push method is synchronized.
checkProduct
public static ObjectManager checkProduct()
- Make sure that ObjectStore is initialized and that we are running
the right product to use the Java/C++ interface.
checkProduct
public static void checkProduct(ObjectManager om)
- Make sure that ObjectStore is initialized and that we are running
the right product to use the Java/C++ interface.
- Parameters:
- om - The current object manager.
Copyright © 1996, 1997, 1998 Object Design, Inc. All rights reserved.