@Repository public class GisFeatureDao extends GenericGisDao<GisFeature> implements IGisFeatureDao
GisFeature
GEOMETRY_TYPE, MAX_FULLTEXT_RESULTS
persistentClass
Constructor and Description |
---|
GisFeatureDao()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
deleteAllExceptAdmsAndCountries()
Delete all gisFeatures and subclass except Adms and countries (gisFeature
with null featureCode will be deleted too). this method is usefull when
gisFeature 'belongs' to some adms and we want to delete the gisfeature
first and then the adms and countries.
|
long |
getMaxFeatureId() |
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> |
getNearestAndDistanceFrom(com.vividsolutions.jts.geom.Point point,
double distance,
boolean includeDistanceField,
Class<? extends GisFeature> requiredClass) |
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> |
getNearestAndDistanceFrom(com.vividsolutions.jts.geom.Point point,
double distance,
int firstResult,
int maxResults,
boolean includeDistanceField,
Class<? extends GisFeature> requiredClass)
tips to search the nearestplace use firstresult=1 and
maxResults=1
|
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> |
getNearestAndDistanceFromGisFeature(GisFeature gisFeature,
double distance,
boolean includeDistanceField,
Class<? extends GisFeature> requiredClass) |
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> |
getNearestAndDistanceFromGisFeature(GisFeature gisFeature,
double distance,
int firstResult,
int maxResults,
boolean includeDistanceField,
Class<? extends GisFeature> requiredClass,
boolean isMunicipality)
tips to search the nearestplace use firstresult=1 and
maxResults=1
|
List<GisFeature> |
listAllFeaturesFromText(String name,
boolean includeAlternateNames)
Do a full text search for the given name.
|
createGISTIndexForLocationColumn, createGISTIndexForShapeColumn, deleteAll, deleteAll, getByFeatureId, getDirties, getEager, getNearest, getNearestAndDistanceFrom, getNearestAndDistanceFrom, getNearestAndDistanceFrom, getNearestAndDistanceFromGisFeature, getNearestAndDistanceFromGisFeature, getShapeAsWKTByFeatureId, listByFeatureIds, listByName, listFromText, listFromText, remove, save, setEventManager
count, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, setFlushMode
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createGISTIndexForLocationColumn, createGISTIndexForShapeColumn, getByFeatureId, getDirties, getEager, getNearest, getNearestAndDistanceFrom, getNearestAndDistanceFrom, getNearestAndDistanceFromGisFeature, getNearestAndDistanceFromGisFeature, getShapeAsWKTByFeatureId, listByFeatureIds, listByName, listFromText
count, deleteAll, deleteAll, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, remove, save, setFlushMode
public List<GisFeature> listAllFeaturesFromText(String name, boolean includeAlternateNames)
IGisFeatureDao
listAllFeaturesFromText
in interface IGisFeatureDao
name
- the name or zipcode of the GisFeature to searchincludeAlternateNames
- whether we search in the alternatenames and namesGenericGisDao.MAX_FULLTEXT_RESULTS
;IGisDao.listFromText(String, boolean)
public List<com.gisgraphy.domain.valueobject.GisFeatureDistance> getNearestAndDistanceFromGisFeature(GisFeature gisFeature, double distance, int firstResult, int maxResults, boolean includeDistanceField, Class<? extends GisFeature> requiredClass, boolean isMunicipality)
IGisFeatureDao
getNearestAndDistanceFromGisFeature
in interface IGisFeatureDao
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 acountrequiredClass
- the class of the object to be retirevedisMunicipality
- 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
public List<com.gisgraphy.domain.valueobject.GisFeatureDistance> getNearestAndDistanceFromGisFeature(GisFeature gisFeature, double distance, boolean includeDistanceField, Class<? extends GisFeature> requiredClass)
getNearestAndDistanceFromGisFeature
in interface IGisFeatureDao
gisFeature
- The GisFeature from which we want to find GIS Objectdistance
- distance The radius in metersrequiredClass
- the class of the object to be retirevedGisFeatureDistance
public List<com.gisgraphy.domain.valueobject.GisFeatureDistance> getNearestAndDistanceFrom(com.vividsolutions.jts.geom.Point point, double distance, int firstResult, int maxResults, boolean includeDistanceField, Class<? extends GisFeature> requiredClass)
IGisFeatureDao
getNearestAndDistanceFrom
in interface IGisFeatureDao
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 acountrequiredClass
- the class of the object to be retirevedGisFeatureDistance
public List<com.gisgraphy.domain.valueobject.GisFeatureDistance> getNearestAndDistanceFrom(com.vividsolutions.jts.geom.Point point, double distance, boolean includeDistanceField, Class<? extends GisFeature> requiredClass)
getNearestAndDistanceFrom
in interface IGisFeatureDao
point
- The point from which we want to find GIS Objectdistance
- distance The radius in metersrequiredClass
- the class of the object to be retirevedGisFeatureDistance
public int deleteAllExceptAdmsAndCountries()
IGisFeatureDao
deleteAllExceptAdmsAndCountries
in interface IGisFeatureDao
public long getMaxFeatureId()
getMaxFeatureId
in interface IGisFeatureDao
Copyright © 2015. All rights reserved.