CAS Unit Tests
Clover coverage report - CAS Unit Tests
Coverage timestamp: Mon Jul 4 2005 18:13:17 CDT
file stats: LOC: 44   Methods: 1
NCLOC: 23   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ObjectComparison.java 0% 0% 0% 0%
coverage
 1    /*
 2    * Portions of this file Copyright 1999-2005 University of Chicago
 3    * Portions of this file Copyright 1999-2005 The University of Southern California.
 4    *
 5    * This file or a portion of this file is licensed under the
 6    * terms of the Globus Toolkit Public License, found at
 7    * http://www.globus.org/toolkit/download/license.html.
 8    * If you redistribute this file, with or without
 9    * modifications, you must include this notice in the file.
 10    */
 11    package org.globus.cas.impl.service;
 12   
 13    import org.globus.cas.types.ObjectData;
 14   
 15    import org.globus.cas.impl.databaseAccess.ObjectDataHandler;
 16    import org.globus.cas.impl.databaseAccess.CasDBException;
 17   
 18    /**
 19    * Base class for all CAS Object comparison classes
 20    */
 21    public abstract class ObjectComparison {
 22   
 23    public abstract boolean objectMatches(ObjectData objData1,
 24    ObjectData objData2)
 25    throws CasDBException;
 26   
 27    public abstract boolean objectExists(ObjectData objData1)
 28    throws CasDBException;
 29   
 30    public abstract ObjectData[] matchingSubset(ObjectData objData)
 31    throws CasDBException;
 32   
 33    public abstract ObjectData[] matchingSuperset(ObjectData objData)
 34    throws CasDBException;
 35   
 36  0 public boolean exactMatchExists(ObjectData objData) throws CasDBException {
 37  0 int objId = ObjectDataHandler.getObjectId(objData.getObjectName(),
 38    objData.getObjectNamespace());
 39  0 if (objId == -1)
 40  0 return false;
 41    else
 42  0 return true;
 43    }
 44    }