Revision 45664 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/SQLBuilderBase.java

View differences:

SQLBuilderBase.java
476 476
                return false;
477 477
            }
478 478
            TableNameBuilder other = (TableNameBuilder) obj;
479
            if (this.has_database()) {
480
                if (this.has_schema()) {
481
                    return this.databaseName.equals(other.getDatabase()) &&
482
                           this.schemaName.equals(other.getSchema()) &&
483
                           this.tableName.equals(other.getName());
479
            
480
            if (this.has_database() != other.has_database()) {
481
                return false;
482
            }
483
            String thisSchema = null;
484
            String otherSchema = null;
485
            if(support_schemas()) {
486
                thisSchema = this.schemaName;
487
                if (StringUtils.isBlank(thisSchema)) {
488
                    thisSchema = default_schema();
484 489
                }
485
            } else {
486
                if (this.has_schema()) {
487
                    return this.schemaName.equals(other.getSchema()) &&
488
                           this.tableName.equals(other.getName());
490
                otherSchema = other.getSchema();
491
                if (StringUtils.isBlank(otherSchema)) {
492
                    otherSchema = default_schema();
489 493
                }
490 494
            }
491
            return this.tableName.equals(other.getName());
495
            if (this.has_database()) {
496
                    return StringUtils.equals(this.databaseName,other.getDatabase()) &&
497
                           StringUtils.equals(thisSchema, otherSchema) &&
498
                           StringUtils.equals(this.tableName,other.getName());
499
            } else {
500
                    return StringUtils.equals(thisSchema, otherSchema) &&
501
                           StringUtils.equals(this.tableName,other.getName());
502
            }
492 503
        }
493 504

  
494 505
        @Override

Also available in: Unified diff