gov.nih.nci.cagrid.data.sdk32query
Class SubclassCheckCache
java.lang.Object
gov.nih.nci.cagrid.data.sdk32query.SubclassCheckCache
public class SubclassCheckCache
- extends java.lang.Object
SubclassCheckCache
Checks that a given class has or does not have a class property in the
caCORE backend data source. This property is only present for classes
which have subclasses stored in the database as well.
- Version:
- $Id: SubclassCheckCache.java,v 1.2 2007/01/12 16:29:37 dervin Exp $
- Author:
- David W. Ervin
|
Method Summary |
static boolean |
hasClassProperty(java.lang.String className,
gov.nih.nci.system.applicationservice.ApplicationService queryService)
Executes a test query against the application service to see if the specified
type has a class discriminator parameter, which indicates that it has subclass
instances available in the data source. |
static void |
main(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CABIO_URL
public static final java.lang.String CABIO_URL
- See Also:
- Constant Field Values
KRAMER_URL
public static final java.lang.String KRAMER_URL
- See Also:
- Constant Field Values
CLASS_PROPERTY_NOT_FOUND_ERROR
public static final java.lang.String CLASS_PROPERTY_NOT_FOUND_ERROR
- See Also:
- Constant Field Values
MAX_EXCEPTION_UNROLL
public static final int MAX_EXCEPTION_UNROLL
- See Also:
- Constant Field Values
SubclassCheckCache
public SubclassCheckCache()
hasClassProperty
public static boolean hasClassProperty(java.lang.String className,
gov.nih.nci.system.applicationservice.ApplicationService queryService)
throws QueryProcessingException
- Executes a test query against the application service to see if the specified
type has a class discriminator parameter, which indicates that it has subclass
instances available in the data source. If an exception indicating the type
has no class discriminator is thrown, this method returns false. If the query
succedes, the method returns true. In this case, this is a somewhat expensive
operation on the first call using that class name. All subsequent calls with
the same class name are cached and return in order log(n) time, where n is the
number of unique class names checked with this method.
- Parameters:
className - The name of the class to testqueryService - The application service to submit the test query to
- Returns:
- True if the class discriminator is present, false otherwise
- Throws:
QueryProcessingException
main
public static void main(java.lang.String[] args)