com.intersys.cache.jni
Class CacheExternalOref

java.lang.Object
  extended bycom.intersys.cache.AbstractCacheObject
      extended bycom.intersys.cache.jni.CacheExternalOref
All Implemented Interfaces:
com.intersys.cache.CacheObject

public class CacheExternalOref
extends com.intersys.cache.AbstractCacheObject

An opaque structure which represents a reference to a Cache' object. This is the data structure returned by CacheJNI.PopOref(). This would be returned from a COS construct such as:

    quit ##class(Customer.PurchaseOrder).%New().
This class is designed to be passed as an argument to the CacheJNI methods that expect an oref such as CacheJNI.PushMethod(CacheExternalOref, String, int). This class ensures that the correct reference counts exist in Cache' so that the object is not destroyed by Cache' while this class exists in a Java program.


Field Summary
 
Fields inherited from interface com.intersys.cache.CacheObject
CLOSE_IMMEDIATELY
 
Constructor Summary
CacheExternalOref()
          Constructor to create an "empty" Cache object reference.
CacheExternalOref(CacheExternalOref oref)
          Create a new reference to an existing Cache' object.
 
Method Summary
 void delete()
           
 CacheClass getCacheClass()
           
 Oid getOid()
           
 com.intersys.cache.Dataholder getProperty(int ii, int jj, int propType, String name)
           
 Object getZRef()
           
 com.intersys.cache.Dataholder runInstanceMethod(String methodName, com.intersys.cache.Dataholder[] argv, int retType)
           
 com.intersys.cache.Dataholder[] runInstanceMethod(String methodName, int[] refs, com.intersys.cache.Dataholder[] argv, int retType)
           
 int save()
           
 void setCacheClass(CacheClass cl)
           
 void setProperty(int ii, int jj, int mod, int propType, String name, com.intersys.cache.Dataholder value)
           
 
Methods inherited from class com.intersys.cache.AbstractCacheObject
decreaseCount, decreaseCountImmediately, decreaseReferenceCount, equals, forceClose, getDatabase, getId, getMe, getOref, getSerialState, getTypeName, getUserData, hashCode, increaseCount, increaseReferenceCount, isClosed, isLocked, isLockedByMe, newJavaInstance, newJavaInstance, save, setUserData, toString, unlock
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheExternalOref

public CacheExternalOref()
                  throws CacheException
Constructor to create an "empty" Cache object reference. An empty cache object reference can be mapped to a Cache object reference with setOref().


CacheExternalOref

public CacheExternalOref(CacheExternalOref oref)
                  throws CacheException
Create a new reference to an existing Cache' object. Both references must be closed (go out of scope) before the object inside of Cache' will be eligible for closing.

Method Detail

getZRef

public final Object getZRef()
                     throws CacheException
Throws:
CacheException

delete

public void delete()
            throws CacheException
Throws:
CacheException

getProperty

public com.intersys.cache.Dataholder getProperty(int ii,
                                                 int jj,
                                                 int propType,
                                                 String name)
                                          throws CacheException
Throws:
CacheException

setProperty

public void setProperty(int ii,
                        int jj,
                        int mod,
                        int propType,
                        String name,
                        com.intersys.cache.Dataholder value)
                 throws CacheException
Throws:
CacheException

getOid

public Oid getOid()
           throws CacheException
Throws:
CacheException

save

public int save()
         throws CacheException
Throws:
CacheException

runInstanceMethod

public com.intersys.cache.Dataholder[] runInstanceMethod(String methodName,
                                                         int[] refs,
                                                         com.intersys.cache.Dataholder[] argv,
                                                         int retType)
                                                  throws CacheException
Throws:
CacheException

runInstanceMethod

public com.intersys.cache.Dataholder runInstanceMethod(String methodName,
                                                       com.intersys.cache.Dataholder[] argv,
                                                       int retType)
                                                throws CacheException
Throws:
CacheException

getCacheClass

public CacheClass getCacheClass()
                         throws CacheException
Throws:
CacheException

setCacheClass

public void setCacheClass(CacheClass cl)
                   throws CacheException
Throws:
CacheException