|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
com.gisgraphy.domain.repository.GenericDao<OpenStreetMap,Long>
com.gisgraphy.domain.repository.OpenStreetMapDao
@Repository public class OpenStreetMapDao
A data access object for OpenStreetMap
Object
Field Summary | |
---|---|
protected static org.slf4j.Logger |
logger
The logger |
Fields inherited from class com.gisgraphy.domain.repository.GenericDao |
---|
persistentClass |
Constructor Summary | |
---|---|
OpenStreetMapDao()
Default constructor |
Method Summary | |
---|---|
void |
clearPartialSearchName()
clear the value of the textsearchname column, the textsearchname column is used to calculate textsearchvector and is unused after the calculation |
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)
|
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 |
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 |
Methods inherited from class com.gisgraphy.domain.repository.GenericDao |
---|
count, deleteAll, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, setFlushMode |
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
---|
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
Methods inherited from class org.springframework.dao.support.DaoSupport |
---|
afterPropertiesSet, initDao |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.gisgraphy.domain.repository.IDao |
---|
count, deleteAll, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, setFlushMode |
Field Detail |
---|
protected static final org.slf4j.Logger logger
Constructor Detail |
---|
public OpenStreetMapDao()
Method Detail |
---|
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)
IOpenStreetMapDao
getNearestAndDistanceFrom
in interface IOpenStreetMapDao
point
- 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 not
StreetDistance
public OpenStreetMap getByGid(Long gid)
getByGid
in interface IOpenStreetMapDao
gid
- the gid of the openstreetmap entity we want to retrieve
public Integer updateTS_vectorColumnForStreetNameSearch()
IOpenStreetMapDao
updateTS_vectorColumnForStreetNameSearch
in interface IOpenStreetMapDao
StreetSearchMode
public Integer updateTS_vectorColumnForStreetNameSearchPaginate(long from, long to)
IOpenStreetMapDao
updateTS_vectorColumnForStreetNameSearchPaginate
in interface IOpenStreetMapDao
from
- the start pagination index of gidto
- the end pagination index
(partial search and fulltext search)
StreetSearchMode
public void createSpatialIndexes()
IOpenStreetMapDao
createSpatialIndexes
in interface IOpenStreetMapDao
public void createFulltextIndexes()
IOpenStreetMapDao
createFulltextIndexes
in interface IOpenStreetMapDao
public void clearPartialSearchName()
IOpenStreetMapDao
clearPartialSearchName
in interface IOpenStreetMapDao
public long countEstimate()
countEstimate
in interface IOpenStreetMapDao
public OpenStreetMap save(OpenStreetMap openStreetMap)
IDao
save
in interface IDao<OpenStreetMap,Long>
save
in class GenericDao<OpenStreetMap,Long>
openStreetMap
- The object to save
public void remove(OpenStreetMap openStreetMap)
IDao
remove
in interface IDao<OpenStreetMap,Long>
remove
in class GenericDao<OpenStreetMap,Long>
openStreetMap
- The object to removepublic int deleteAll()
IDao
deleteAll
in interface IDao<OpenStreetMap,Long>
deleteAll
in class GenericDao<OpenStreetMap,Long>
public long getMaxOpenstreetMapId()
getMaxOpenstreetMapId
in interface IOpenStreetMapDao
public long getMaxGid()
getMaxGid
in interface IOpenStreetMapDao
public void setEventManager(EventManager eventManager)
public void setStreetFactory(IStreetFactory streetFactory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |