public interface IGisDao<T> extends IDao<T,Long>
GenericGisDao
,
IDao
Modifier and Type | Method and Description |
---|---|
void |
createGISTIndexForLocationColumn()
Create the database GIST index for the column 'location' for this entity if it doesn't already exists
|
void |
createGISTIndexForShapeColumn()
create the shape index for the entity if it doesn't already exists.
|
T |
getByFeatureId(Long featureId)
It is not the same as
IDao.get(java.io.Serializable) which
retrieve an object from his PK. |
List<T> |
getDirties()
Returns inconsistant object (in most case object With featureid < 0)
|
T |
getEager(Long id)
Same as IDao#get(java.io.Serializable) but load the AlternateNames and
The linked Adm
|
T |
getNearest(com.vividsolutions.jts.geom.Point location,
String countryCode,
boolean filterMunicipality,
int distance) |
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> |
getNearestAndDistanceFrom(com.vividsolutions.jts.geom.Point point,
double distance)
same as
getNearestAndDistanceFromGisFeature(GisFeature, double, int, int, boolean) but
without paginate |
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> |
getNearestAndDistanceFrom(com.vividsolutions.jts.geom.Point point,
double distance,
int firstResult,
int maxResults,
boolean includeDistanceField,
boolean isMunicipality) |
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> |
getNearestAndDistanceFromGisFeature(GisFeature gisFeature,
double distance,
boolean includeDistanceField) |
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> |
getNearestAndDistanceFromGisFeature(GisFeature gisFeature,
double distance,
int firstResult,
int maxResults,
boolean includeDistanceField) |
String |
getShapeAsWKTByFeatureId(Long featureId) |
List<T> |
listByFeatureIds(List<Long> ids)
return all the Object with the specified featureIds (not ids :id is the
PK (aka datastore id), featureId is the domain value). return an
emptylist if the list of ids is null or empty).
|
List<T> |
listByName(String name)
retrieve the Objects with the specified name (not the ASCII one)
|
List<T> |
listFromText(String name,
boolean includeAlternateNames)
Do a full text search for the given name.
|
count, deleteAll, deleteAll, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, remove, save, setFlushMode
T getByFeatureId(Long featureId)
IDao.get(java.io.Serializable)
which
retrieve an object from his PK.featureId
- the featureid of the GIS object to retrieveIllegalArgumentException
- if the FeatureId is nullList<T> getDirties()
T getEager(Long id)
id
- the id of the features to retrieveIDao.get(java.io.Serializable)
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> getNearestAndDistanceFromGisFeature(GisFeature gisFeature, double distance, boolean includeDistanceField)
gisFeature
- The GisFeature from which we want to find GIS Objectdistance
- distance The radius in metersincludeDistanceField
- Field whether or not we should process calculate the distanceGisFeatureDistance
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> getNearestAndDistanceFromGisFeature(GisFeature gisFeature, double distance, int firstResult, int maxResults, boolean includeDistanceField)
gisFeature
- The GisFeature from which we want to find GIS Objectdistance
- distance The radius in metersfirstResult
- the firstResult index (for pagination), numbered from 1,
if < 1 : it will not be taken into accountmaxResults
- The Maximum number of results to retrieve (for
pagination), if <= 0 : it will not be taken into acountincludeDistanceField
- Field whether or not we should process calculate the distanceGisFeatureDistance
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> getNearestAndDistanceFrom(com.vividsolutions.jts.geom.Point point, double distance)
getNearestAndDistanceFromGisFeature(GisFeature, double, int, int, boolean)
but
without paginatepoint
- The point from which we want to find GIS Objectdistance
- distance The radius in metersGisFeatureDistance
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> getNearestAndDistanceFrom(com.vividsolutions.jts.geom.Point point, double distance, int firstResult, int maxResults, boolean includeDistanceField, boolean isMunicipality)
point
- The point from which we want to find GIS Objectdistance
- distance The radius in metersfirstResult
- the firstResult index (for pagination), numbered from 1,
if < 1 : it will not be taken into accountmaxResults
- The Maximum number of results to retrieve (for
pagination), if <= 0 : it will not be taken into acountincludeDistanceField
- Field whether or not we should process calculate the distanceisMunicipality
- whether we should filter on city that are flag as 'municipality'.
act as a filter, if false it doesn't filters( false doesn't mean that we return non municipality)GisFeatureDistance
List<T> listByName(String name)
name
- the name of the objects to retrievelistFromText(String, boolean)
List<T> listByFeatureIds(List<Long> ids)
ids
- the list of the ids of the object to retrieveList<T> listFromText(String name, boolean includeAlternateNames)
name
- the name or zipcode of the GisFeature to searchincludeAlternateNames
- whether we search in the alternatenames tooGenericGisDao.MAX_FULLTEXT_RESULTS
;IGisFeatureDao.listAllFeaturesFromText(String, boolean)
void createGISTIndexForLocationColumn()
T getNearest(com.vividsolutions.jts.geom.Point location, String countryCode, boolean filterMunicipality, int distance)
location
- The point from which we want to find GIS ObjectcountryCode
- restrict the search to a given country code (useful for feature near a frontierfilterMunicipality
- if we should filter municipality or notdistance
- te distance in metervoid createGISTIndexForShapeColumn()
Copyright © 2015. All rights reserved.