@Repository public class OpenStreetMapDao extends GenericDao<OpenStreetMap,Long> implements IOpenStreetMapDao
OpenStreetMap Object| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_DISTANCE |
protected static org.slf4j.Logger |
logger
The logger
|
persistentClass| Constructor and Description |
|---|
OpenStreetMapDao()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
long |
countEstimate() |
void |
createFulltextIndexes()
Create the fulltext index for openstreetMap
to improve performances
|
void |
createSpatialIndexes()
Create the database GIST for openstreetMap
to improve performances
|
int |
deleteAll()
Delete all the object from the datastore
|
OpenStreetMap |
getByGid(Long gid) |
OpenStreetMap |
getByOpenStreetMapId(Long openstreetmapId) |
long |
getMaxGid() |
long |
getMaxOpenstreetMapId() |
List<com.gisgraphy.domain.valueobject.StreetDistance> |
getNearestAndDistanceFrom(com.vividsolutions.jts.geom.Point point,
double distance,
int firstResult,
int maxResults,
com.gisgraphy.street.StreetType streetType,
Boolean oneWay,
String name,
com.gisgraphy.street.StreetSearchMode streetSearchMode,
boolean includeDistanceField)
base method for all findNearest
|
OpenStreetMap |
getNearestByosmIds(com.vividsolutions.jts.geom.Point point,
List<Long> ids) |
OpenStreetMap |
getNearestFrom(com.vividsolutions.jts.geom.Point point)
find the nearest street based on the shape, not the middle point
|
OpenStreetMap |
getNearestFrom(com.vividsolutions.jts.geom.Point point,
boolean onlyroad,
boolean filterEmptyName) |
OpenStreetMap |
getNearestRoadFrom(com.vividsolutions.jts.geom.Point point)
find the nearest road based on the shape, not the middle point and exclude footway
|
String |
getShapeAsWKTByGId(Long gid) |
void |
remove(OpenStreetMap openStreetMap)
remove the object from the datastore
|
OpenStreetMap |
save(OpenStreetMap openStreetMap)
Saves the passed object, and returns an attached entity.
|
void |
setEventManager(EventManager eventManager) |
void |
setStreetFactory(IStreetFactory streetFactory) |
Integer |
updateTS_vectorColumnForStreetNameSearch()
Update the ts_vector column for the street name search
(partial search and fulltext search)
|
Integer |
updateTS_vectorColumnForStreetNameSearchPaginate(long from,
long to)
Update the ts_vector column for the street name search from the gid that are >= from and < to
|
count, deleteAll, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, setFlushModecheckDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcount, deleteAll, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, setFlushModeprotected static final org.slf4j.Logger logger
protected static final int DEFAULT_DISTANCE
public List<com.gisgraphy.domain.valueobject.StreetDistance> getNearestAndDistanceFrom(com.vividsolutions.jts.geom.Point point, double distance, int firstResult, int maxResults, com.gisgraphy.street.StreetType streetType, Boolean oneWay, String name, com.gisgraphy.street.StreetSearchMode streetSearchMode, boolean includeDistanceField)
IOpenStreetMapDaogetNearestAndDistanceFrom in interface IOpenStreetMapDaopoint - The point from which we want to find GIS Objectdistance - 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 acountstreetType - The type of streetoneWay - whether the street should be oneway or notname - the name the street name must containsstreetSearchMode - if we search in fulltext or contain modeincludeDistanceField - if we have to calculate the distance or notStreetDistancepublic OpenStreetMap getByGid(Long gid)
getByGid in interface IOpenStreetMapDaogid - the gid of the openstreetmap entity we want to retrievepublic Integer updateTS_vectorColumnForStreetNameSearch()
IOpenStreetMapDaoupdateTS_vectorColumnForStreetNameSearch in interface IOpenStreetMapDaoStreetSearchModepublic Integer updateTS_vectorColumnForStreetNameSearchPaginate(long from, long to)
IOpenStreetMapDaoupdateTS_vectorColumnForStreetNameSearchPaginate in interface IOpenStreetMapDaofrom - the start pagination index of gidto - the end pagination index
(partial search and fulltext search)StreetSearchModepublic void createSpatialIndexes()
IOpenStreetMapDaocreateSpatialIndexes in interface IOpenStreetMapDaopublic void createFulltextIndexes()
IOpenStreetMapDaocreateFulltextIndexes in interface IOpenStreetMapDaopublic long countEstimate()
countEstimate in interface IOpenStreetMapDaopublic OpenStreetMap save(OpenStreetMap openStreetMap)
IDaosave in interface IDao<OpenStreetMap,Long>save in class GenericDao<OpenStreetMap,Long>openStreetMap - The object to savepublic void remove(OpenStreetMap openStreetMap)
IDaoremove in interface IDao<OpenStreetMap,Long>remove in class GenericDao<OpenStreetMap,Long>openStreetMap - The object to removepublic int deleteAll()
IDaodeleteAll in interface IDao<OpenStreetMap,Long>deleteAll in class GenericDao<OpenStreetMap,Long>public OpenStreetMap getByOpenStreetMapId(Long openstreetmapId)
getByOpenStreetMapId in interface IOpenStreetMapDaoopenstreetmapId - the openstreetmap id (not the id, not the gid)public long getMaxOpenstreetMapId()
getMaxOpenstreetMapId in interface IOpenStreetMapDaopublic OpenStreetMap getNearestByosmIds(com.vividsolutions.jts.geom.Point point, List<Long> ids)
getNearestByosmIds in interface IOpenStreetMapDaopoint - the point to search aroundids - the openstreetmap ids of streets we want to restrict searchpublic long getMaxGid()
getMaxGid in interface IOpenStreetMapDao@Autowired public void setEventManager(EventManager eventManager)
public void setStreetFactory(IStreetFactory streetFactory)
public OpenStreetMap getNearestRoadFrom(com.vividsolutions.jts.geom.Point point)
IOpenStreetMapDaogetNearestRoadFrom in interface IOpenStreetMapDaopoint - The point from which we want to find streetpublic OpenStreetMap getNearestFrom(com.vividsolutions.jts.geom.Point point)
IOpenStreetMapDaogetNearestFrom in interface IOpenStreetMapDaopoint - The point from which we want to find streetpublic OpenStreetMap getNearestFrom(com.vividsolutions.jts.geom.Point point, boolean onlyroad, boolean filterEmptyName)
getNearestFrom in interface IOpenStreetMapDaofilterEmptyName - filter street with name=nullpublic String getShapeAsWKTByGId(Long gid)
getShapeAsWKTByGId in interface IOpenStreetMapDaogid - the gid of the featureCopyright © 2015. All rights reserved.