com.gisgraphy.domain.repository
Interface IGisDao<T>
- All Superinterfaces:
- IDao<T,Long>
- All Known Subinterfaces:
- IAdmDao, ICityDao, ICountryDao, IGisFeatureDao
- All Known Implementing Classes:
- AdmDao, AirportDao, AmuseParkDao, AqueducDao, ATMDao, BankDao, BarDao, BayDao, BeachDao, BridgeDao, BuildingDao, BusStationDao, CampDao, CanyonDao, CasinoDao, CastleDao, CemeteryDao, CirqueDao, CityDao, CitySubdivisionDao, CliffDao, CoastDao, ContinentDao, CountryDao, CourtHouseDao, CustomsPostDao, DamDao, DesertDao, FactoryDao, FallsDao, FarmDao, FieldDao, FishingAreaDao, FjordDao, ForestDao, GardenDao, GenericGisDao, GisFeatureDao, GolfDao, GorgeDao, GrassLandDao, GulfDao, HillDao, HospitalDao, HotelDao, HouseDao, IceDao, IslandDao, LakeDao, LibraryDao, LightHouseDao, MallDao, MarshDao, MetroStationDao, MilitaryDao, MillDao, MineDao, MoleDao, MonumentDao, MoundDao, MountainDao, MuseumDao, OasisDao, ObservatoryPointDao, OceanDao, OperaHouseDao, ParkDao, ParkingDao, PlantationDao, PolicePostDao, PoliticalEntityDao, PondDao, PortDao, PostOfficeDao, PrisonDao, PyramidDao, QuayDao, RailDao, RailRoadStationDao, RanchDao, RavinDao, ReefDao, ReligiousDao, ReserveDao, RestaurantDao, RoadDao, SchoolDao, SeaDao, SpringDao, StadiumDao, StraitDao, StreamDao, StreetDao, TheaterDao, TowerDao, TreeDao, TunnelDao, UnderSeaDao, VineyardDao, VolcanoDao, WaterBodyDao, ZooDao
public interface IGisDao<T>
- extends IDao<T,Long>
Interface for a Generic Dao for GIS Object (java-5 meaning) it suppose that
the PK is of type long because its goal is to be used with class gisfeatures
and class that extends GisFeature. if it is note the case. it is possible to
create an other inteface
: public interface IGisDao extends IDao it adds some method to the IDao in order to
acess GIS objects
- Author:
- David Masclet
- See Also:
GenericGisDao
,
IDao
Method Summary |
void |
createGISTIndexForLocationColumn()
Create the database GIST index for the column 'location' for this entity |
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 |
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)
|
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)
|
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. |
Methods inherited from interface com.gisgraphy.domain.repository.IDao |
count, deleteAll, deleteAll, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, remove, save, setFlushMode |
getByFeatureId
T getByFeatureId(Long featureId)
- It is not the same as
IDao.get(java.io.Serializable)
which
retrieve an object from his PK.
- Parameters:
featureId
- the featureid of the GIS object to retrieve
- Returns:
- the Gis Object with the specified GisFeature id.
- Throws:
IllegalArgumentException
- if the FeatureId is null
getDirties
List<T> getDirties()
- Returns inconsistant object (in most case object With featureid < 0)
- Returns:
- List of populated objects (never return null, but an empty list)
getEager
T getEager(Long id)
- Same as IDao#get(java.io.Serializable) but load the AlternateNames and
The linked Adm
- Parameters:
id
- the id of the features to retrieve
- Returns:
- The Feature with the alternateName and the Adm loaded
- See Also:
IDao.get(java.io.Serializable)
getNearestAndDistanceFromGisFeature
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> getNearestAndDistanceFromGisFeature(GisFeature gisFeature,
double distance,
boolean includeDistanceField)
- Parameters:
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 distance
- Returns:
- A List of GisFeatureDistance with the nearest elements or an
emptylist (never return null), ordered by distance. note
the specified gisFeature will not be included into results the
results will be of the type of the currentDao
- See Also:
GisFeatureDistance
getNearestAndDistanceFromGisFeature
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> getNearestAndDistanceFromGisFeature(GisFeature gisFeature,
double distance,
int firstResult,
int maxResults,
boolean includeDistanceField)
- Parameters:
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 distance
- Returns:
- A List of GisFeatureDistance with the nearest elements or an
emptylist (never return null), ordered by distance. note
the specified gisFeature will not be included into results the
results will be of the type of the currentDao
tips :
to search the nearest place use firstresult=1 and maxResults=1 - See Also:
GisFeatureDistance
getNearestAndDistanceFrom
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
- Parameters:
point
- The point from which we want to find GIS Objectdistance
- distance The radius in meters
- Returns:
- A List of GisFeatureDistance with the nearest elements or an
emptylist (never return null), ordered by distance. note
the specified gisFeature will not be included into results the
results will be of the type of the currentDao
- See Also:
GisFeatureDistance
getNearestAndDistanceFrom
List<com.gisgraphy.domain.valueobject.GisFeatureDistance> getNearestAndDistanceFrom(com.vividsolutions.jts.geom.Point point,
double distance,
int firstResult,
int maxResults,
boolean includeDistanceField)
- Parameters:
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 distance
- Returns:
- A List of GisFeatureDistance with the nearest elements or an
emptylist (never return null), ordered by distance. note
the specified gisFeature will not be included into results the
results will be of the type of the currentDao
tips:
to search the nearest place use firstresult=1 and maxResults=1 - See Also:
GisFeatureDistance
listByName
List<T> listByName(String name)
- retrieve the Objects with the specified name (not the ASCII one)
- Parameters:
name
- the name of the objects to retrieve
- Returns:
- List of populated objects list (never return null, but an empty
list)
- See Also:
listFromText(String, boolean)
listByFeatureIds
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). The features will be of
the type of the Dao.
- Parameters:
ids
- the list of the ids of the object to retrieve
- Returns:
- List of populated objects list (never return null, but an empty
list)
listFromText
List<T> listFromText(String name,
boolean includeAlternateNames)
- Do a full text search for the given name. The search will be case,
iso-latin, comma-separated insensitive
search for 'saint-André', 'saint-Andre', 'SaInT-andré', 'st-andré', etc
will return the same results Polymorphism is not supported, e.g : if you
use gisfeatureDao the results will only be of that type and no feature of
type City that extends gisFeature...etc will be returned.
- Parameters:
name
- the name or zipcode of the GisFeature to searchincludeAlternateNames
- wether we search in the alternatenames too
- Returns:
- a list of gisFeatures of type of the class for the given text.
the max list size is
GenericGisDao.MAX_FULLTEXT_RESULTS
; - See Also:
IGisFeatureDao.listAllFeaturesFromText(String, boolean)
createGISTIndexForLocationColumn
void createGISTIndexForLocationColumn()
- Create the database GIST index for the column 'location' for this entity
Copyright © 2012. All Rights Reserved.