Revision 45162 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
SQLBuilderBase.java | ||
---|---|---|
827 | 827 |
extends AbstractStatementPart |
828 | 828 |
implements OrderByBuilder { |
829 | 829 |
|
830 |
protected String value;
|
|
830 |
protected Value value;
|
|
831 | 831 |
protected String custom; |
832 | 832 |
protected boolean ascending; |
833 | 833 |
|
... | ... | |
840 | 840 |
if (filter==null || filter.accept(this)) { |
841 | 841 |
visitor.visit(this); |
842 | 842 |
} |
843 |
if (this.value!=null) { |
|
844 |
this.value.accept(visitor, filter); |
|
845 |
} |
|
843 | 846 |
} |
844 | 847 |
|
845 | 848 |
@Override |
846 | 849 |
public OrderByBuilder column(String name) { |
850 |
this.value = expression().variable(name); |
|
851 |
return this; |
|
852 |
} |
|
853 |
|
|
854 |
@Override |
|
855 |
public OrderByBuilder column(Value name) { |
|
847 | 856 |
this.value = name; |
848 | 857 |
return this; |
849 | 858 |
} |
850 |
|
|
859 |
|
|
851 | 860 |
@Override |
852 | 861 |
public OrderByBuilder custom(String order) { |
853 | 862 |
this.custom = order; |
... | ... | |
886 | 895 |
return this.custom; |
887 | 896 |
} |
888 | 897 |
if (this.ascending) { |
889 |
return as_identifier(this.value) + " ASC";
|
|
898 |
return this.value.toString() + " ASC";
|
|
890 | 899 |
} |
891 |
return as_identifier(this.value) + " DESC";
|
|
900 |
return this.value.toString() + " DESC";
|
|
892 | 901 |
} |
893 | 902 |
} |
894 | 903 |
|
... | ... | |
910 | 919 |
this.columns = new ArrayList<>(); |
911 | 920 |
this.distinct = false; |
912 | 921 |
} |
922 |
@Override |
|
923 |
public List<Value> getGroups() { |
|
924 |
return this.groupColumn; |
|
925 |
} |
|
913 | 926 |
|
914 | 927 |
@Override |
915 | 928 |
public SelectBuilder group_by(Value... columns) { |
Also available in: Unified diff