コード例 #1
0
 /** A clean way to specify which tests run on which platforms. */
 public boolean isPlatformSupported(DatabasePlatform platform) {
   boolean supported = false;
   boolean notSupported = false;
   if ((unsupportedPlatforms == null) && (supportedPlatforms == null)) {
     return true;
   }
   if (supportedPlatforms != null) {
     for (Iterator iterator = supportedPlatforms.iterator(); iterator.hasNext(); ) {
       Class platformClass = (Class) iterator.next();
       if (platformClass.isInstance(platform)) {
         supported = true;
       }
     }
   } else {
     supported = true;
   }
   if (unsupportedPlatforms != null) {
     for (Iterator iterator = unsupportedPlatforms.iterator(); iterator.hasNext(); ) {
       Class platformClass = (Class) iterator.next();
       if (platformClass.isInstance(platform)) {
         notSupported = true;
       }
     }
   }
   return supported && (!notSupported);
 }
コード例 #2
0
    @Override
    public int hashCode() {
      DatabaseField field = getField();
      Class type = field != null ? field.getType() : null;
      boolean isInsert = isInsert();
      boolean isInsertModeReturnOnly = isInsertModeReturnOnly();
      boolean isUpdate = isUpdate();

      int result = field != null ? field.hashCode() : 0;
      result = 31 * result + (type != null ? type.hashCode() : 0);
      result = 31 * result + (isInsert ? 1 : 0);
      result = 31 * result + (isInsertModeReturnOnly ? 1 : 0);
      result = 31 * result + (isUpdate ? 1 : 0);
      return result;
    }
コード例 #3
0
 public CustomSQLSubQueryTest() {
   referenceClass = Employee.class;
   setName("CustomSQLSubQueryTest(" + referenceClass.getName() + ")");
   setDescription("The test runs a ReadAllQuery with a customSQL subquery to the database.");
 }
コード例 #4
0
 public void setReferenceClass(Class referenceClass) {
   this.referenceClass = referenceClass;
   if (referenceClass != null) {
     this.referenceClassName = referenceClass.getName();
   }
 }
コード例 #5
0
 /** INTERNAL: Returns the implementor descriptor class name. */
 public String getImplementorDescriptorClassName() {
   if ((implementorDescriptorClassName == null) && (implementorDescriptor != null)) {
     implementorDescriptorClassName = implementorDescriptor.getName();
   }
   return implementorDescriptorClassName;
 }