Revision 46517 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
517 517
                            + as_identifier(this.schemaName) + "."
518 518
                            + as_identifier(this.tableName);
519 519
                }
520
                return as_identifier(this.databaseName) + "."
521
                        + as_identifier(this.tableName);
520
//                return as_identifier(this.databaseName) + "."
521
//                        + as_identifier(this.tableName);
522 522
            } else {
523 523
                if (this.has_schema()) {
524 524
                    return as_identifier(this.schemaName) + "."
......
637 637

  
638 638
    protected class JoinBase 
639 639
            extends AbstractStatementPart
640
            implements StatementPart 
640
            implements JoinBuilder 
641 641
        {
642 642
        protected String type;
643 643
        protected TableNameBuilder table;
......
677 677
            return builder.toString();
678 678
        }
679 679
        
680
        @Override
681
        public TableNameBuilder getTable() {
682
            return this.table;
683
        }
680 684
        
685
        @Override
686
        public String getType() {
687
            return this.type;
688
        }
689

  
690
        @Override
691
        public Value getCondition() {
692
            return this.expression;
693
        }
681 694
    }
682 695
    
683 696
    public class FromBuilderBase
......
687 700
        protected TableNameBuilder tableName;
688 701
        protected String subquery;
689 702
        protected String passthrough;
690
        protected List<JoinBase> joins;
703
        protected List<JoinBuilder> joins;
691 704

  
692 705
        public FromBuilderBase() {
693 706
            this.tableName = null;
......
774 787
            }
775 788
            StringBuilder builder = new StringBuilder();
776 789
            builder.append(this.tableName.toString(formatter));
777
            for (JoinBase join : this.joins) {
790
            for (JoinBuilder join : this.joins) {
778 791
                builder.append(" ");
779 792
                builder.append(join.toString(formatter));
780 793
            }
781 794
            return builder.toString();
782 795
        }
783 796

  
797
        @Override
798
        public List<JoinBuilder> getJoins() {
799
            return this.joins;
800
        }
801

  
784 802
    }
785 803

  
786 804
    public class SelectColumnBuilderBase
......
869 887
        
870 888
        public SelectColumnBuilder table(TableNameBuilder table) {
871 889
            this.table = table;
890
            if(this.name != null){
891
                this.name.table(table);
892
            }
872 893
            return this;
873 894
        }
874 895
        

Also available in: Unified diff