Revision 44296 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
328 328
//
329 329
//        @Override
330 330
//        public String toString(Formatter<Value> formatter) {
331
//            if (formatter.canApply(this)) {
331
//            if (formatter!=null && formatter.canApply(this)) {
332 332
//                return formatter.format(this);
333 333
//            }
334 334
//            return as_identifier(this.name);
......
429 429

  
430 430
        @Override
431 431
        public String toString(Formatter<Value> formatter) {
432
            if (formatter.canApply(this)) {
432
            if (formatter!=null && formatter.canApply(this)) {
433 433
                return formatter.format(this);
434 434
            }
435 435
            if (this.has_database()) {
......
488 488

  
489 489
        @Override
490 490
        public String toString(Formatter formatter) {
491
            if (formatter.canApply(this)) {
491
            if (formatter!=null && formatter.canApply(this)) {
492 492
                return formatter.format(this);
493 493
            }
494 494
            if (this.all) {
......
553 553

  
554 554
        @Override
555 555
        public String toString(Formatter<Value> formatter) {
556
            if (formatter.canApply(this)) {
556
            if (formatter!=null && formatter.canApply(this)) {
557 557
                return formatter.format(this);
558 558
            }
559 559
            if (!StringUtils.isEmpty(passthrough)) {
......
651 651

  
652 652
        @Override
653 653
        public String toString(Formatter<Value> formatter) {
654
            if (formatter.canApply(this)) {
654
            if (formatter!=null && formatter.canApply(this)) {
655 655
                return formatter.format(this);
656 656
            }
657 657
            StringBuilder builder = new StringBuilder();
......
728 728

  
729 729
        @Override
730 730
        public String toString(Formatter<Value> formatter) {
731
            if (formatter.canApply(this)) {
731
            if (formatter!=null && formatter.canApply(this)) {
732 732
                return formatter.format(this);
733 733
            }
734 734
            if (!StringUtils.isEmpty(this.custom)) {
......
903 903

  
904 904
        @Override
905 905
        public String toString(Formatter<Value> formatter) {
906
            if (formatter.canApply(this)) {
906
            if (formatter!=null && formatter.canApply(this)) {
907 907
                return formatter.format(this);
908 908
            }
909 909
            StringBuilder builder = new StringBuilder();
......
988 988

  
989 989
        @Override
990 990
        public String toString(Formatter<Value> formatter) {
991
            if (formatter.canApply(this)) {
991
            if (formatter!=null && formatter.canApply(this)) {
992 992
                return formatter.format(this);
993 993
            }
994 994
            StringBuilder builder = new StringBuilder();
......
1141 1141

  
1142 1142
        @Override
1143 1143
        public String toString(Formatter<Value> formatter) {
1144
            if (formatter.canApply(this)) {
1144
            if (formatter!=null && formatter.canApply(this)) {
1145 1145
                return formatter.format(this);
1146 1146
            }
1147 1147
            StringBuilder builder = new StringBuilder();
......
1210 1210

  
1211 1211
        @Override
1212 1212
        public String toString(Formatter<Value> formatter) {
1213
            if (formatter.canApply(this)) {
1213
            if (formatter!=null && formatter.canApply(this)) {
1214 1214
                return formatter.format(this);
1215 1215
            }
1216 1216
            StringBuilder builder = new StringBuilder();
......
1327 1327

  
1328 1328
        @Override
1329 1329
        public String toString(Formatter<Value> formatter) {
1330
            if (formatter.canApply(this)) {
1330
            if (formatter!=null && formatter.canApply(this)) {
1331 1331
                return formatter.format(this);
1332 1332
            }
1333 1333
            /*
......
1420 1420

  
1421 1421
        @Override
1422 1422
        public String toString(Formatter<Value> formatter) {
1423
            if (formatter.canApply(this)) {
1423
            if (formatter!=null && formatter.canApply(this)) {
1424 1424
                return formatter.format(this);
1425 1425
            }
1426 1426
            /*
......
1514 1514

  
1515 1515
        @Override
1516 1516
        public String toString(Formatter<Value> formatter) {
1517
            if (formatter.canApply(this)) {
1517
            if (formatter!=null && formatter.canApply(this)) {
1518 1518
                return formatter.format(this);
1519 1519
            }
1520 1520
            StringBuilder builder = new StringBuilder();
......
1702 1702

  
1703 1703
        @Override
1704 1704
        public String toString(Formatter<Value> formatter) {
1705
            if (formatter.canApply(this)) {
1705
            if (formatter!=null && formatter.canApply(this)) {
1706 1706
                return formatter.format(this);
1707 1707
            }
1708 1708
            StringBuilder builder = new StringBuilder();
......
1766 1766
                    }
1767 1767
                } else {
1768 1768
                    builder.append(" DEFAULT '");
1769
                    builder.append(column.getDefaultValue().toString());
1769
                    builder.append(Objects.toString(column.getDefaultValue(),""));
1770 1770
                    builder.append("'");
1771 1771
                }
1772 1772
                if (column.allowNulls()) {
......
1912 1912

  
1913 1913
        @Override
1914 1914
        public String toString(Formatter<Value> formatter) {
1915
            if (formatter.canApply(this)) {
1915
            if (formatter!=null && formatter.canApply(this)) {
1916 1916
                return formatter.format(this);
1917 1917
            }
1918 1918
            StringBuilder builder = new StringBuilder();
......
1998 1998
                    }
1999 1999
                } else {
2000 2000
                    builder.append(" DEFAULT '");
2001
                    builder.append(column.getDefaultValue().toString());
2001
                    builder.append(Objects.toString(column.getDefaultValue(),""));
2002 2002
                    builder.append("'");
2003 2003
                }
2004 2004
                if (column.allowNulls()) {
......
2068 2068

  
2069 2069
        @Override
2070 2070
        public String toString(Formatter<Value> formatter) {
2071
            if (formatter.canApply(this)) {
2071
            if (formatter!=null && formatter.canApply(this)) {
2072 2072
                return formatter.format(this);
2073 2073
            }
2074 2074
            return this.value.toString(formatter);
......
2121 2121

  
2122 2122
        @Override
2123 2123
        public String toString(Formatter<Value> formatter) {
2124
            if (formatter.canApply(this)) {
2124
            if (formatter!=null && formatter.canApply(this)) {
2125 2125
                return formatter.format(this);
2126 2126
            }
2127 2127
            /*
......
2193 2193

  
2194 2194
        @Override
2195 2195
        public String toString(Formatter<Value> formatter) {
2196
            if (formatter.canApply(this)) {
2196
            if (formatter!=null && formatter.canApply(this)) {
2197 2197
                return formatter.format(this);
2198 2198
            }
2199 2199
            StringBuilder builder = new StringBuilder();

Also available in: Unified diff