com.intersys.objects.reflect
Interface CacheClass


public interface CacheClass


Method Summary
 void close()
           
 Object createClientObject()
           
 CacheClass[] getCacheSuperclasses()
          Returns an array of all superclasses of this Cache class as declared in Cache.
 CacheField getField(String name)
           
 Iterator getFieldNames()
           
 CacheField[] getFields()
           
 Class getJavaClass()
          Returns Java class, corresponding to this Cache class.
 String getJavaClassName()
          Returns class name of Java class, corresponding to this class.
 CacheMethod getMethod(String signature)
           
 CacheMethod getMethod(String name, CacheClass[] args)
           
 CacheMethod[] getMethods()
           
 Iterator getMethodSignatures()
           
 int getModifiers()
          Returns the modifiers for the CacheClass as an integer.
 String getName()
           
 CacheQueryInfo[] getQueries()
           
 CacheQueryInfo getQuery(String queryName)
           
 CacheClass getSuperclass()
          Returns a Cache class which is superclass of this class in correspondance with Java representation.
 boolean isAssignableFrom(CacheClass clazz)
          Determines if the Cache class represented by this CacheClass object is either the same as, or is a superclass of, the Cache class represented by the specified CacheClass parameter.
 boolean isVerified()
           
 Object newInstance(com.intersys.cache.CacheObject cobj)
           
 Object newInstance(String arg)
          Constructs a new instance of object on Cache server by running %New method.
 Object openObject(Id id)
           
 Object openObject(Oid oid)
           
 void verifyClass()
           
 

Method Detail

getName

public String getName()

getJavaClass

public Class getJavaClass()
                   throws CacheException
Returns Java class, corresponding to this Cache class. If this class has not yet been loaded attempts to load the class. Use getJavaClassName if you need only class name and do not want to load the class.

Returns:
java.lang.Class object, corresponding to this Cache class. If Java class can not be loaded with current class loader, CacheExcpetion is thrown.
Throws:
CacheException - if resulting Java class can not be loaded or any error occur while communicating to Cache Server.
See Also:
getJavaClassName()

getJavaClassName

public String getJavaClassName()
                        throws CacheException
Returns class name of Java class, corresponding to this class. Method completes successfully even if java class does not exist or can not be loaded with current class loader.

Returns:
Name of corresponding Java class, represented as java.lang.String.
Throws:
CacheException
See Also:
getJavaClass()

getFields

public CacheField[] getFields()
                       throws CacheException
Throws:
CacheException

getMethods

public CacheMethod[] getMethods()
                         throws CacheException
Throws:
CacheException

getQueries

public CacheQueryInfo[] getQueries()
                            throws CacheException
Throws:
CacheException

getFieldNames

public Iterator getFieldNames()
                       throws CacheException
Throws:
CacheException

getMethodSignatures

public Iterator getMethodSignatures()
                             throws CacheException
Returns:
Iterator through method signatures. Each element is a String of folowing format: methodName(serverSideType1, serverSideType2, ...)
Throws:
CacheException

getField

public CacheField getField(String name)
                    throws CacheException
Throws:
CacheException

getMethod

public CacheMethod getMethod(String signature)
                      throws CacheException
Parameters:
signature - string of folowing format: methodName(serverSideType1, serverSideType2, ...)
Throws:
CacheException

getMethod

public CacheMethod getMethod(String name,
                             CacheClass[] args)
                      throws CacheException
Throws:
CacheException

getQuery

public CacheQueryInfo getQuery(String queryName)
                        throws CacheException
Throws:
CacheException

getSuperclass

public CacheClass getSuperclass()
                         throws CacheException
Returns a Cache class which is superclass of this class in correspondance with Java representation. In other words the superclass, Java projection of which is used as superclass for Java projection of this class is returned.

Returns:
A CacheClass object which is superclass of this class in correspondance with Java representation.
Throws:
CacheException

getCacheSuperclasses

public CacheClass[] getCacheSuperclasses()
                                  throws CacheException
Returns an array of all superclasses of this Cache class as declared in Cache. If there are no superclasses in Cache for this class, then an empty array is returned.

Returns:
array, containing all CacheClass objects which are superclasses of this class.
Throws:
CacheException - If an error occured while communicating with Cache Database

isAssignableFrom

public boolean isAssignableFrom(CacheClass clazz)
                         throws CacheException
Determines if the Cache class represented by this CacheClass object is either the same as, or is a superclass of, the Cache class represented by the specified CacheClass parameter. It returns true if so; otherwise it returns false.

Parameters:
clazz - the CacheClass object to be checked
Returns:
the boolean value indicating whether objects of the type clazz can be assigned to objects of this Cache class
Throws:
CacheException

getModifiers

public int getModifiers()
Returns the modifiers for the CacheClass as an integer. The CacheModifier class should be used to decode the modifiers in the integer. At this time returns 0 because CacheClass has not any modifier.

See Also:
CacheModifier

newInstance

public Object newInstance(String arg)
                   throws CacheException
Constructs a new instance of object on Cache server by running %New method.

Returns:
Java object, corresponding to constructed Cache Object.
Throws:
CacheException

createClientObject

public Object createClientObject()
                          throws CacheException
Throws:
CacheException

newInstance

public Object newInstance(com.intersys.cache.CacheObject cobj)
                   throws CacheException
Throws:
CacheException

openObject

public Object openObject(Id id)
                  throws CacheException
Throws:
CacheException

openObject

public Object openObject(Oid oid)
                  throws CacheException
Throws:
CacheException

isVerified

public boolean isVerified()

verifyClass

public void verifyClass()
                 throws CacheException
Throws:
CacheException

close

public void close()