Revision 23303 branches/v2_0_0_prep/libraries/libFMap_dataDB/src/org/gvsig/fmap/data/feature/db/jdbc/h2/H2Store.java
H2Store.java | ||
---|---|---|
6 | 6 |
import java.util.Iterator; |
7 | 7 |
import java.util.Locale; |
8 | 8 |
|
9 |
import org.gvsig.tools.exception.BaseException; |
|
10 | 9 |
import org.gvsig.fmap.data.CloseException; |
11 | 10 |
import org.gvsig.fmap.data.DataCollection; |
11 |
import org.gvsig.fmap.data.DataException; |
|
12 | 12 |
import org.gvsig.fmap.data.DataExplorer; |
13 | 13 |
import org.gvsig.fmap.data.DataManager; |
14 | 14 |
import org.gvsig.fmap.data.InitializeException; |
... | ... | |
29 | 29 |
import org.gvsig.metadata.IMetadata; |
30 | 30 |
import org.gvsig.metadata.IMetadataManager; |
31 | 31 |
import org.gvsig.metadata.MetadataManager; |
32 |
import org.gvsig.tools.exception.BaseException; |
|
32 | 33 |
|
33 | 34 |
public class H2Store extends JDBCStore{ |
34 | 35 |
public static final String CONNECTION_STRING = "h2"; |
... | ... | |
80 | 81 |
|
81 | 82 |
|
82 | 83 |
public DataCollection getDataCollection(FeatureType type, String filter, String order) throws ReadException { |
83 |
if (type==null){ |
|
84 |
type=getDefaultFeatureType(); |
|
85 |
} else { |
|
86 |
if (!type.isSubtypeOf(this.getDefaultFeatureType())){ |
|
87 |
throw new ReadException("invalid type",this.getName()); |
|
88 |
} |
|
84 |
try { |
|
85 |
type = this.checkFeatureTypeForCollection(type); |
|
86 |
} catch (DataException e) { |
|
87 |
throw new ReadException(this.getName(), e); |
|
89 | 88 |
} |
90 | 89 |
|
91 | 90 |
if (useSqlSource ){ |
92 |
if (filter != null || order != null || type != getDefaultFeatureType()){
|
|
91 |
if (filter != null || order != null){ |
|
93 | 92 |
throw new ReadException("Unsuported filter/order in sqlSource mode",this.getName()); |
94 | 93 |
} |
95 | 94 |
} |
Also available in: Unified diff