/** * Consults the fid mapper for the feature source, if the null feature map reliable fids not * supported. */ @Override public boolean isReliableFIDSupported() { return !(source.getPrimaryKey() instanceof NullPrimaryKey); }
public PrimaryKey getPrimaryKey() { return delegate.getPrimaryKey(); }
public boolean isValid(String fid) { PrimaryKey key = featureSource.getPrimaryKey(); try { featureSource.getDataStore().decodeFID(key, fid, true); return true; } catch (Exception e) { return false; } } }
@Override public boolean supportsSorting(final SortBy[] sortAttributes) { if (super.supportsSorting(sortAttributes)) return true; for (int i = 0; i < sortAttributes.length; i++) { SortBy sortBy = sortAttributes[i]; if (SortBy.NATURAL_ORDER == sortBy || SortBy.REVERSE_ORDER == sortBy) { // we do only if we have a non null primary key return !(source.getPrimaryKey() instanceof NullPrimaryKey); } else { PropertyName propertyName = sortBy.getPropertyName(); SortOrder sortOrder = sortBy.getSortOrder(); if (!supportsPropertySorting(propertyName, sortOrder)) { return false; } } } return true; }
/** * Consults the fid mapper for the feature source, if the null feature map reliable fids * not supported. */ @Override public boolean isReliableFIDSupported() { return !(source.getPrimaryKey() instanceof NullPrimaryKey); }
/** * Consults the fid mapper for the feature source, if the null feature map reliable fids * not supported. */ @Override public boolean isReliableFIDSupported() { return !(source.getPrimaryKey() instanceof NullPrimaryKey); }
public PrimaryKey getPrimaryKey() { return delegate.getPrimaryKey(); }
public PrimaryKey getPrimaryKey() { return delegate.getPrimaryKey(); }
public boolean isValid(String fid) { PrimaryKey key = featureSource.getPrimaryKey(); try { featureSource.getDataStore().decodeFID( key, fid, true ); return true; } catch( Exception e ) { return false; } }
public boolean isValid(String fid) { PrimaryKey key = featureSource.getPrimaryKey(); try { featureSource.getDataStore().decodeFID( key, fid, true ); return true; } catch( Exception e ) { return false; } }
private boolean hasPrimaryKey(String typeName) { FeatureSource featureSource; try { featureSource = dataStore.getFeatureSource(typeName); } catch (Exception e) { throw new GeoToolsOpException(StatusCode.UNABLE_TO_GET_FEATURES); } if (featureSource instanceof JDBCFeatureSource) { return ((JDBCFeatureSource) featureSource).getPrimaryKey().getColumns().size() != 0; } return false; }
private boolean hasPrimaryKey(String typeName) { FeatureSource featureSource; try { featureSource = dataStore.getFeatureSource(typeName); } catch (Exception e) { throw new GeoToolsOpException(StatusCode.UNABLE_TO_GET_FEATURES); } if (featureSource instanceof JDBCFeatureSource) { return ((JDBCFeatureSource) featureSource).getPrimaryKey().getColumns().size() != 0; } return false; }
@Override public boolean supportsSorting(final SortBy[] sortAttributes) { if(super.supportsSorting(sortAttributes)) return true; for (int i = 0; i < sortAttributes.length; i++) { SortBy sortBy = sortAttributes[i]; if (SortBy.NATURAL_ORDER == sortBy || SortBy.REVERSE_ORDER == sortBy) { // we do only if we have a non null primary key return !(source.getPrimaryKey() instanceof NullPrimaryKey); } else { PropertyName propertyName = sortBy.getPropertyName(); SortOrder sortOrder = sortBy.getSortOrder(); if (!supportsPropertySorting(propertyName, sortOrder)) { return false; } } } return true; }
@Override public boolean supportsSorting(final SortBy[] sortAttributes) { if(super.supportsSorting(sortAttributes)) return true; for (int i = 0; i < sortAttributes.length; i++) { SortBy sortBy = sortAttributes[i]; if (SortBy.NATURAL_ORDER == sortBy || SortBy.REVERSE_ORDER == sortBy) { // we do only if we have a non null primary key return !(source.getPrimaryKey() instanceof NullPrimaryKey); } else { PropertyName propertyName = sortBy.getPropertyName(); SortOrder sortOrder = sortBy.getSortOrder(); if (!supportsPropertySorting(propertyName, sortOrder)) { return false; } } } return true; }